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

Method to_corner

manim/mobject/mobject.py:1600–1626  ·  view source on GitHub ↗

Moves this :class:`~.Mobject` to the given corner of the screen. Returns ------- :class:`.Mobject` The newly positioned mobject. Examples -------- .. manim:: ToCornerExample :save_last_frame: class ToCornerExampl

(
        self, corner: Vector3DLike = DL, buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER
    )

Source from the content-addressed store, hash-verified

1598 return self
1599
1600 def to_corner(
1601 self, corner: Vector3DLike = DL, buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER
1602 ) -> Self:
1603 """Moves this :class:`~.Mobject` to the given corner of the screen.
1604
1605 Returns
1606 -------
1607 :class:`.Mobject`
1608 The newly positioned mobject.
1609
1610 Examples
1611 --------
1612
1613 .. manim:: ToCornerExample
1614 :save_last_frame:
1615
1616 class ToCornerExample(Scene):
1617 def construct(self):
1618 c = Circle()
1619 c.to_corner(UR)
1620 t = Tex("To the corner!")
1621 t2 = MathTex("x^3").shift(DOWN)
1622 self.add(c,t,t2)
1623 t.to_corner(DL, buff=0)
1624 t2.to_corner(UL, buff=1.5)
1625 """
1626 return self.align_on_border(corner, buff)
1627
1628 def to_edge(
1629 self, edge: Vector3DLike = LEFT, buff: float = DEFAULT_MOBJECT_TO_EDGE_BUFFER

Callers 6

constructMethod · 0.45
test_FixedMobjects3DFunction · 0.45
test_plotFunction · 0.45
apply_functionFunction · 0.45
constructMethod · 0.45
setupMethod · 0.45

Calls 1

align_on_borderMethod · 0.95

Tested by 4

test_FixedMobjects3DFunction · 0.36
test_plotFunction · 0.36
apply_functionFunction · 0.36
constructMethod · 0.36