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

Function test_become

tests/test_graphical_units/test_mobjects.py:16–29  ·  view source on GitHub ↗
(scene)

Source from the content-addressed store, hash-verified

14
15@frames_comparison
16def test_become(scene):
17 s = Rectangle(width=2, height=1, color=RED).shift(UP)
18 d = Dot()
19
20 s1 = s.copy().become(d, match_width=True).set_opacity(0.25).set_color(BLUE)
21 s2 = (
22 s.copy()
23 .become(d, match_height=True, match_center=True)
24 .set_opacity(0.25)
25 .set_color(GREEN)
26 )
27 s3 = s.copy().become(d, stretch=True).set_opacity(0.25).set_color(PURE_YELLOW)
28
29 scene.add(s, d, s1, s2, s3)
30
31
32@frames_comparison

Callers

nothing calls this directly

Calls 8

RectangleClass · 0.85
DotClass · 0.85
shiftMethod · 0.45
set_colorMethod · 0.45
set_opacityMethod · 0.45
becomeMethod · 0.45
copyMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected