MCPcopy
hub / github.com/ManimCommunity/manim / center

Method center

manim/mobject/mobject.py:1572–1581  ·  view source on GitHub ↗

Moves the center of the mobject to the center of the scene. Returns ------- :class:`.Mobject` The centered mobject.

(self)

Source from the content-addressed store, hash-verified

1570 # Positioning methods
1571
1572 def center(self) -> Self:
1573 """Moves the center of the mobject to the center of the scene.
1574
1575 Returns
1576 -------
1577 :class:`.Mobject`
1578 The centered mobject.
1579 """
1580 self.shift(-self.get_center())
1581 return self
1582
1583 def align_on_border(
1584 self, direction: Vector3DLike, buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER

Callers 9

arrangeMethod · 0.95
test_tex_sizeFunction · 0.45
test_tex_sizeFunction · 0.45
get_zoom_in_animationMethod · 0.45
to_default_stateMethod · 0.45
__init__Method · 0.45
__init__Method · 0.45
__init__Method · 0.45
get_mobject_keyMethod · 0.45

Calls 2

shiftMethod · 0.95
get_centerMethod · 0.95

Tested by 2

test_tex_sizeFunction · 0.36
test_tex_sizeFunction · 0.36