(scene)
| 14 | |
| 15 | @frames_comparison |
| 16 | def 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 |