mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Go back to use_simple_quadratic_approx being set at the Text level
This commit is contained in:
parent
da2b13aee9
commit
ae99c8cd2e
2 changed files with 5 additions and 8 deletions
|
@ -296,7 +296,6 @@ class VMobjectFromSVGPath(VMobject):
|
||||||
path_obj: se.Path,
|
path_obj: se.Path,
|
||||||
should_subdivide_sharp_curves: bool = False,
|
should_subdivide_sharp_curves: bool = False,
|
||||||
should_remove_null_curves: bool = True,
|
should_remove_null_curves: bool = True,
|
||||||
use_simple_quadratic_approx: bool = True,
|
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
# Get rid of arcs
|
# Get rid of arcs
|
||||||
|
@ -304,10 +303,7 @@ class VMobjectFromSVGPath(VMobject):
|
||||||
self.path_obj = path_obj
|
self.path_obj = path_obj
|
||||||
self.should_subdivide_sharp_curves = should_subdivide_sharp_curves
|
self.should_subdivide_sharp_curves = should_subdivide_sharp_curves
|
||||||
self.should_remove_null_curves = should_remove_null_curves
|
self.should_remove_null_curves = should_remove_null_curves
|
||||||
super().__init__(
|
super().__init__(**kwargs)
|
||||||
use_simple_quadratic_approx=use_simple_quadratic_approx,
|
|
||||||
**kwargs
|
|
||||||
)
|
|
||||||
|
|
||||||
def init_points(self) -> None:
|
def init_points(self) -> None:
|
||||||
# After a given svg_path has been converted into points, the result
|
# 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
|
# Get rid of any null curves
|
||||||
self.set_points(self.get_points_without_null_curves())
|
self.set_points(self.get_points_without_null_curves())
|
||||||
# So triangulation doesn't get messed up
|
# So triangulation doesn't get messed up
|
||||||
if self.use_simple_quadratic_approx:
|
self.subdivide_intersections()
|
||||||
self.subdivide_intersections()
|
|
||||||
# Save for future use
|
# Save for future use
|
||||||
PATH_TO_POINTS[path_string] = (
|
PATH_TO_POINTS[path_string] = (
|
||||||
self.get_points().copy(),
|
self.get_points().copy(),
|
||||||
|
|
|
@ -417,7 +417,9 @@ class Text(MarkupText):
|
||||||
# For backward compatibility
|
# For backward compatibility
|
||||||
isolate: Selector = (re.compile(r"\w+", re.U), re.compile(r"\S+", re.U)),
|
isolate: Selector = (re.compile(r"\w+", re.U), re.compile(r"\S+", re.U)),
|
||||||
use_labelled_svg: bool = True,
|
use_labelled_svg: bool = True,
|
||||||
path_string_config: dict = dict(),
|
path_string_config: dict = dict(
|
||||||
|
use_simple_quadratic_approx=True,
|
||||||
|
),
|
||||||
**kwargs
|
**kwargs
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|
Loading…
Add table
Reference in a new issue