mirror of
https://github.com/3b1b/manim.git
synced 2025-07-28 20:43:56 +08:00
Fix bug with SVG rectangles
This commit is contained in:
@ -184,8 +184,9 @@ class SVGMobject(VMobject):
|
|||||||
corner_radius = rect_element.getAttribute("rx")
|
corner_radius = rect_element.getAttribute("rx")
|
||||||
|
|
||||||
# input preprocessing
|
# input preprocessing
|
||||||
|
fill_opacity = 1
|
||||||
if fill_color in ["", "none", "#FFF", "#FFFFFF"] or Color(fill_color) == Color(WHITE):
|
if fill_color in ["", "none", "#FFF", "#FFFFFF"] or Color(fill_color) == Color(WHITE):
|
||||||
opacity = 0
|
fill_opacity = 0
|
||||||
fill_color = BLACK # shdn't be necessary but avoids error msgs
|
fill_color = BLACK # shdn't be necessary but avoids error msgs
|
||||||
if fill_color in ["#000", "#000000"]:
|
if fill_color in ["#000", "#000000"]:
|
||||||
fill_color = WHITE
|
fill_color = WHITE
|
||||||
@ -213,7 +214,7 @@ class SVGMobject(VMobject):
|
|||||||
stroke_width=stroke_width,
|
stroke_width=stroke_width,
|
||||||
stroke_color=stroke_color,
|
stroke_color=stroke_color,
|
||||||
fill_color=fill_color,
|
fill_color=fill_color,
|
||||||
fill_opacity=opacity
|
fill_opacity=fill_opacity
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
mob = RoundedRectangle(
|
mob = RoundedRectangle(
|
||||||
@ -321,7 +322,7 @@ class SVGMobject(VMobject):
|
|||||||
|
|
||||||
class VMobjectFromSVGPathstring(VMobject):
|
class VMobjectFromSVGPathstring(VMobject):
|
||||||
CONFIG = {
|
CONFIG = {
|
||||||
"long_lines": True,
|
"long_lines": False,
|
||||||
"should_subdivide_sharp_curves": False,
|
"should_subdivide_sharp_curves": False,
|
||||||
"should_remove_null_curves": False,
|
"should_remove_null_curves": False,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user