From ad60b903d0baef0f9355f135a691ed794547e9d7 Mon Sep 17 00:00:00 2001 From: Grant Sanderson Date: Wed, 13 Jan 2021 00:09:36 -1000 Subject: [PATCH] Allow configuration of VMobjectFromSVGPathstring from SVGMobject --- manimlib/mobject/svg/svg_mobject.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/manimlib/mobject/svg/svg_mobject.py b/manimlib/mobject/svg/svg_mobject.py index 744e5dd6..d19e1d12 100644 --- a/manimlib/mobject/svg/svg_mobject.py +++ b/manimlib/mobject/svg/svg_mobject.py @@ -73,6 +73,7 @@ class SVGMobject(VMobject): # TODO, style components should be read in, not defaulted "stroke_width": DEFAULT_STROKE_WIDTH, "fill_opacity": 1.0, + "path_string_config": {} } def __init__(self, file_name=None, **kwargs): @@ -148,7 +149,10 @@ class SVGMobject(VMobject): return mob.submobjects def path_string_to_mobject(self, path_string): - return VMobjectFromSVGPathstring(path_string) + return VMobjectFromSVGPathstring( + path_string, + **self.path_string_config, + ) def use_to_mobjects(self, use_element): # Remove initial "#" character