mirror of
https://github.com/3b1b/manim.git
synced 2025-08-21 05:44:04 +00:00
Fix svg polygon command
This commit is contained in:
parent
0c37d91af3
commit
33d4dd7729
1 changed files with 2 additions and 2 deletions
|
@ -153,8 +153,8 @@ class SVGMobject(VMobject):
|
||||||
def polygon_to_mobject(self, polygon_element):
|
def polygon_to_mobject(self, polygon_element):
|
||||||
path_string = polygon_element.getAttribute("points")
|
path_string = polygon_element.getAttribute("points")
|
||||||
for digit in string.digits:
|
for digit in string.digits:
|
||||||
path_string = path_string.replace(f" {digit}", f"{digit} L")
|
path_string = path_string.replace(f" {digit}", f"L {digit}")
|
||||||
path_string = "M" + path_string
|
path_string = path_string.replace("L", "M", 1)
|
||||||
return self.path_string_to_mobject(path_string)
|
return self.path_string_to_mobject(path_string)
|
||||||
|
|
||||||
def circle_to_mobject(self, circle_element):
|
def circle_to_mobject(self, circle_element):
|
||||||
|
|
Loading…
Add table
Reference in a new issue