Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion manim/mobject/svg/svg_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def hash_seed(self) -> tuple:
config.renderer,
)

def generate_mobject(self) -> None:
def generate_mobject(self, **kwargs: Any) -> None:
"""Parse the SVG and translate its elements to submobjects."""
file_path = self.get_file_path()
element_tree = ET.parse(file_path)
Expand All @@ -206,6 +206,8 @@ def generate_mobject(self) -> None:
modified_file_path.unlink()

mobjects, mobject_dict = self.get_mobjects_from(svg)
for mobj in mobjects:
mobj.set(**kwargs)
self.add(*mobjects)
self.id_to_vgroup_dict = mobject_dict
self.flip(RIGHT) # Flip y
Expand Down
4 changes: 4 additions & 0 deletions manim/mobject/text/text_mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,8 @@ def add_line_to(end: Point3D) -> None:
if height is None and width is None:
self.scale(TEXT_MOB_SCALE_FACTOR)
self.initial_height = self.height
for submobj in self.submobjects:
submobj.set(**kwargs)

def __repr__(self) -> str:
return f"Text({repr(self.original_text)})"
Expand Down Expand Up @@ -1305,6 +1307,8 @@ def add_line_to(end: Point3D) -> None:
self.scale(TEXT_MOB_SCALE_FACTOR)

self.initial_height = self.height
for submobj in self.submobjects:
submobj.set(**kwargs)

@property
def font_size(self) -> float:
Expand Down
Loading