From ae99c8cd2e3880985f8fed367650cbafc3138ec7 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Fri, 13 Jan 2023 14:08:29 -0800 Subject: [PATCH] Go back to use_simple_quadratic_approx being set at the Text level --- manimlib/mobject/svg/svg_mobject.py | 9 ++------- manimlib/mobject/svg/text_mobject.py | 4 +++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/manimlib/mobject/svg/svg_mobject.py b/manimlib/mobject/svg/svg_mobject.py index 962d4a03..ce782933 100644 --- a/manimlib/mobject/svg/svg_mobject.py +++ b/manimlib/mobject/svg/svg_mobject.py @@ -296,7 +296,6 @@ class VMobjectFromSVGPath(VMobject): path_obj: se.Path, should_subdivide_sharp_curves: bool = False, should_remove_null_curves: bool = True, - use_simple_quadratic_approx: bool = True, **kwargs ): # Get rid of arcs @@ -304,10 +303,7 @@ class VMobjectFromSVGPath(VMobject): self.path_obj = path_obj self.should_subdivide_sharp_curves = should_subdivide_sharp_curves self.should_remove_null_curves = should_remove_null_curves - super().__init__( - use_simple_quadratic_approx=use_simple_quadratic_approx, - **kwargs - ) + super().__init__(**kwargs) def init_points(self) -> None: # After a given svg_path has been converted into points, the result @@ -323,8 +319,7 @@ class VMobjectFromSVGPath(VMobject): # Get rid of any null curves self.set_points(self.get_points_without_null_curves()) # So triangulation doesn't get messed up - if self.use_simple_quadratic_approx: - self.subdivide_intersections() + self.subdivide_intersections() # Save for future use PATH_TO_POINTS[path_string] = ( self.get_points().copy(), diff --git a/manimlib/mobject/svg/text_mobject.py b/manimlib/mobject/svg/text_mobject.py index 5365dc61..a16d322f 100644 --- a/manimlib/mobject/svg/text_mobject.py +++ b/manimlib/mobject/svg/text_mobject.py @@ -417,7 +417,9 @@ class Text(MarkupText): # For backward compatibility isolate: Selector = (re.compile(r"\w+", re.U), re.compile(r"\S+", re.U)), use_labelled_svg: bool = True, - path_string_config: dict = dict(), + path_string_config: dict = dict( + use_simple_quadratic_approx=True, + ), **kwargs ): super().__init__(