Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Fixed a problem where in zooming in, stroke widths all grew

Grant Sanderson5aa11cf8adec
diff --git a/manimlib/camera/camera.py b/manimlib/camera/camera.py
index 96e7c58a7..6741288a8 100644
--- a/manimlib/camera/camera.py
+++ b/manimlib/camera/camera.py
@@ -392,7 +392,10 @@ class Camera(object):
vmobject
)
ctx.set_line_width(
- width * self.cairo_line_width_multiple
+ width * self.cairo_line_width_multiple *
+ # This ensures lines have constant width
+ # as you zoom in on them.
+ (self.get_frame_width() / FRAME_WIDTH)
)
ctx.stroke_preserve()
return self