-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Fix VGroup.scale(scale_stroke=True)
to Respect Submobjects' Stroke Widths
#4231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Fix VGroup.scale(scale_stroke=True)
to Respect Submobjects' Stroke Widths
#4231
Conversation
Hello, Thank you for the super quick fix. I have one question though: Isn't the fix super dependent on the implicit fact that manim/manim/mobject/mobject.py Lines 2311 to 2339 in f304bd9
Maybe, we could do the same thing, but explicitly, by calling first |
Hi @ccalauzenes class FixVGroupScaling2(Scene):
def construct(self):
square = Square(side_length=2)
square.set_stroke(color=RED_E, width=40)
square.set_stroke(color=WHITE, width=120, background=True)
rec = Rectangle(height=4,width=5)
rec.set_stroke(color=RED, width=10)
rec.set_stroke(color=YELLOW_A, width=20, background=True)
vg = VGroup(square)
rec.add(vg)
self.add(rec)
self.play(rec.animate.scale(1, scale_stroke=True))
self.play(rec.animate.scale(0.5, scale_stroke=True))
self.play(rec.animate.scale(2))
self.wait() FixVGroupScaling2.mp4 |
Overview: What does this pull request change?
scale_stroke
ofscale
method does not behaves as expected on aVGroup
#4229Further Information and Comments
Example:
FixVGroupScaling.mp4
Reviewer Checklist