A community-maintained Python framework for creating mathematical animations.
SVG engine rewrite and tests (#915)
Mark Miller9b02aea5a6ec
diff --git a/.gitignore b/.gitignoreindex 4606afd95..7b5c88463 100644--- a/.gitignore+++ b/.gitignore@@ -83,6 +83,9 @@ ipython_config.py# PEP 582; used by e.g. github.com/David-OConnor/pyflow__pypackages__/+# PyCharm+/.idea/+# Celery stuffcelerybeat-schedulecelerybeat.piddiff --git a/manim/mobject/svg/style_utils.py b/manim/mobject/svg/style_utils.pynew file mode 100644index 000000000..1a8326fce--- /dev/null+++ b/manim/mobject/svg/style_utils.py@@ -0,0 +1,145 @@+"""Utility functions for parsing SVG styles."""+++__all__ = ["cascade_element_style", "parse_style", "parse_color_string"]++from xml.dom.minidom import Element as MinidomElement+from colour import web2hex+from ...utils.color import rgb_to_hex++from typing import Dict, List++SUPPORTED_STYLING_ATTRIBUTES: List[str] = [+ "fill",+ "stroke",+ "style",+ "fill-opacity",+ "stroke-opacity",+]+++def cascade_element_style(+ element: MinidomElement, inherited: Dict[str, str]+) -> Dict[str, str]:+ """Collect the element's style attributes based upon both its inheritance and its own attributes.++ SVG uses cascading element styles. A closer ancestor's style takes precedence over a more distant ancestor's+ style. In order to correctly calculate the styles, the attributes are passed down through the inheritance tree,+ updating where necessary.++ Note that this method only copies the values and does not parse them. See :meth:`parse_color_string` for converting+ from SVG attributes to manim keyword arguments.++ Parameters+ ----------+ element : :class:`MinidomElement`+ Element of the SVG parse tree++ inherited : :class:`dict`+ Dictionary of SVG attributes inherited from the parent element.++ Returns+ -------+ :class:`dict`+ Dictionary mapping svg attributes to values with `element`'s values overriding inherited values.+ """++ style = inherited.copy()++ for attr in SUPPORTED_STYLING_ATTRIBUTES:+ entry = element.getAttribute(attr)+ if entry:+ style[attr] = entry++ return style+++def parse_color_string(color_spec: str) -> str:+ """Handle the SVG-specific color strings and convert them to HTML #rrggbb format.++ Parameters+ ----------+ color_spec : :class:`str`+ String in any web-compatible format++ Returns+ -------+ :class:`str`+ Hexadecimal color string in the format `#rrggbb`+ """++ if color_spec[0:3] == "rgb":+ # these are only in integer form, but the Colour module wants them in floats.+ splits = color_spec[4:-1].split(",")+ if splits[0][-1] == "%":+ # if the last character of the first number is a percentage,+ # then interpret the number as a percentage+ parsed_rgbs = [float(i[:-1]) / 100.0 for i in splits]+ else:+ parsed_rgbs = [int(i) / 255.0 for i in splits]++ hex_color = rgb_to_hex(parsed_rgbs)++ elif color_spec[0] == "#":+ # its OK, parse as hex color standard.+ hex_color = color_spec++ else:+ # attempt to convert color names like "red" to hex color+ hex_color = web2hex(color_spec, force_long=True)++ return hex_color+++def parse_style(svg_style: Dict[str, str]) -> Dict:+ """Convert a dictionary of SVG attributes to Manim VMobject keyword arguments.++ Parameters+ ----------+ svg_style : :class:`dict`+ Style attributes as a string-to-string dictionary. Keys are valid SVG element attributes (fill, stroke, etc)++ Returns+ -------+ :class:`dict`+ Style attributes, but in manim kwargs form, e.g., keys are fill_color, stroke_color+ """++ manim_style = {}++ # style attributes trump other element-level attributes,+ # see https://www.w3.org/TR/SVG11/styling.html section 6.4, search "priority"+ # so overwrite the other attribute dictionary values.+ if "style" in svg_style:+ for style_spec in svg_style["style"].split(";"):+ try:+ key, value = style_spec.split(":")+ except ValueError as e:+ if not style_spec:+ # there was just a stray semicolon at the end, producing an emptystring+ pass+ else:+ raise e+ else:+ svg_style[key] = value++ if "fill-opacity" in svg_style:+ manim_style["fill_opacity"] = float(svg_style["fill-opacity"])++ if "stroke-opacity" in svg_style:+ manim_style["stroke_opacity"] = float(svg_style["stroke-opacity"])++ # nones need to be handled specially+ if "fill" in svg_style:+ if svg_style["fill"] == "none":+ manim_style["fill_opacity"] = 0+ else:+ manim_style["fill_color"] = parse_color_string(svg_style["fill"])++ if "stroke" in svg_style:+ if svg_style["stroke"] == "none":+ manim_style["stroke_opacity"] = 0+ else:+ manim_style["stroke_color"] = parse_color_string(svg_style["stroke"])++ return manim_stylediff --git a/manim/mobject/svg/svg_mobject.py b/manim/mobject/svg/svg_mobject.pyindex 1e280cb3a..a5e088f6c 100644--- a/manim/mobject/svg/svg_mobject.py+++ b/manim/mobject/svg/svg_mobject.py@@ -1,7 +1,7 @@"""Mobjects generated from an SVG file."""-__all__ = ["SVGMobject", "VMobjectFromSVGPathstring", "string_to_numbers"]+__all__ = ["SVGMobject", "string_to_numbers"]import itertools as it@@ -10,8 +10,12 @@ import osimport stringimport warnings-from xml.dom import minidom+from xml.dom.minidom import Element as MinidomElement, parse as minidom_parse+from typing import Dict, List++from .style_utils import cascade_element_style, parse_style+from .svg_path import SVGPathMobject, string_to_numbersfrom ... import configfrom ...constants import *from ...mobject.geometry import Circle@@ -19,13 +23,6 @@ from ...mobject.geometry import Rectanglefrom ...mobject.geometry import RoundedRectanglefrom ...mobject.types.vectorized_mobject import VGroupfrom ...mobject.types.vectorized_mobject import VMobject-from ...utils.color import *---def string_to_numbers(num_string):- num_string = num_string.replace("-", ",-")- num_string = num_string.replace("e,-", "e-")- return [float(s) for s in re.split("[ ,]", num_string) if s != ""]class SVGMobject(VMobject):@@ -46,7 +43,6 @@ class SVGMobject(VMobject):self.play(FadeIn(SVGMobject("manim-logo-sidebar.svg")))-Parameters--------file_name : :class:`str`@@ -81,6 +77,7 @@ class SVGMobject(VMobject):fill_opacity=1.0,**kwargs,):+ self.def_id_to_mobject = {}self.file_name = file_name or self.file_nameself.ensure_valid_file()self.should_center = should_center@@ -126,116 +123,142 @@ class SVGMobject(VMobject):the SVGMobject's points from XML tags, populating self.mobjects, andany submobjects within self.mobjects."""- doc = minidom.parse(self.file_path)- self.ref_to_element = {}+ doc = minidom_parse(self.file_path)for svg in doc.getElementsByTagName("svg"):- mobjects = self.get_mobjects_from(svg)+ mobjects = self.get_mobjects_from(+ svg,+ # these are the default styling specifications for SVG images,+ # according to https://www.w3.org/TR/SVG/painting.html, ctrl-F for "initial"+ {+ "fill": "black",+ "fill-opacity": "1",+ "stroke": "none",+ "stroke-opacity": "1",+ },+ )if self.unpack_groups:self.add(*mobjects)else:self.add(*mobjects[0].submobjects)doc.unlink()- def get_mobjects_from(self, element):+ def get_mobjects_from(+ self,+ element: MinidomElement,+ inherited_style: Dict[str, str],+ within_defs: bool = False,+ ) -> List[VMobject]:"""Parses a given SVG element into a Mobject.Parameters----------- element : :class:`str`+ element : :class:`Element`The SVG data in the XML to be parsed.+ inherited_style : :class:`dict`+ Dictionary of the SVG attributes for children to inherit.++ within_defs : :class:`bool`+ Whether ``element`` is within a ``defs`` element, which indicates+ whether elements with `id` attributes should be added to the+ definitions list.+Returns-------- VMobject+ List[VMobject]A VMobject representing the associated SVG element."""+result = []- if not isinstance(element, minidom.Element):+ # First, let all non-elements pass (like text entries)+ if not isinstance(element, MinidomElement):return result- if element.tagName == "defs":- self.update_ref_to_element(element)- elif element.tagName == "style":++ style = cascade_element_style(element, inherited_style)+ is_defs = element.tagName == "defs"++ if element.tagName == "style":pass # TODO, handle style- elif element.tagName in ["g", "svg", "symbol"]:+ elif element.tagName in ["g", "svg", "symbol", "defs"]:result += it.chain(- *[self.get_mobjects_from(child) for child in element.childNodes]+ *[+ self.get_mobjects_from(child, style, within_defs or is_defs)+ for child in element.childNodes+ ])elif element.tagName == "path":temp = element.getAttribute("d")if temp != "":- result.append(self.path_string_to_mobject(temp))+ result.append(self.path_string_to_mobject(temp, style))elif element.tagName == "use":+ # note, style is not passed down to "use" elementsresult += self.use_to_mobjects(element)elif element.tagName == "rect":- result.append(self.rect_to_mobject(element))+ result.append(self.rect_to_mobject(element, style))elif element.tagName == "circle":- result.append(self.circle_to_mobject(element))+ result.append(self.circle_to_mobject(element, style))elif element.tagName == "ellipse":- result.append(self.ellipse_to_mobject(element))+ result.append(self.ellipse_to_mobject(element, style))elif element.tagName in ["polygon", "polyline"]:- result.append(self.polygon_to_mobject(element))+ result.append(self.polygon_to_mobject(element, style))else:pass # TODO- # warnings.warn("Unknown element type: " + element.tagName)+result = [m for m in result if m is not None]self.handle_transforms(element, VGroup(*result))if len(result) > 1 and not self.unpack_groups:result = [VGroup(*result)]- return result-- def g_to_mobjects(self, g_element):- """Converts the ``g`` SVG element into VMobjects.+ if within_defs and element.hasAttribute("id"):+ self.def_id_to_mobject[element.getAttribute("id")] = result+ if is_defs:+ # defs shouldn't be part of the result tree, only the id dictionary.+ return []- Parameters- ----------- g_element : :class:`str`- A ``g`` element is a group of other SVG elements. As such a ``g`` element is equivalent to a VGroup.-- Returns- -------- List[VMobject]- A list of VMobject represented by the group.- """- mob = VGroup(*self.get_mobjects_from(g_element))- self.handle_transforms(g_element, mob)- return mob.submobjects+ return result- def path_string_to_mobject(self, path_string):+ def path_string_to_mobject(self, path_string: str, style: dict):"""Converts a SVG path element's ``d`` attribute to a mobject.Parameters----------- path_string : str+ path_string : :class:`str`A path with potentially multiple path commands to create a shape.+ style : :class:`dict`+ Style specification, using the SVG names for properties.+Returns-------VMobjectFromSVGPathstringA VMobject from the given path string, or d attribute."""- return VMobjectFromSVGPathstring(path_string)+ return SVGPathMobject(path_string, **parse_style(style))- def use_to_mobjects(self, use_element):- """Converts a SVG <use> element to VMobject.+ def use_to_mobjects(self, use_element: MinidomElement) -> List[VMobject]:+ """Converts a SVG <use> element to a collection of VMobjects.Parameters----------- use_element : str+ use_element : :class:`MinidomElement`An SVG <use> element which represents nodes that should beduplicated elsewhere.Returns-------- VMobject- A VMobject+ List[VMobject]+ A collection of VMobjects that are copies of the defined objects"""+# Remove initial "#" characterref = use_element.getAttribute("xlink:href")[1:]- if ref not in self.ref_to_element:- warnings.warn("%s not recognized" % ref)- return VGroup()- return self.get_mobjects_from(self.ref_to_element[ref])++ try:+ return [i.copy() for i in self.def_id_to_mobject[ref]]+ except KeyError:+ warning_text = f"{self.file_name} contains a reference to id #{ref}, which is not recognized"+ warnings.warn(warning_text)+ return []def attribute_to_float(self, attr):"""A helper method which converts the attribute to float.@@ -255,36 +278,42 @@ class SVGMobject(VMobject):)return float(stripped_attr)- def polygon_to_mobject(self, polygon_element):+ def polygon_to_mobject(self, polygon_element: MinidomElement, style: dict):"""Constructs a VMobject from a SVG <polygon> element.Parameters----------- polygon_element : str+ polygon_element : :class:`minidom.Element`An SVG polygon element.+ style : :class:`dict`+ Style specification, using the SVG names for properties.+Returns-------VMobjectFromSVGPathstringA VMobject representing the polygon."""- # TODO, This seems hacky... yes it is.- path_string = polygon_element.getAttribute("points")+ # This seems hacky... yes it is.+ path_string = polygon_element.getAttribute("points").lstrip()for digit in string.digits:path_string = path_string.replace(" " + digit, " L" + digit)path_string = "M" + path_string- return self.path_string_to_mobject(path_string)+ if polygon_element.tagName == "polygon":+ path_string = path_string + "Z"+ return self.path_string_to_mobject(path_string, style)- # <circle class="st1" cx="143.8" cy="268" r="22.6"/>-- def circle_to_mobject(self, circle_element):+ def circle_to_mobject(self, circle_element: MinidomElement, style: dict):"""Creates a Circle VMobject from a SVG <circle> command.Parameters----------- circle_element : str+ circle_element : :class:`minidom.Element`A SVG circle path command.+ style : :class:`dict`+ Style specification, using the SVG names for properties.+Returns-------Circle@@ -296,17 +325,20 @@ class SVGMobject(VMobject):else 0.0for key in ("cx", "cy", "r")]- return Circle(radius=r).shift(x * RIGHT + y * DOWN)+ return Circle(radius=r, **parse_style(style)).shift(x * RIGHT + y * DOWN)- def ellipse_to_mobject(self, circle_element):+ def ellipse_to_mobject(self, circle_element: MinidomElement, style: dict):"""Creates a stretched Circle VMobject from a SVG <circle> pathcommand.Parameters----------- circle_element : str+ circle_element : :class:`minidom.Element`A SVG circle path command.+ style : :class:`dict`+ Style specification, using the SVG names for properties.+Returns-------Circle@@ -318,42 +350,33 @@ class SVGMobject(VMobject):else 0.0for key in ("cx", "cy", "rx", "ry")]- return Circle().scale(rx * RIGHT + ry * UP).shift(x * RIGHT + y * DOWN)+ return (+ Circle(**parse_style(style))+ .scale(rx * RIGHT + ry * UP)+ .shift(x * RIGHT + y * DOWN)+ )- def rect_to_mobject(self, rect_element):+ def rect_to_mobject(self, rect_element: MinidomElement, style: dict):"""Converts a SVG <rect> command to a VMobject.Parameters----------- rect_element : str+ rect_element : minidom.ElementA SVG rect path command.+ style : dict+ Style specification, using the SVG names for properties.+Returns-------RectangleCreates either a Rectangle, or RoundRectangle, VMobject from arect element."""- fill_color = rect_element.getAttribute("fill")- stroke_color = rect_element.getAttribute("stroke")+stroke_width = rect_element.getAttribute("stroke-width")corner_radius = rect_element.getAttribute("rx")- # input preprocessing- if fill_color in ["", "none", "#FFF", "#FFFFFF"] or Color(fill_color) == Color(- WHITE- ):- opacity = 0- fill_color = BLACK # shouldn't be necessary but avoids error msgs- if fill_color in ["#000", "#000000"]:- fill_color = WHITE- if stroke_color in ["", "none", "#FFF", "#FFFFFF"] or Color(- stroke_color- ) == Color(WHITE):- stroke_width = 0- stroke_color = BLACK- if stroke_color in ["#000", "#000000"]:- stroke_color = WHITEif stroke_width in ["", "none", "0"]:stroke_width = 0@@ -367,19 +390,15 @@ class SVGMobject(VMobject):width=self.attribute_to_float(rect_element.getAttribute("width")),height=self.attribute_to_float(rect_element.getAttribute("height")),stroke_width=stroke_width,- stroke_color=stroke_color,- fill_color=fill_color,- fill_opacity=opacity,+ **parse_style(style),)else:mob = RoundedRectangle(width=self.attribute_to_float(rect_element.getAttribute("width")),height=self.attribute_to_float(rect_element.getAttribute("height")),stroke_width=stroke_width,- stroke_color=stroke_color,- fill_color=fill_color,- fill_opacity=opacity,corner_radius=corner_radius,+ **parse_style(style),)mob.shift(mob.get_center() - mob.get_corner(UP + LEFT))@@ -391,29 +410,25 @@ class SVGMobject(VMobject):Parameters----------- element : str+ element : :class:`minidom.Element`The transform command to perform- mobject : Mobject+ mobject : :class:`Mobject`The Mobject to transform."""- x, y = 0, 0- try:++ if element.hasAttribute("x") and element.hasAttribute("y"):x = self.attribute_to_float(element.getAttribute("x"))# Flip yy = -self.attribute_to_float(element.getAttribute("y"))mobject.shift(x * RIGHT + y * UP)- except:- passtransform = element.getAttribute("transform")+ suffix = ")"- try: # transform matrix- prefix = "matrix("- suffix = ")"- if not transform.startswith(prefix) or not transform.endswith(suffix):- raise Exception()- transform = transform[len(prefix) : -len(suffix)]+ # Transform matrix+ if transform.startswith("matrix(") and transform.endswith(suffix):+ transform = transform[len("matrix(") : -len(suffix)]transform = string_to_numbers(transform)transform = np.array(transform).reshape([3, 2])x = transform[2][0]@@ -426,15 +441,9 @@ class SVGMobject(VMobject):for mob in mobject.family_members_with_points():mob.points = np.dot(mob.points, matrix)mobject.shift(x * RIGHT + y * UP)- except:- pass-- try: # transform scale- prefix = "scale("- suffix = ")"- if not transform.startswith(prefix) or not transform.endswith(suffix):- raise Exception()- transform = transform[len(prefix) : -len(suffix)]++ elif transform.startswith("scale(") and transform.endswith(suffix):+ transform = transform[len("scale(") : -len(suffix)]scale_values = string_to_numbers(transform)if len(scale_values) == 2:scale_x, scale_y = scale_values@@ -442,20 +451,11 @@ class SVGMobject(VMobject):elif len(scale_values) == 1:scale = scale_values[0]mobject.scale(np.array([scale, scale, 1]), about_point=ORIGIN)- except:- pass-- try: # transform translate- prefix = "translate("- suffix = ")"- if not transform.startswith(prefix) or not transform.endswith(suffix):- raise Exception()- transform = transform[len(prefix) : -len(suffix)]++ elif transform.startswith("translate(") and transform.endswith(suffix):+ transform = transform[len("translate(") : -len(suffix)]x, y = string_to_numbers(transform)mobject.shift(x * RIGHT + y * DOWN)- except:- pass- # TODO, ...def flatten(self, input_list):"""A helper method to flatten the ``input_list`` into an 1D array."""@@ -467,41 +467,6 @@ class SVGMobject(VMobject):output_list.append(i)return output_list- def get_all_childNodes_have_id(self, element):- """Gets all child nodes containing the `id` attribute and returns- them in a flattened list.-- Parameters- --------- element : :class:`str`- An element from SVG XML data. Elements use a unique `id`.-- Returns- -------- List[DOM element]- A flattened list of DOM elements containing the `id` attribute.- """- all_childNodes_have_id = []- if not isinstance(element, minidom.Element):- return- if element.hasAttribute("id") and element.tagName not in ("g", "defs"):- return [element]- for e in element.childNodes:- all_childNodes_have_id.append(self.get_all_childNodes_have_id(e))- return self.flatten([e for e in all_childNodes_have_id if e])-- def update_ref_to_element(self, defs):- """Updates the ``ref_to_element`` dictionary.- Parameters- --------- defs : :class:`defs`- The new defs- """- new_refs = dict(- [(e.getAttribute("id"), e) for e in self.get_all_childNodes_have_id(defs)]- )- self.ref_to_element.update(new_refs)-def move_into_position(self, width, height):"""Uses the SVGMobject's config dictionary to set the Mobject'swidth, height, and/or center it. Use ``width``, ``height``, and@@ -514,136 +479,5 @@ class SVGMobject(VMobject):if width is not None:self.width = width--class VMobjectFromSVGPathstring(VMobject):- def __init__(self, path_string, **kwargs):- self.path_string = path_string- VMobject.__init__(self, **kwargs)-- def get_path_commands(self):- """Returns a list of possible path commands used within an SVG ``d``- attribute.-- See: https://svgwg.org/svg2-draft/paths.html#DProperty for further- details on what each path command does.-- Returns- -------- List[:class:`str`]- The various upper and lower cased path commands.- """- result = [- "M", # moveto- "L", # lineto- "H", # horizontal lineto- "V", # vertical lineto- "C", # curveto- "S", # smooth curveto- "Q", # quadratic Bezier curve- "T", # smooth quadratic Bezier curveto- "A", # elliptical Arc- "Z", # closepath- ]- result += [s.lower() for s in result]- return result-- def generate_points(self):- """Generates points from a given an SVG ``d`` attribute."""- pattern = "[%s]" % ("".join(self.get_path_commands()))- pairs = list(- zip(- re.findall(pattern, self.path_string),- re.split(pattern, self.path_string)[1:],- )- )- # Which mobject should new points be added to- self = self- for command, coord_string in pairs:- self.handle_command(command, coord_string)- # people treat y-coordinate differently- self.rotate(np.pi, RIGHT, about_point=ORIGIN)-- def handle_command(self, command, coord_string):- """Core logic for handling each of the various path commands."""- isLower = command.islower()- command = command.upper()- # new_points are the points that will be added to the curr_points- # list. This variable may get modified in the conditionals below.- points = self.points- new_points = self.string_to_points(coord_string)-- if isLower and len(points) > 0:- new_points += points[-1]-- if command == "M": # moveto- self.start_new_path(new_points[0])- if len(new_points) <= 1:- return-- # Draw relative line-to values.- points = self.points- new_points = new_points[1:]- command = "L"-- for p in new_points:- if isLower:- # Treat everything as relative line-to until empty- p[0] += self.points[-1, 0]- p[1] += self.points[-1, 1]- self.add_line_to(p)- return-- elif command in ["L", "H", "V"]: # lineto- if command == "H":- new_points[0, 1] = points[-1, 1]- elif command == "V":- if isLower:- new_points[0, 0] -= points[-1, 0]- new_points[0, 0] += points[-1, 1]- new_points[0, 1] = new_points[0, 0]- new_points[0, 0] = points[-1, 0]- self.add_line_to(new_points[0])- return-- if command == "C": # curveto- pass # Yay! No action required- elif command in ["S", "T"]: # smooth curveto- self.add_smooth_curve_to(*new_points)- # handle1 = points[-1] + (points[-1] - points[-2])- # new_points = np.append([handle1], new_points, axis=0)- return- elif command == "Q": # quadratic Bezier curve- # TODO, this is a suboptimal approximation- new_points = np.append([new_points[0]], new_points, axis=0)- elif command == "A": # elliptical Arc- raise NotImplementedError()- elif command == "Z": # closepath- return-- # Add first three points- self.add_cubic_bezier_curve_to(*new_points[0:3])-- # Handle situations where there's multiple relative control points- if len(new_points) > 3:- # Add subsequent offset points relatively.- for i in range(3, len(new_points), 3):- if isLower:- new_points[i : i + 3] -= points[-1]- new_points[i : i + 3] += new_points[i - 1]- self.add_cubic_bezier_curve_to(*new_points[i : i + 3])-- def string_to_points(self, coord_string):- """Since the SVG file's path command is provided as a string, this- converts the coordinates into numbers.- """- numbers = string_to_numbers(coord_string)- if len(numbers) % 2 == 1:- numbers.append(0)- num_points = len(numbers) // 2- result = np.zeros((num_points, self.dim))- result[:, :2] = np.array(numbers).reshape((num_points, 2))- return result-- def get_original_path_string(self):- """A simple getter for the path's ``d`` attribute."""- return self.path_string+ def init_colors(self, propagate_colors=False):+ VMobject.init_colors(self, propagate_colors=propagate_colors)diff --git a/manim/mobject/svg/svg_path.py b/manim/mobject/svg/svg_path.pynew file mode 100644index 000000000..836932d2d--- /dev/null+++ b/manim/mobject/svg/svg_path.py@@ -0,0 +1,248 @@+"""Mobjects generated from an SVG pathstring."""+++__all__ = ["SVGPathMobject", "string_to_numbers", "VMobjectFromSVGPathstring"]+++import re++from typing import List++from manim import logger++from ...constants import *+from ...mobject.types.vectorized_mobject import VMobject+++def string_to_numbers(num_string: str) -> List[float]:+ """Parse the SVG string representing a sequence of numbers into an array of floats.++ Parameters+ ----------+ num_string : :class:`str`+ String representing a sequence of numbers, separated by commas, spaces, etc.++ Returns+ -------+ list(float)+ List of float values parsed out of the string.+ """+ num_string = num_string.replace("-", ",-")+ num_string = num_string.replace("e,-", "e-")+ float_results = []+ for s in re.split("[ ,]", num_string):+ if s != "":+ try:+ float_results.append(float(s))+ except ValueError:+ # in this case, it's something like "2.4.3.14 which should be parsed as "2.4 0.3 0.14"+ undotted_parts = s.split(".")+ float_results.append(undotted_parts[0] + "." + undotted_parts[1])+ float_results += ["." + u for u in undotted_parts[2:]]+ return float_results+++class SVGPathMobject(VMobject):+ def __init__(self, path_string, **kwargs):+ self.path_string = path_string+ VMobject.__init__(self, **kwargs)+ self.current_path_start = np.zeros((1, self.dim))++ def get_path_commands(self):+ """Returns a list of possible path commands used within an SVG ``d``+ attribute.++ See: https://svgwg.org/svg2-draft/paths.html#DProperty for further+ details on what each path command does.++ Returns+ -------+ List[:class:`str`]+ The various upper and lower cased path commands.+ """+ result = [+ "M", # moveto+ "L", # lineto+ "H", # horizontal lineto+ "V", # vertical lineto+ "C", # curveto+ "S", # smooth curveto+ "Q", # quadratic Bezier curve+ "T", # smooth quadratic Bezier curveto+ "A", # elliptical Arc+ "Z", # closepath+ ]+ result += [s.lower() for s in result]+ return result++ def generate_points(self):+ """Generates points from a given an SVG ``d`` attribute."""+ pattern = "[%s]" % ("".join(self.get_path_commands()))+ pairs = list(+ zip(+ re.findall(pattern, self.path_string),+ re.split(pattern, self.path_string)[1:],+ )+ )+ # Which mobject should new points be added to+ prev_command = None+ for command, coord_string in pairs:+ self.handle_command(command, coord_string, prev_command)+ prev_command = command+ # people treat y-coordinate differently+ self.rotate(np.pi, RIGHT, about_point=ORIGIN)++ def handle_command(self, command, coord_string, prev_command):+ """Core logic for handling each of the various path commands."""+ # Relative SVG commands are specified as lowercase letters+ is_relative = command.islower()+ command = command.upper()++ # Keep track of the most recently completed point+ start_point = (+ self.points[-1] if self.points.shape[0] else np.zeros((1, self.dim))+ )++ # Produce the (absolute) coordinates of the controls and handles+ new_points = self.string_to_points(+ command, is_relative, coord_string, start_point+ )++ if command == "M": # moveto+ self.start_new_path(new_points[0])+ for p in new_points[1:]:+ self.add_line_to(p)+ return++ elif command in ["H", "V", "L"]: # lineto of any kind+ for p in new_points:+ self.add_line_to(p)+ return++ elif command == "C": # Cubic+ # points must be added in groups of 3.+ for i in range(0, len(new_points), 3):+ self.add_cubic_bezier_curve_to(*new_points[i : i + 3])+ return++ elif command == "S": # Smooth cubic+ prev_handle = start_point+ if prev_command.upper() in ["C", "S"]:+ prev_handle = self.points[-2]+ for i in range(0, len(new_points), 2):+ new_handle = 2 * start_point - prev_handle+ self.add_cubic_bezier_curve_to(+ new_handle, new_points[i], new_points[i + 1]+ )+ start_point = new_points[i + 1]+ prev_handle = new_points[i]+ return++ elif command == "Q": # quadratic Bezier curve+ for i in range(0, len(new_points), 2):+ self.add_quadratic_bezier_curve_to(new_points[i], new_points[i + 1])+ return++ elif command == "T": # smooth quadratic+ prev_quad_handle = start_point+ if prev_command.upper() in ["Q", "T"]:+ # because of the conversion from quadratic to cubic,+ # our actual previous handle was 3/2 in the direction of p[-2] from p[-1]+ prev_quad_handle = 1.5 * self.points[-2] - 0.5 * self.points[-1]+ for p in new_points:+ new_quad_handle = 2 * start_point - prev_quad_handle+ self.add_quadratic_bezier_curve_to(new_quad_handle, p)+ start_point = p+ prev_quad_handle = new_quad_handle++ elif command == "A": # elliptical Arc+ raise NotImplementedError()++ elif command == "Z": # closepath+ self.add_line_to(self.current_path_start)+ return++ def string_to_points(self, command, is_relative, coord_string, start_point):+ """Convert an SVG command string into a sequence of absolute-positioned control points.++ Parameters+ -----+ command : `str`+ A string containing a single uppercase letter representing the SVG command.++ is_relative : `bool`+ Whether the command is relative to the end of the previous command++ coord_string : `str`+ A string that contains many comma- or space-separated numbers that defined the control points. Different+ commands require different numbers of numbers as arguments.++ start_point : `ndarray`+ If the command is relative, the position to begin the relations from.+ """++ # this call to "string to numbers" where problems like parsing 0.5.6 lie+ numbers = string_to_numbers(coord_string)++ # H and V expect a sequence of single coords, not coord pairs like the rest of the commands.+ if command == "H":+ result = np.zeros((len(numbers), self.dim))+ result[:, 0] = numbers+ if not is_relative:+ result[:, 1] = start_point[1]++ elif command == "V":+ result = np.zeros((len(numbers), self.dim))+ result[:, 1] = numbers+ if not is_relative:+ result[:, 0] = start_point[0]++ elif command == "A":+ raise NotImplementedError("Arcs are not implemented.")++ else:+ num_points = len(numbers) // 2+ result = np.zeros((num_points, self.dim))+ result[:, :2] = np.array(numbers).reshape((num_points, 2))++ # If it's not relative, we don't have any more work!+ if not is_relative:+ return result++ # Each control / target point is calculated relative to the ending position of the previous curve.+ # Curves consist of multiple point listings depending on the command.+ entries = 1+ # Quadratic curves expect pairs, S expects 3 (cubic) but one is implied by smoothness+ if command in ["Q", "S"]:+ entries = 2+ # Only cubic curves expect three points.+ elif command == "C":+ entries = 3++ offset = start_point+ for i in range(result.shape[0]):+ result[i, :] = result[i, :] + offset+ if (i + 1) % entries == 0:+ offset = result[i, :]++ return result++ def get_original_path_string(self):+ """A simple getter for the path's ``d`` attribute."""+ return self.path_string++ def start_new_path(self, point):+ self.current_path_start = point+ super().start_new_path(point)+ return self+++class VMobjectFromSVGPathstring(SVGPathMobject):+ """Pure alias of SVGPathMobject, retained for backwards compatibility"""++ def __init__(self, *args, **kwargs):+ logger.warning(+ "VMobjectFromSVGPathstring has been deprecated in favour "+ "of SVGPathMobject. Please use SVGPathMobject instead."+ )+ SVGPathMobject.__init__(self, *args, **kwargs)diff --git a/manim/mobject/svg/tex_mobject.py b/manim/mobject/svg/tex_mobject.pyindex 9f9ab0ea6..624fbb59b 100644--- a/manim/mobject/svg/tex_mobject.py+++ b/manim/mobject/svg/tex_mobject.py@@ -171,11 +171,12 @@ __all__ = [from functools import reduceimport operator as op+from .style_utils import parse_stylefrom ... import config, loggerfrom ...constants import *from ...mobject.geometry import Linefrom ...mobject.svg.svg_mobject import SVGMobject-from ...mobject.svg.svg_mobject import VMobjectFromSVGPathstring+from ...mobject.svg.svg_path import SVGPathMobjectfrom ...mobject.types.vectorized_mobject import VGroupfrom ...mobject.types.vectorized_mobject import VectorizedPointfrom ...utils.strings import split_string_list_to_isolate_substrings@@ -186,8 +187,8 @@ from ...utils.tex import TexTemplateTEX_MOB_SCALE_FACTOR = 0.05-class TexSymbol(VMobjectFromSVGPathstring):- """Purely a renaming of VMobjectFromSVGPathstring."""+class TexSymbol(SVGPathMobject):+ """Purely a renaming of SVGPathMobject."""pass@@ -326,15 +327,18 @@ class SingleStringMathTex(SVGMobject):def get_tex_string(self):return self.tex_string- def path_string_to_mobject(self, path_string):+ def path_string_to_mobject(self, path_string, style):# Overwrite superclass default to use# specialized path_string mobject- return TexSymbol(path_string, z_index=self.z_index)+ return TexSymbol(path_string, z_index=self.z_index, **parse_style(style))def organize_submobjects_left_to_right(self):self.sort(lambda p: p[0])return self+ def init_colors(self, propagate_colors=True):+ SVGMobject.init_colors(self, propagate_colors=propagate_colors)+class MathTex(SingleStringMathTex):r"""A string compiled with LaTeX in math mode.diff --git a/manim/mobject/svg/text_mobject.py b/manim/mobject/svg/text_mobject.pyindex 9bc504dc9..83a273a30 100644--- a/manim/mobject/svg/text_mobject.py+++ b/manim/mobject/svg/text_mobject.py@@ -61,7 +61,6 @@ import manimpangofrom manimpango import MarkupUtils, PangoUtils, TextSettingfrom ... import config, logger-from ..._config.utils import ManimConfigfrom ...constants import *from ...mobject.geometry import Dotfrom ...mobject.svg.svg_mobject import SVGMobject@@ -964,6 +963,9 @@ class Text(SVGMobject):self.text,)+ def init_colors(self, propagate_colors=True):+ SVGMobject.init_colors(self, propagate_colors=propagate_colors)+class MarkupText(SVGMobject):r"""Display (non-LaTeX) text rendered using `Pango <https://pango.gnome.org/>`_.@@ -1385,6 +1387,9 @@ class MarkupText(SVGMobject):self.text = re.sub("<color[^>]+>(.+?)</color>", r"\1", self.text, 0, re.S)return colormap+ def init_colors(self, propagate_colors=True):+ SVGMobject.init_colors(self, propagate_colors=propagate_colors)+def __repr__(self):return f"MarkupText({repr(self.original_text)})"diff --git a/manim/mobject/types/vectorized_mobject.py b/manim/mobject/types/vectorized_mobject.pyindex 7baa03862..357bae570 100644--- a/manim/mobject/types/vectorized_mobject.py+++ b/manim/mobject/types/vectorized_mobject.py@@ -102,25 +102,34 @@ class VMobject(Mobject):return VGroup# Colors- def init_colors(self):+ def init_colors(self, propagate_colors=True):self.set_fill(color=self.fill_color or self.color,opacity=self.fill_opacity,+ family=propagate_colors,)self.set_stroke(color=self.stroke_color or self.color,width=self.stroke_width,opacity=self.stroke_opacity,+ family=propagate_colors,)self.set_background_stroke(color=self.background_stroke_color,width=self.background_stroke_width,opacity=self.background_stroke_opacity,+ family=propagate_colors,)self.set_sheen(factor=self.sheen_factor,direction=self.sheen_direction,+ family=propagate_colors,)++ if not propagate_colors:+ for submobject in self.submobjects:+ submobject.init_colors(propagate_colors=False)+return selfdef generate_rgbas_array(self, color, opacity):@@ -520,6 +529,24 @@ class VMobject(Mobject):else:self.append_points([self.get_last_point()] + new_points)+ def add_quadratic_bezier_curve_to(+ self, handle: np.ndarray, anchor: np.ndarray+ ) -> "VMobject":+ """Add Quadratic bezier curve to the path."""+ # How does one approximate a quadratic with a cubic?+ # refer to the Wikipedia page on Bezier curves+ # https://en.wikipedia.org/wiki/B%C3%A9zier_curve#Degree_elevation, accessed Jan 20, 2021+ # 1. Copy the end points, and then+ # 2. Place the 2 middle control points 2/3 along the line segments+ # from the end points to the quadratic curve's middle control point.+ # I think that's beautiful.+ self.add_cubic_bezier_curve_to(+ 2 / 3 * handle + 1 / 3 * self.get_last_point(),+ 2 / 3 * handle + 1 / 3 * anchor,+ anchor,+ )+ return self+def add_line_to(self, point: np.ndarray) -> "VMobject":"""Add a straight line from the last point of VMobject to the given point.diff --git a/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npz b/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npznew file mode 100644index 000000000..74fe68e35Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/BrachistochroneCurveTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npznew file mode 100644index 000000000..971a67190Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ContiguousUSMapTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npznew file mode 100644index 000000000..524c1b2bdBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/CubicAndLinetoTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npznew file mode 100644index 000000000..5b89171deBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/CubicPathTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npz b/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npznew file mode 100644index 000000000..7b32d5390Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/DesmosGraph1Test.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npz b/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npznew file mode 100644index 000000000..b7be104f9Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/FancyGTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npz b/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npznew file mode 100644index 000000000..694545d43Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/InheritanceTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npznew file mode 100644index 000000000..0210c3355Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/LogoTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npznew file mode 100644index 000000000..13bdf4591Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/MSModelTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npz b/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npznew file mode 100644index 000000000..f542cf56fBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/ManimLogoTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npznew file mode 100644index 000000000..37a85b8b6Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/MultiPartPathTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npz b/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npznew file mode 100644index 000000000..e82446499Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/PenroseTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npz b/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npznew file mode 100644index 000000000..da165e7d4Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/PixelizedTextTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npz b/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npznew file mode 100644index 000000000..c9a116799Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/QuadraticPathTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npz b/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npznew file mode 100644index 000000000..d5f463009Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/RhomboidTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/SVGMobjectTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SVGMobjectTest.npzdeleted file mode 100644index e18a32c5f..000000000Binary files a/tests/control_data/graphical_units_data/img_and_svg/SVGMobjectTest.npz and /dev/null differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npznew file mode 100644index 000000000..ba975d6bcBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SingleUSStateTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npz b/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npznew file mode 100644index 000000000..a729e259dBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/SmoothCurvesTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npz b/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npznew file mode 100644index 000000000..040892b06Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/StarchTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npz b/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npznew file mode 100644index 000000000..c0cfe42aaBinary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/UKFlagTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npz b/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npznew file mode 100644index 000000000..a497d38a0Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/VideoIconTest.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz b/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npznew file mode 100644index 000000000..9ed274738Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/WatchTheDecimals.npz differdiff --git a/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npz b/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npznew file mode 100644index 000000000..fe7755562Binary files /dev/null and b/tests/control_data/graphical_units_data/img_and_svg/WeightSVGTest.npz differdiff --git a/tests/test_graphical_units/img_svg_resources/cubic_and_lineto.svg b/tests/test_graphical_units/img_svg_resources/cubic_and_lineto.svgnew file mode 100644index 000000000..8bab5e5ea--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/cubic_and_lineto.svg@@ -0,0 +1,6 @@+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">+<g>+ <path style="fill:white" d="m 50,50 c 0,10 10,0 10,10 -10,0 0,10, -10,10 l -5,5 0,-30 z">+ </path>+</g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/cubic_demo.svg b/tests/test_graphical_units/img_svg_resources/cubic_demo.svgnew file mode 100644index 000000000..2c6bf004d--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/cubic_demo.svg@@ -0,0 +1,6 @@+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" style="fill:white">+<g>+ <path d="m 50,50 c 0,10 10,0 10,10 -10,0 0,10, -10,10 z">+ </path>+</g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/curve.svg b/tests/test_graphical_units/img_svg_resources/curve.svgnew file mode 100644index 000000000..0ccb1e35a--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/curve.svg@@ -0,0 +1,67 @@+<?xml version="1.0" encoding="windows-1252" standalone="no"?>+<svg+ width="1200" height="600"+ viewBox="0 0 1200 600"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink"+>++<title>Gnuplot</title>+<desc>Produced by GNUPLOT 5.2 patchlevel 7 </desc>++<g id="gnuplot_canvas">++<rect x="0" y="0" width="1200" height="600" fill="none"/>+<defs>++ <circle id='gpDot' r='0.5' stroke-width='0.5' stroke='white'/>+ <path id='gpPt0' stroke-width='0.222' stroke='white' d='M-1,0 h2 M0,-1 v2'/>+ <path id='gpPt1' stroke-width='0.222' stroke='white' d='M-1,-1 L1,1 M1,-1 L-1,1'/>+ <path id='gpPt2' stroke-width='0.222' stroke='white' d='M-1,0 L1,0 M0,-1 L0,1 M-1,-1 L1,1 M-1,1 L1,-1'/>+ <rect id='gpPt3' stroke-width='0.222' stroke='white' x='-1' y='-1' width='2' height='2'/>+ <rect id='gpPt4' stroke-width='0.222' stroke='white' fill='white' x='-1' y='-1' width='2' height='2'/>+ <circle id='gpPt5' stroke-width='0.222' stroke='white' cx='0' cy='0' r='1'/>+ <use xlink:href='#gpPt5' id='gpPt6' fill='white' stroke='none'/>+ <path id='gpPt7' stroke-width='0.222' stroke='white' d='M0,-1.33 L-1.33,0.67 L1.33,0.67 z'/>+ <use xlink:href='#gpPt7' id='gpPt8' fill='white' stroke='none'/>+ <use xlink:href='#gpPt7' id='gpPt9' stroke='white' transform='rotate(180)'/>+ <use xlink:href='#gpPt9' id='gpPt10' fill='white' stroke='none'/>+ <use xlink:href='#gpPt3' id='gpPt11' stroke='white' transform='rotate(45)'/>+ <use xlink:href='#gpPt11' id='gpPt12' fill='white' stroke='none'/>+ <path id='gpPt13' stroke-width='0.222' stroke='white' d='M0,1.330 L1.265,0.411 L0.782,-1.067 L-0.782,-1.076 L-1.265,0.411 z'/>+ <use xlink:href='#gpPt13' id='gpPt14' fill='white' stroke='none'/>+ <filter id='textbox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>+ <feFlood flood-color='white' flood-opacity='1' result='bgnd'/>+ <feComposite in='SourceGraphic' in2='bgnd' operator='atop'/>+ </filter>+ <filter id='greybox' filterUnits='objectBoundingBox' x='0' y='0' height='1' width='1'>+ <feFlood flood-color='lightgrey' flood-opacity='1' result='grey'/>+ <feComposite in='SourceGraphic' in2='grey' operator='atop'/>+ </filter>+</defs>+<g fill="none" color="white" stroke="white" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+<g fill="none" color="black" stroke="white" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+<g fill="none" color="black" stroke="white" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+ <g id="gnuplot_plot_1" ><title>7.65*(t-sin(t)), 7.65*(cos(t)-1)</title>+<g fill="none" color="black" stroke="white" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+ <path stroke='rgb(148, 0, 211)' d='M154.5,18.1 L154.5,18.9 L154.7,21.5 L155.1,25.7 L155.9,31.5 L157.2,38.9 L159.1,47.9 L161.8,58.5+ L165.4,70.4 L170.0,83.7 L175.6,98.4 L182.4,114.2 L190.5,131.2 L199.9,149.1 L210.7,168.0 L223.1,187.6+ L237.0,208.0 L252.4,228.9 L269.5,250.2 L288.3,271.8 L308.8,293.6 L330.9,315.4 L354.7,337.2 L380.2,358.7+ L407.3,379.9 L436.1,400.6 L466.4,420.7 L498.3,440.1 L531.6,458.7 L566.3,476.3 L602.4,492.9 L639.7,508.3+ L678.1,522.5 L717.6,535.4 L758.0,546.8 L799.3,556.8 L841.2,565.3 L883.8,572.2 L926.8,577.5 L970.2,581.1+ L1013.8,583.0 L1041.2,583.2 '/></g>+ </g>+<g fill="none" color="white" stroke="rgb(148, 0, 211)" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+<g fill="none" color="black" stroke="white" stroke-width="2.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+<g fill="none" color="black" stroke="black" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+<g fill="none" color="black" stroke="white" stroke-width="1.00" stroke-linecap="butt" stroke-linejoin="miter">+</g>+</g>+</svg>+diff --git a/tests/test_graphical_units/img_svg_resources/desmos-graph_1.svg b/tests/test_graphical_units/img_svg_resources/desmos-graph_1.svgnew file mode 100644index 000000000..b9feb8fad--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/desmos-graph_1.svg@@ -0,0 +1,101 @@+<svg version="1.1"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:xlink="http://www.w3.org/1999/xlink" width="800" height="800">+ <defs/>+ <g transform="scale(2,2)">+ <g id="background-e2d54f0e">+ <rect fill="white" stroke="none" x="0" y="0" width="400" height="400" class="dcg-svg-background"/>+ </g>+ <g id="expressions-e2d54f0e">+ <g id="sketch-e2d54f0e">+ <title>Expression 1</title>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 91.85219683540701 205.78943221530992 L 91.85219683540701 205.78943221530992 L 89.85467440550892 205.61979166666666 L 87.85209555582583 205.09895833333334 L 86.07822819999599 204.31770833333331 L 84.42319929815395 203.27604166666669 L 82.74872263201425 201.84375 L 81.36632232572774 200.28125 L 80.20671843017348 198.58854166666666 L 79.24337322643422 196.76562499999997 L 78.64039917042251 195.30034509021988" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 91.85219714039845 205.78943221530992 L 91.85219714039845 205.78943221530992 L 93.84971957029653 205.61979166666666 L 95.85229841997962 205.09895833333334 L 97.62616577580945 204.31770833333331 L 99.28119467765151 203.27604166666669 L 100.95567134379121 201.84375 L 102.33807165007771 200.28125 L 103.49767554563198 198.58854166666666 L 104.46102074937123 196.76562499999997 L 105.06399480538293 195.30034509021988" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 2</title>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 65.90625 231.48091813112103 L 65.90625 231.48091813112103 L 67.84639131938438 230.94368953992304 L 68.68556057183922 230.4043105718392 L 69.421875 229.77116508395858 L 71.16834812573876 227.62500000000003 L 71.84243596646841 226.52993596646843 L 73.09849160529852 224.02887919735076 L 74.42825842764478 220.59375000000003 L 75.69175267171838 216.31675267171838 L 76.34384557944874 213.56250000000003 L 77.40087967885468 207.81518516057267 L 78.0623020933288 202.71835418665762 L 78.59578376366669 196.20280244533322 L 78.64318210419131 195.32519531250003" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 3</title>+ <path fill="#000000" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#000000" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 105.06120453769333 195.32519531250003 L 105.06120453769333 195.32519531250003 L 105.33767880118167 199.5 L 105.81727365144715 204.25477365144715 L 106.5844417412282 209.54986651754362 L 107.49357658353621 214.1626734164638 L 108.2130505387886 217.07812500000003 L 109.2761583013601 220.59375000000003 L 110.64177097109243 224.10937500000003 L 111.609375 226.07730348307015 L 112.53603174533231 227.62500000000003 L 113.64889434127846 229.10110565872156 L 115.125 230.48322101048487 L 116.2723391139002 231.140625 L 116.8828125 231.34889163869536 L 118.640625 231.412678950467 L 119.53404573523684 231.140625 L 121.13782946147715 230.12220446147717 L 122.15625 229.10264782495713 L 123.27041493249024 227.62500000000003 L 124.72044709968986 225.06080290031016 L 125.89425309879324 222.35156250000003 L 126.96560777696482 219.25076402696482 L 127.264892578125 218.2528664577144" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 4</title>+ <path fill="#2d70b3" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#2d70b3" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#2d70b3" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 127.31055546807673 218.81864408217203 L 127.31055546807673 218.81864408217203 L 127.4296875 220.55159302976807 L 127.8203125 222.37546393498306 L 128.40625 223.97136627447696 L 129.1875 225.45303946715808 L 130.1640625 226.82672803036832 L 131.43359375 228.16885213501502 L 132.99609375 229.3862620992185 L 134.75390625 230.35628871402383 L 136.51171875 230.99978225466148 L 138.3671875 231.37995843350538 L 140.22265625 231.4799070809527 L 142.078125 231.3063586309243 L 143.8359375 230.87918684087623 L 145.59375 230.1672369045281 L 147.25390625 229.18088131806576 L 148.81640625 227.8842738944464 L 150.08593750000003 226.442498714217 L 151.0625 224.93584157002553 L 151.74609375000003 223.4869515514022 L 152.234375 221.9901957049436 L 152.52734375 220.48874734279644 L 152.63795438248675 218.81864408217203" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ <g>+ <path fill="none" stroke="#2d70b3" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 127.31055546807673 218.81864408217203 L 127.31055546807673 218.81864408217203 L 127.4296875 217.085695134576 L 127.8203125 215.261824229361 L 128.40625 213.66592188986712 L 129.1875 212.18424869718598 L 130.1640625 210.81056013397577 L 131.43359375 209.46843602932907 L 132.99609375 208.2510260651256 L 134.75390625 207.28099945032025 L 136.51171875 206.6375059096826 L 138.3671875 206.2573297308387 L 140.22265625 206.15738108339136 L 142.078125 206.33092953341975 L 143.8359375 206.75810132346786 L 145.59375 207.47005125981596 L 147.25390625 208.45640684627833 L 148.81640625 209.75301426989765 L 150.08593750000003 211.19478945012708 L 151.0625 212.70144659431853 L 151.74609375000003 214.15033661294186 L 152.234375 215.64709245940048 L 152.52734375 217.14854082154764 L 152.63795438248675 218.81864408217203" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 5</title>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 150.52258312530208 207.36694312439587 L 150.52258312530208 207.36694312439587 L 151.2841537760641 211.80468750000003 L 152.17565009859774 215.82805942429889 L 153.18801815413968 219.44479434586032 L 154.19901720850694 222.35156250000003 L 154.92853767435435 224.10937500000003 L 156.05856872913571 226.37106872913571 L 157.31250000000003 228.32336554976544 L 158.62687813412606 229.82624686587397 L 159.07031250000003 230.2186123793094 L 160.98295460772317 231.29545460772314 L 162.5859375 231.46227088224725 L 164.34375 230.88466806609418 L 166.14800131734586 229.4292513173459 L 167.72806545164866 227.36238090329726 L 168.94248014697044 225.19248014697047 L 170.81710009704972 220.59375000000003 L 171.375 218.84991755410707 L 172.73266182056878 213.56250000000003 L 173.6813336673449 208.50719858468975 L 173.91568721332237 206.970703125" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 6</title>+ <path fill="#c74440" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#c74440" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 174.34715345198106 231.48234353937704 L 174.34715345198106 231.48234353937704 L 174.34715345198106 206.15494462496704" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 7</title>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 174.4918814457777 231.48234353937704 L 174.4918814457777 231.48234353937704 L 174.58842126388424 228.01562499999997 L 174.87408944951113 224.63020833333334 L 175.34215697196515 221.375 L 175.96462533952774 218.38020833333331 L 176.7278080657344 215.64583333333331 L 177.6253950342555 213.171875 L 178.59250231667127 211.08854166666666 L 179.67806758175055 209.265625 L 180.79391486999864 207.83333333333331 L 181.88470803059704 206.79166666666669 L 183.07049034244852 206.01041666666666 L 184.04310412067596 205.61979166666666 L 185.34648098052486 205.4313046559838" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 196.20108051527194 231.48234353937704 L 196.20108051527194 231.48234353937704 L 196.10454069716545 228.01562499999997 L 195.81887251153853 224.63020833333334 L 195.3508049890845 221.375 L 194.72833662152192 218.38020833333331 L 193.9651538953153 215.64583333333331 L 193.06756692679417 213.171875 L 192.10045964437836 211.08854166666666 L 191.0148943792991 209.265625 L 189.89904709105102 207.83333333333331 L 188.80825393045262 206.79166666666669 L 187.62247161860117 206.01041666666666 L 186.64985784037373 205.61979166666666 L 185.34648098052486 205.4313046559838" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 8</title>+ <path fill="#2d70b3" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#2d70b3" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 200.3981923353742 231.48234353937704 L 200.3981923353742 231.48234353937704 L 200.3981923353742 206.15494462496704" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 9</title>+ <path fill="#388c46" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#388c46" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 200.3981923353742 231.44737284577297 L 200.3981923353742 231.44737284577297 L 200.96484375 231.43950366828133 L 201.55078125000003 231.10656603447939 L 202.234375 230.3128201240879 L 202.91796875 229.11000511940492 L 203.69921875 227.28998336322164 L 204.67578125 224.47341605365162 L 206.23828125 219.21170427869964 L 208.38671875 212.06245661947196 L 209.46093750000003 209.224560692393 L 210.2421875 207.6764163090685 L 210.92578125 206.74438937100035 L 211.609375 206.24207609147817 L 212.1953125 206.16751943550776 L 212.68359375 206.3584547376204 L 213.3671875 207.00485263514702 L 214.05078125 208.07169449923188 L 214.83203125 209.75642930497833 L 215.80859375 212.4430956394052 L 217.17578125 216.92966169804095 L 219.8125 225.74820491179113 L 220.78906250000003 228.323573662213 L 221.57031250000003 229.89572007813234 L 222.25390625 230.85127272067746 L 222.9375 231.37859314534563 L 223.5234375 231.47508974863297 L 224.01171875 231.30235573298958 L 224.59765625 230.7959937516944 L 225.28124999999997 229.81049897332872 L 226.0625 228.207904265021 L 226.94140625 225.8882896804047 L 228.11328125 222.17697340115004 L 231.62890625000003 210.6290697242218 L 232.5078125 208.54616872429355 L 233.28906249999997 207.19802787130055 L 233.97265625 206.45957440314461 L 234.65625 206.1609709443715 L 235.14453124999997 206.2234994842302 L 235.73046875 206.6004638103993 L 236.4140625 207.44318909750086 L 237.09765624999997 208.69075828561472 L 237.9765625 210.8166880802958 L 239.05078125000003 214.0382146694195 L 241.00390625 220.7451434558674 L 242.56640625000003 225.8069403849979 L 243.54296874999997 228.36988196252923 L 244.32421875 229.92962049551173 L 245.00781250000006 230.8730030960564 L 245.69140625000003 231.38738011098178 L 246.13223837510887 231.48234039678167" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ <g id="sketch-e2d54f0e">+ <title>Expression 10</title>+ <path fill="#c74440" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#c74440" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#c74440" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#c74440" stroke="none" paint-order="stroke fill markers" d="" fill-opacity="0.4"/>+ <path fill="#c74440" stroke="none" class="dcg-svg-region" paint-order="stroke fill markers" d=" M 199.94052223378998 198.19490496615245 L 200.0859375 198.5295074761094 L 200.4765625 198.64581520021298 L 200.76953125 198.46242941806048 L 200.85586243695846 198.19490496615245 L 200.85586243695846 198.19490496615245 L 200.76953125 197.92738051424445 L 200.4765625 197.74399473209195 L 200.0859375 197.86030245619554 L 199.94052223378998 198.19490496615245" fill-opacity="0.4"/>+ <g>+ <path fill="none" stroke="#c74440" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 199.94052223378998 198.19490496615245 L 200.0859375 198.5295074761094 M 200.0859375 198.5295074761094 L 200.4765625 198.64581520021298 M 200.4765625 198.64581520021298 L 200.76953125 198.46242941806048 M 200.76953125 198.46242941806048 L 200.85586243695846 198.19490496615245" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ <g>+ <path fill="none" stroke="#c74440" class="dcg-svg-curve" paint-order="fill stroke markers" d=" M 199.94052223378998 198.19490496615245 L 200.0859375 197.86030245619554 M 200.0859375 197.86030245619554 L 200.4765625 197.74399473209195 M 200.4765625 197.74399473209195 L 200.76953125 197.92738051424445 M 200.76953125 197.92738051424445 L 200.85586243695846 198.19490496615245" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" stroke-width="2.5" stroke-opacity="0.7" stroke-dasharray=""/>+ </g>+ </g>+ </g>+ </g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/inheritance_test.svg b/tests/test_graphical_units/img_svg_resources/inheritance_test.svgnew file mode 100644index 000000000..d1063ada7--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/inheritance_test.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="100">+ <g fill="#4477ff">+ <path fill="#ff8800" d="M 80,45 h 25 v -5 l 10,10 -10,10 v -5 h -25 z"/>+ <path d="M 0,45 h 25 v -5 l 10,10 -10,10 v -5 h -25 z"/>+ <path d="M 160,45 h 25 v -5 l 10,10 -10,10 v -5 h -25 z"/>+ </g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/manim-logo-sidebar.svg b/tests/test_graphical_units/img_svg_resources/manim-logo-sidebar.svgnew file mode 100644index 000000000..115e0cc8a--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/manim-logo-sidebar.svg@@ -0,0 +1,87 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<svg+ xmlns:dc="http://purl.org/dc/elements/1.1/"+ xmlns:cc="http://creativecommons.org/ns#"+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"+ xmlns:svg="http://www.w3.org/2000/svg"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"+ inkscape:version="1.0 (4035a4fb49, 2020-05-01)"+ id="svg64"+ version="1.1"+ viewBox="0 0 155.19392 80.609703"+ height="80.609703mm"+ width="155.19392mm">+ <defs+ id="defs58" />+ <sodipodi:namedview+ inkscape:snap-page="false"+ inkscape:window-maximized="0"+ inkscape:window-y="228"+ inkscape:window-x="299"+ inkscape:window-height="1198"+ inkscape:window-width="1985"+ fit-margin-bottom="0"+ fit-margin-right="0"+ fit-margin-left="0"+ fit-margin-top="0"+ showgrid="false"+ inkscape:document-rotation="0"+ inkscape:current-layer="layer1"+ inkscape:document-units="mm"+ inkscape:cy="24.575193"+ inkscape:cx="329.94865"+ inkscape:zoom="1.5480095"+ inkscape:pageshadow="2"+ inkscape:pageopacity="0.0"+ borderopacity="1.0"+ bordercolor="#666666"+ pagecolor="#ffffff"+ id="base" />+ <metadata+ id="metadata61">+ <rdf:RDF>+ <cc:Work+ rdf:about="">+ <dc:format>image/svg+xml</dc:format>+ <dc:type+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />+ <dc:title></dc:title>+ </cc:Work>+ </rdf:RDF>+ </metadata>+ <g+ transform="translate(-0.6440986,-9.5880074)"+ id="layer1"+ inkscape:groupmode="layer"+ inkscape:label="Ebene 1">+ <g+ id="g86"+ transform="translate(-152.56314,14.339231)">+ <path+ inkscape:connector-curvature="0"+ d="m 270.08866,54.482299 h -23.55221 l 11.7761,-20.39681 z"+ id="path34"+ style="fill:#e07a5f;fill-opacity:1;stroke:none;stroke-width:0.381578;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />+ <rect+ y="20.803919"+ x="231.22784"+ height="27.255585"+ width="27.255585"+ id="rect36"+ style="fill:#525893;fill-opacity:1;stroke:none;stroke-width:0.547864;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />+ <circle+ r="13.947841"+ cy="47.737576"+ cx="230.86613"+ id="circle38"+ style="fill:#87c2a5;fill-opacity:1;stroke:none;stroke-width:0.406653;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />+ <path+ style="fill:#343434;fill-opacity:1;stroke:none;stroke-width:4.94272"+ d="m 213.60755,32.822539 -9.4221,-22.39672 c -0.3861,-1.0039802 -0.3861,-1.0039802 -1.7762,-1.0039802 h -9.1132 c -0.9268,0 -1.6218,0 -1.6218,0.8495302 0,0.84952 0.8495,0.84952 1.0812,0.84952 0.6178,0 1.9307,0.15447 3.012,0.54061 v 26.25823 c 0,1.08121 0,3.24365 -3.3209,3.55258 -0.9268,0.0772 -0.9268,0.7723 -0.9268,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 7.5685 c 0.9268,0 1.6219,0 1.6219,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.7843,-0.30893 -3.7843,-2.39413 -3.7843,-3.55258 v -24.48193 l 0.077,-0.0772 11.9706,28.80681 c 0.4634,0.84954 0.7724,1.004 1.0813,1.004 0.6178,0 0.695,-0.38615 1.004,-1.004 l 12.0479,-28.80681 0.077,0.0772 v 24.48193 c 0,1.08121 0,3.24365 -3.3982,3.55258 -0.9267,0.0772 -0.9267,0.7723 -0.9267,0.84954 0,0.84952 0.7723,0.84952 1.6991,0.84952 h 13.1291 c 0.9267,0 1.6218,0 1.6218,-0.84952 0,-0.46338 -0.3862,-0.84954 -0.7723,-0.84954 -3.7843,-0.30893 -3.7843,-2.39413 -3.7843,-3.55258 v -23.24624 c 0,-1.08123 0,-3.24368 3.3209,-3.5526 0.5406,0 0.9268,-0.30891 0.9268,-0.84952 0,-0.8495302 -0.6951,-0.8495302 -1.6219,-0.8495302 h -9.4993 c -1.2356,0 -1.3901,0 -1.7763,1.0039802 z m -1.4674,0.92677 c 0.3862,0.77229 0.4634,0.84952 1.0813,1.08121 l -2.2397,5.17441 h -0.077 l -11.1984,-26.79882 c -0.2317,-0.61785 -0.6951,-1.46737 -1.3129,-2.08522 h 4.2477 z m 13.6698,-22.62842 h 5.2516 c -1.1585,1.23568 -1.1585,2.5486 -1.1585,3.39813 v 23.55516 c 0,0.84954 0,2.16244 1.1585,3.39813 h -6.3329 c 1.0813,-1.23569 1.0813,-2.54859 1.0813,-3.39813 z"+ id="path1500"+ inkscape:connector-curvature="0" />+ </g>+ </g>+</svg>diff --git a/tests/test_graphical_units/img_svg_resources/multi_part_path.svg b/tests/test_graphical_units/img_svg_resources/multi_part_path.svgnew file mode 100644index 000000000..46caa4e02--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/multi_part_path.svg@@ -0,0 +1,6 @@+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">+<g>+ <path style="fill:white" d="m 50,50 10,10 -10,10 z m 30,0 -10,-10, -10,10 z">+ </path>+</g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/penrose.svg b/tests/test_graphical_units/img_svg_resources/penrose.svgnew file mode 100644index 000000000..e5a7f0fdb--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/penrose.svg@@ -0,0 +1,12 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="1000.0" height="865.87646" id="C:\tom\triangle_illusion2-level1.svg">+<g style="opacity:1.0;fill:#00a0ff;fill-opacity:1;stroke:#000000;stroke-width:2.0;stroke-opacity:1.00;">+<polygon points=" 420.532,570.28 579.289,570.277 658.67,707.77 182.528,707.538 23.81,707.46 420.352,20.624 579.468,20.616 500.045,158.032 261.776,570.278" />+</g>+<g style="opacity:1.0;fill:#0000ff;fill-opacity:1;stroke:#000000;stroke-width:2.0;stroke-opacity:1.00;">+<polygon points=" 579.289,570.277 499.912,432.789 579.294,295.295 817.432,707.771 896.809,845.254 738.056,845.254 579.295,845.254 261.769,845.254 103.013,845.261 23.81,707.46 182.528,707.538 658.67,707.77" />+</g>+<g style="opacity:1.0;fill:#a0a0ff;fill-opacity:1;stroke:#000000;stroke-width:2.0;stroke-opacity:1.00;">+<polygon points=" 420.532,570.28 261.776,570.278 500.045,158.032 579.468,20.616 658.673,157.802 738.052,295.294 896.812,570.275 976.19,707.763 896.809,845.254 817.432,707.771 579.294,295.295 499.912,432.789" />+</g>+</svg>diff --git a/tests/test_graphical_units/img_svg_resources/pixelated_text.svg b/tests/test_graphical_units/img_svg_resources/pixelated_text.svgnew file mode 100644index 000000000..2085bff4d--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/pixelated_text.svg@@ -0,0 +1,27 @@+<svg version="1.1" viewBox="0.0 0.0 480.0 480.0" fill="none" stroke="none" stroke-linecap="square"+ stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">+ <clipPath id="p.0">+ <path d="m0 0l480.0 0l0 480.0l-480.0 0l0 -480.0z" clip-rule="nonzero"/>+ </clipPath>+ <g clip-path="url(#p.0)">+ <path fill="#000000" fill-opacity="0.0" d="m0 0l480.0 0l0 480.0l-480.0 0z" fill-rule="evenodd"/>+ <path fill="#000000" fill-opacity="0.0"+ d="m124.62243 192.79527l0 37.76378l-18.881958 0l0 18.881897l-37.76391 0l0 -56.645676zm-94.40978 -18.881897l0 132.17323l37.763916 0l0 -37.763763l18.88195 0l0 18.881866l18.881958 0l0 18.881897l56.645866 0l0 -18.881897l-18.881958 0l0 -18.881866l-18.88195 0l0 -18.881897l37.76391 0l0 -56.645676l-18.881958 0l0 -18.881897z"+ fill-rule="evenodd"/>+ <path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt"+ d="m124.62243 192.79527l0 37.76378l-18.881958 0l0 18.881897l-37.76391 0l0 -56.645676zm-94.40978 -18.881897l0 132.17323l37.763916 0l0 -37.763763l18.88195 0l0 18.881866l18.881958 0l0 18.881897l56.645866 0l0 -18.881897l-18.881958 0l0 -18.881866l-18.88195 0l0 -18.881897l37.76391 0l0 -56.645676l-18.881958 0l0 -18.881897z"+ fill-rule="evenodd"/>+ <path fill="#000000" fill-opacity="0.0"+ d="m214.79103 176.0929l0 18.259186l-18.259293 0l0 18.259186l-18.259277 0l0 54.777557l18.259277 0l0 18.259186l18.259293 0l0 18.259186l91.29643 0l0 -73.03674l-54.777863 0l0 18.259186l18.259277 0l0 36.51837l-36.51857 0l0 -18.259186l-18.259277 0l0 -54.777557l18.259277 0l0 -18.259186l73.037155 0l0 -18.259186z"+ fill-rule="evenodd"/>+ <path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt"+ d="m214.79103 176.0929l0 18.259186l-18.259293 0l0 18.259186l-18.259277 0l0 54.777557l18.259277 0l0 18.259186l18.259293 0l0 18.259186l91.29643 0l0 -73.03674l-54.777863 0l0 18.259186l18.259277 0l0 36.51837l-36.51857 0l0 -18.259186l-18.259277 0l0 -54.777557l18.259277 0l0 -18.259186l73.037155 0l0 -18.259186z"+ fill-rule="evenodd"/>+ <path fill="#000000" fill-opacity="0.0"+ d="m413.26883 194.35208l0 36.51837l-54.777832 0l0 -36.51837zm0 54.777557l0 36.51837l-54.777832 0l0 -36.51837zm-91.29642 -73.03674l0 127.8143l109.555725 0l0 -18.259186l18.259277 0l0 -36.51837l-18.259277 0l0 -18.259186l18.259277 0l0 -36.51837l-18.259277 0l0 -18.259186z"+ fill-rule="evenodd"/>+ <path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt"+ d="m413.26883 194.35208l0 36.51837l-54.777832 0l0 -36.51837zm0 54.777557l0 36.51837l-54.777832 0l0 -36.51837zm-91.29642 -73.03674l0 127.8143l109.555725 0l0 -18.259186l18.259277 0l0 -36.51837l-18.259277 0l0 -18.259186l18.259277 0l0 -36.51837l-18.259277 0l0 -18.259186z"+ fill-rule="evenodd"/>+ </g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/qcurve_demo.svg b/tests/test_graphical_units/img_svg_resources/qcurve_demo.svgnew file mode 100644index 000000000..408c661ca--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/qcurve_demo.svg@@ -0,0 +1,6 @@+<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">+<g>+ <path style="fill:white" d="M 20,50 q 0,20 17.3,10 10,17.3 20,0 17.3,-10 0,-20">+ </path>+</g>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/rhomboid.svg b/tests/test_graphical_units/img_svg_resources/rhomboid.svgnew file mode 100644index 000000000..b8d922759--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/rhomboid.svg@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<svg version="1.2" baseProfile="tiny" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"+ x="0px" y="0px" viewBox="0 0 1000 1000" xml:space="preserve">+<polygon fill="none" stroke="#ff0000" stroke-width="10" points="742.3,600 142.3,600 257.7,400 857.7,400 "/>+</svg>diff --git a/tests/test_graphical_units/img_svg_resources/single_state.svg b/tests/test_graphical_units/img_svg_resources/single_state.svgnew file mode 100644index 000000000..99010db0e--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/single_state.svg@@ -0,0 +1,7 @@+<svg xmlns="http://www.w3.org/2000/svg" width="959" height="593" style="fill:crimson">+<g>+ <path d="m 643,467.4 .4,-7.3 -.9,-1.2 -1.7,-.7 -2.5,-2.8 .5,-2.9 48.8,-5.1 -.7,-2.2 -1.5,-1.5 -.5,-1.4 .6,-6.3 -2.4,-5.7 .5,-2.6 .3,-3.7 2.2,-3.8 -.2,-1.1 -1.7,-1 v -3.2 l -1.8,-1.9 -2.9,-6.1 -12.9,-45.8 -45.7,4 1.3,2 -1.3,67 4.4,33.2 .9,-.5 1.3,.1 .6,.4 .8,-.1 2,-3.8 v -2.3 l 1.1,-1.1 1.4,.5 3.4,6.4 v .9 l -3.3,2.2 3.5,-.4 4.9,-1.6 z">+<title>Alabama</title></path>+</g>++</svg>diff --git a/tests/test_graphical_units/img_svg_resources/smooth_curves.svg b/tests/test_graphical_units/img_svg_resources/smooth_curves.svgnew file mode 100644index 000000000..7fe31d675--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/smooth_curves.svg@@ -0,0 +1,9 @@+<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="1000">+ <g>+ <path fill="none" stroke="red" stroke-width="5"+ d="M200,300 Q400,50 600,300 T1000,300"/>+ <path fill="none" stroke="blue" stroke-width="5"+ d="M100,200 C100,100 250,100 250,200 S400,300 400,200"/>+ </g>++</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/states_map.svg b/tests/test_graphical_units/img_svg_resources/states_map.svgnew file mode 100644index 000000000..5a5aba201--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/states_map.svg@@ -0,0 +1,157 @@+<svg xmlns="http://www.w3.org/2000/svg" width="959" height="593">+ <title>Blank map of the United States, territories not included</title>+++<g style="stroke:white;fill:none">++<path id="al" d="m 643,467.4 .4,-7.3 -.9,-1.2 -1.7,-.7 -2.5,-2.8 .5,-2.9 48.8,-5.1 -.7,-2.2 -1.5,-1.5 -.5,-1.4 .6,-6.3 -2.4,-5.7 .5,-2.6 .3,-3.7 2.2,-3.8 -.2,-1.1 -1.7,-1 v -3.2 l -1.8,-1.9 -2.9,-6.1 -12.9,-45.8 -45.7,4 1.3,2 -1.3,67 4.4,33.2 .9,-.5 1.3,.1 .6,.4 .8,-.1 2,-3.8 v -2.3 l 1.1,-1.1 1.4,.5 3.4,6.4 v .9 l -3.3,2.2 3.5,-.4 4.9,-1.6 z">+<title>Alabama</title></path>++<path id="az" d="m 139.6,387.6 3,-2.2 .8,-2.4 -1,-1.6 -1.8,-.2 -1.1,-1.6 1.1,-6.9 1.6,-.3 2.4,-3.2 1.6,-7 2.4,-3.6 4.8,-1.7 1.3,-1.3 -.4,-1.9 -2.3,-2.5 -1.2,-5.8 -1.4,-1.8 -1.3,-3.4 .9,-2.1 1.4,-3 .5,-2.9 -.5,-4.9 1,-13.6 3.5,-.6 3.7,1.4 1.2,2.7 h 2 l 2.4,-2.9 3.4,-17.5 46.2,8.2 40,6 -17.4,124.1 -37.3,-5.4 -64.2,-37.5 .5,-2.9 2,-1.8 z">+<title>Arizona</title></path>++<path id="ar" d="m 584.2,367 .9,-2.2 1.2,.5 .7,-1 -.8,-.7 .3,-1.5 -1.1,-.9 .6,-1 -.1,-1.5 -1.1,-.1 .8,-.8 1.3,.8 .3,-1.4 -.4,-1.1 .1,-.7 2,.6 -.4,-1.5 1.6,-1.3 -.5,-.9 -1.1,.1 -.6,-.9 .9,-.9 1.6,-.2 .5,-.8 1.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-1.4,.5 -1.5,3.8 .5,1.3 -.8,1 -.9,-.1 -5.4,-6.1 .7,-5.6 -1.1,-3.9 -6.5,-12.8 .8,-10.7 2.3,-3.6 .2,-6.4 -5.5,-11.1 .3,-5.2 6.9,-7.5 1.7,-2.4 -.1,-1.4 4,-9.2 .1,-8.4 .9,-2.5 66.1,18.6 -16.4,63.1 1.1,3.5 70.4,105 -.9,2.1 1.3,3.4 1.4,1.8 1.2,5.8 2.3,2.5 .4,1.9 -1.3,1.3 -4.8,1.7 -2.4,3.6 -1.6,7 -2.4,3.2 -1.6,.3 -1.1,6.9 1.1,1.6 1.8,.2 1,1.6 -.8,2.4 -3,2.2 -2.2,-.1 z">+<title>California</title></path>++<path id="co" d="m 374.6,323.3 -16.5,-1 -51.7,-4.8 -52.6,-6.5 11.5,-88.3 44.9,5.7 37.5,3.4 33.1,2.4 -1.4,22.1 z">+<title>Colorado</title></path>++<path id="ct" d="m 873.5,178.9 .4,-1.1 -3.2,-12.3 -.1,-.3 -14.9,3.4 v .7 l -.9,.3 -.5,-.7 -10.5,2.4 2.8,16.3 1.8,1.5 -3.5,3.4 1.7,2.2 5.4,-4.5 1.7,-1.3 h .8 l 2.4,-3.1 1.4,.1 2.9,-1.1 h 2.1 l 5.3,-2.7 2.8,-.9 1,-1 1.5,.5 z">+<title>Connecticut</title></path>++<path id="de" d="m 822.2,226.6 -1.6,.3 -1.5,1.1 -1.2,2.1 7.6,27.1 10.9,-2.3 -2.2,-7.6 -1.1,.5 -3.3,-2.6 -.5,-1.7 -1.8,-1 -.2,-3.7 -2.1,-2.2 -1.1,-.8 -1.2,-1.1 -.4,-3.2 .3,-2.1 1,-2.2 z">+<title>Delaware</title></path>++<path id="fl" d="m 751.7,445.1 -4,-.7 -1.7,-.9 -2.2,1.4 v 2.5 l 1.4,2.1 -.5,4.3 -2.1,.6 -1,-1.1 -.6,-3.2 -50.1,3.3 -3.3,-6 -48.8,5.1 -.5,2.9 2.5,2.8 1.7,.7 .9,1.2 -.4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-5.9 -1.2,-5.4 1.4,-3.7 z">+<title>Missouri</title></path>++<path id="mt" d="m 247,130.5 57.3,7.9 51,5.3 2,-20.7 5.2,-66.7 -53.5,-5.6 -54.3,-7.7 -65.9,-12.5 -4.8,22 3.7,7.4 -1.6,4.8 3.6,4.8 1.9,.7 3.9,8.3 v 2.1 l 2.3,3 h .9 l 1.4,2.1 h 3.2 v 1.6 l -7.1,17 -.5,4.1 1.4,.5 1.6,2.6 2.8,-1.4 3.6,-2.4 1.9,1.9 .5,2.5 -.5,3.2 2.5,9.7 2.6,3.5 2.3,1.4 .4,3 v 4.1 l 2.3,2.3 1.6,-2.3 6.9,1.6 2.1,-1.2 9,1.7 2.8,-3.3 1.8,-.6 1.2,1.8 1.6,4.1 .9,.1 z">+<title>Montana</title></path>++<path id="ne" d="m 402.5,191.1 38,1.6 3.4,3.2 1.7,.2 2.1,2 1.8,-.1 1.8,-2 1.5,.6 1,-.7 .7,.5 .9,-.4 .7,.4 .9,-.4 1,.5 1.4,-.6 2,.6 .6,1.1 6.1,2.2 1.2,1.3 .9,2.6 1.8,.7 1.5,-.2 .5,.9 v 2.3 l .6,1.7 v 1.4 l 1.3,3.7 2.2,4.3 .2,3.7 2.8,5 .4,6.1 1.3,.7 -.2,2.9 .8,3.3 -.7,2.2 1.8,4.4 1.3,1.3 -.3,1.4 2.1,3.7 3.9,6.3 h -32.4 l -43.7,-1.2 -36,-2 1.4,-22.1 -33.1,-2.4 3.7,-44.2 z">+<title>Nebraska</title></path>++<path id="nv" d="m 167.6,296.8 -3.4,17.5 -2.4,2.9 h -2 l -1.2,-2.7 -3.7,-1.4 -3.5,.6 -1,13.6 .5,4.9 -.5,2.9 -1.4,3 -70.4,-105 -1.1,-3.5 16.4,-63.1 47,11.2 24.4,5.4 23.3,4.7 z">+<title>Nevada</title></path>++<path id="nh" d="m 862.6,93.6 -1.3,.1 -1,-1.1 -1.9,1.4 -.5,6.1 1.2,2.3 -1.1,3.5 2.1,2.8 -.4,1.7 .1,1.3 -1.1,2.1 -1.4,.4 -.6,1.3 -2.1,1 -.7,1.5 1.4,3.4 -.5,2.5 .5,1.5 -1,1.9 .4,1.9 -1.3,1.9 .2,2.2 -.7,1.1 .7,4.5 .7,1.5 -.5,2.6 .9,1.8 -.2,2.5 -.5,1.3 -.1,1.4 2.1,2.6 18.4,-3.8 1,-1.5 .3,-1.7 1.9,-.6 .5,-1.1 1.7,-1.1 1.3,.3 .8,-4.8 -2.3,-1.4 -.8,-2.2 -3.2,-2 -.6,-4 -11.9,-36.8 z">+<title>New Hampshire</title></path>++<path id="nj" d="m 842.5,195.4 -14.6,-4.9 -1.8,2.5 .1,2.2 -3,5.4 1.5,1.8 -.7,2 -1,1 .5,3.6 2.7,.9 1,2.8 2.1,1.1 4.2,3.2 -3.3,2.6 -1.6,2.3 -1.8,3 -1.6,.6 -1.4,1.7 -1,2.2 -.3,2.1 .8,.9 .4,2.3 1.2,.6 2.4,1.5 1.8,.8 1.6,.8 .1,1.1 .8,.1 1.1,-1.2 .8,.4 2.1,.2 -.2,2.9 .2,2.5 1.8,-.7 1.5,-3.9 1.6,-4.8 2.9,-2.8 .6,-3.5 -.6,-1.2 1.7,-2.9 v -1.2 l -.7,-1.1 1.2,-2.7 -.3,-3.6 -.6,-8.2 -1.2,-1.4 v 1.4 l .5,.6 h -1.1 l -.6,-.4 -1.3,-.2 -.9,.6 -1.2,-1.6 .7,-1.7 v -1 l 1.7,-.7 .8,-2.1 z">+<title>New Jersey</title></path>++<path id="nm" d="m 357.5,332.9 h -.8 l -7.9,99.3 -31.8,-2.6 -34.4,-3.6 -.3,3 2,2.2 -30.8,-4.1 -1.4,10.2 -15.7,-2.2 17.4,-124.1 52.6,6.5 51.7,4.8 z">+<title>New Mexico</title></path>++<path id="ny" d="m 872.9,181.6 -1.3,.1 -.5,1 z m -30.6,22.7 .7,.6 1.3,-.3 1.1,.3 .9,-1.3 h 1.9 l 2.4,-.9 5.1,-2.1 -.5,-.5 -1.9,.8 -2,.9 .2,-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1.5,-.2 -.5,-1.1 -1,-.1 -.7,.6 -2,-1.9 v 4.3 l -1.3,1.3 -1.1,3.5 -.1,2.3 -4.5,12.3 -13.2,31.3 -3.2,4.6 -1.6,-.1 .1,2.1 -5.2,7.1 -.3,3.3 1,1.3 .1,2.4 -1.2,1.1 -1.2,3 .1,5.7 1.2,2.9 z">+<title>Oregon</title></path>++<path id="pa" d="m 826.3,189.4 -1.9,.3 -3,-2.2 -3,-5.8 h -2 l -.4,-1.5 -1.7,-1.1 -70.5,13.9 -.8,-6 -4.2,3.4 -.9,.1 -2.7,3 -3.3,1.7 4.9,29.9 3.2,19.7 17.4,-2.9 60.5,-11.8 1.2,-2.1 1.5,-1.1 1.6,-.3 1.6,.6 1.4,-1.7 1.6,-.6 1.8,-3 1.6,-2.3 3.3,-2.6 -4.2,-3.2 -2.1,-1.1 -1,-2.8 -2.7,-.9 -.5,-3.6 1,-1 .7,-2 -1.5,-1.8 3,-5.4 -.1,-2.2 1.8,-2.5 z">+<title>Pennsylvania</title></path>++<path id="ri" d="m 883.2,170.7 -1.3,-1.1 -2.6,-1.3 -.6,-2.2 h -.8 l -.7,-2.6 -6.5,2 3.2,12.3 -.4,1.1 .4,1.8 5.6,-3.6 .1,-3 -.8,-.8 .4,-.6 -.1,-1.3 -.9,-.7 1.2,-.4 -.9,-1.6 1.8,.7 .3,1.4 .7,1.2 -1.4,-.8 1.1,1.7 -.3,1.2 -.6,-1.1 v 2.5 l .6,-.9 .4,.9 1.3,-1.5 -.2,-2.5 1.4,3.1 1,-.9 z m -4.7,12.2 h .9 l .5,-.6 -.8,-1.3 -.7,.7 z">+<title>Rhode Island</title></path>++<path id="sc" d="m 772.3,350.2 -19.7,2.8 -.1,-2.6 -3.3,-3 -1.2,1.5 -.7,-.3 .2,-1.4 -.4,-.5 -23.2,2.2 -7.3,4.3 -1.3,.1 -4.4,1.9 -.1,1.9 -1.9,1 -1.4,3.2 .2,1.3 6.1,3.8 2.6,-.3 3.1,4 .4,1.7 4.2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5 -1,1 .8,.8 3.8,.7 1.2,1.2 .1,4.4 -1.3,2.8 2,.1 1,-.8 .9,.8 -1.1,3.1 1,1.6 1.2,.3 z m -49.5,-37.3 -.5,.1 -1.5,1.6 .2,.5 1.5,-.6 v -.6 l .9,-.3 z m 1.6,-1.1 -1,.3 -.2,.7 .9,-.1 z m -1.3,-1.6 -.2,.9 h 1.7 l .6,-.4 .1,-1 z m 2.8,-3 -.3,1.9 1.2,-.5 .1,-1.4 z m 58.3,31.9 -2,.3 -.4,1.3 1.3,1.7 z">+<title>Wisconsin</title></path>++<path id="wy" d="m 355.3,143.7 -51,-5.3 -57.3,-7.9 -2,10.7 -8.5,54.8 -3.3,21.9 32.1,4.8 44.9,5.7 37.5,3.4 3.7,-44.2 z">+<title>Wyoming</title></path>++<path id="dc" d="m 803.5,252 -2.6,-1.8 -1,1.7 .5,.4 .4,.1 .6,.5 .3,.7 -.1,.5 .2,.5 z">+<title>District of Columbia</title></path>++</g>+++</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/united-kingdom.svg b/tests/test_graphical_units/img_svg_resources/united-kingdom.svgnew file mode 100644index 000000000..8aaf4af9b--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/united-kingdom.svg@@ -0,0 +1,53 @@+<?xml version="1.0" encoding="iso-8859-1"?>+<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->+<!-- Icon made by Freepik (https://www.freepik.com) from Flaticon (https://www.flaticon.com/) -->+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"+ viewBox="0 0 512.002 512.002" style="enable-background:new 0 0 512.002 512.002;" xml:space="preserve">+<path style="fill:#41479B;" d="M503.172,423.725H8.828c-4.875,0-8.828-3.953-8.828-8.828V97.104c0-4.875,3.953-8.828,8.828-8.828+ h494.345c4.875,0,8.828,3.953,8.828,8.828v317.793C512,419.772,508.047,423.725,503.172,423.725z"/>+<path style="fill:#F5F5F5;" d="M512,97.104c0-4.875-3.953-8.828-8.828-8.828h-39.495l-163.54,107.147V88.276h-88.276v107.147+ L48.322,88.276H8.828C3.953,88.276,0,92.229,0,97.104v22.831l140.309,91.927H0v88.276h140.309L0,392.066v22.831+ c0,4.875,3.953,8.828,8.828,8.828h39.495l163.54-107.147v107.147h88.276V316.578l163.54,107.147h39.495+ c4.875,0,8.828-3.953,8.828-8.828v-22.831l-140.309-91.927H512v-88.276H371.691L512,119.935V97.104z"/>+<g>+ <polygon style="fill:#FF4B55;" points="512,229.518 282.483,229.518 282.483,88.276 229.517,88.276 229.517,229.518 0,229.518+ 0,282.483 229.517,282.483 229.517,423.725 282.483,423.725 282.483,282.483 512,282.483 "/>+ <path style="fill:#FF4B55;" d="M178.948,300.138L0.25,416.135c0.625,4.263,4.14,7.59,8.577,7.59h12.159l190.39-123.586h-32.428+ V300.138z"/>+ <path style="fill:#FF4B55;" d="M346.388,300.138H313.96l190.113,123.404c4.431-0.472,7.928-4.09,7.928-8.646v-7.258+ L346.388,300.138z"/>+ <path style="fill:#FF4B55;" d="M0,106.849l161.779,105.014h32.428L5.143,89.137C2.123,90.54,0,93.555,0,97.104V106.849z"/>+ <path style="fill:#FF4B55;" d="M332.566,211.863L511.693,95.586c-0.744-4.122-4.184-7.309-8.521-7.309h-12.647L300.138,211.863+ H332.566z"/>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+<g>+</g>+</svg>diff --git a/tests/test_graphical_units/img_svg_resources/video_icon.svg b/tests/test_graphical_units/img_svg_resources/video_icon.svgnew file mode 100644index 000000000..8a3dec624--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/video_icon.svg@@ -0,0 +1,60 @@+<?xml version="1.0" encoding="UTF-8" standalone="no"?>+<!-- Created with Inkscape (http://www.inkscape.org/) -->++<svg+ xmlns:dc="http://purl.org/dc/elements/1.1/"+ xmlns:cc="http://creativecommons.org/ns#"+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"+ xmlns:svg="http://www.w3.org/2000/svg"+ xmlns="http://www.w3.org/2000/svg"+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"+ width="1920px"+ height="1080px"+ viewBox="0 0 1920 1080"+ version="1.1"+ id="SVGRoot"+ inkscape:version="0.92.2 5c3e80d, 2017-08-06"+ sodipodi:docname="video_icon.svg">+ <sodipodi:namedview+ id="base"+ pagecolor="#ffffff"+ bordercolor="#666666"+ borderopacity="1.0"+ inkscape:pageopacity="0.0"+ inkscape:pageshadow="2"+ inkscape:zoom="0.24748737"+ inkscape:cx="1216.0434"+ inkscape:cy="480.932"+ inkscape:document-units="px"+ inkscape:current-layer="layer1"+ showgrid="false"+ inkscape:window-width="1227"+ inkscape:window-height="762"+ inkscape:window-x="1"+ inkscape:window-y="0"+ inkscape:window-maximized="0" />+ <defs+ id="defs5935" />+ <metadata+ id="metadata5938">+ <rdf:RDF>+ <cc:Work+ rdf:about="">+ <dc:format>image/svg+xml</dc:format>+ <dc:type+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />+ <dc:title></dc:title>+ </cc:Work>+ </rdf:RDF>+ </metadata>+ <g+ id="layer1"+ inkscape:groupmode="layer"+ inkscape:label="Layer 1">+ <path+ style="fill:#ff00ff;fill-opacity:1"+ d="M 94.955078 0 C 42.350388 0 -9.4739031e-15 42.350388 0 94.955078 L 0 985.04492 C 0 1037.6496 42.350388 1080 94.955078 1080 L 1825.0449 1080 C 1877.6496 1080 1920 1037.6496 1920 985.04492 L 1920 94.955078 C 1920 42.350388 1877.6496 -9.4739031e-15 1825.0449 0 L 94.955078 0 z M 181.45898 54 L 1738.541 54 C 1785.8852 54 1824 92.114766 1824 139.45898 L 1824 940.54102 C 1824 987.88524 1785.8852 1026 1738.541 1026 L 181.45898 1026 C 134.11476 1026 96 987.88524 96 940.54102 L 96 139.45898 C 96 92.114766 134.11476 54 181.45898 54 z M 810 280.19141 L 810.16797 547.07617 L 810 799.80859 L 1041.0449 666.2207 L 1260 540 L 1028.7871 406.70312 L 810 280.19141 z "+ id="rect7988" />+ </g>+</svg>diff --git a/tests/test_graphical_units/img_svg_resources/watch_the_decimals.svg b/tests/test_graphical_units/img_svg_resources/watch_the_decimals.svgnew file mode 100644index 000000000..b30c13f1a--- /dev/null+++ b/tests/test_graphical_units/img_svg_resources/watch_the_decimals.svg@@ -0,0 +1,4 @@+<svg class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9062"+ width="200" height="200">+ <path fill="orange" d="M99.89.22M512 1024 c 282.784 0 512 -229.216 512 -512 0 -35.36 28.64 -64 64 -64 z"></path>+</svg>\ No newline at end of filediff --git a/tests/test_graphical_units/img_svg_resources/weight.svg b/tests/test_graphical_units/img_svg_resources/weight.svgindex 2ac662093..93640cc0b 100644--- a/tests/test_graphical_units/img_svg_resources/weight.svg+++ b/tests/test_graphical_units/img_svg_resources/weight.svg@@ -14,153 +14,6 @@viewBox="0 0 112.95123 196.64897"height="196.64897mm"width="112.95123mm">- <defs- id="defs2">- <inkscape:path-effect- effect="bspline"- id="path-effect253"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- effect="bspline"- id="path-effect251"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- effect="bspline"- id="path-effect249"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- effect="bspline"- id="path-effect247"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- effect="bspline"- id="path-effect245"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- effect="bspline"- id="path-effect243"- is_visible="true"- lpeversion="1"- weight="33.333333"- steps="2"- helper_size="0"- apply_no_weight="true"- apply_with_weight="true"- only_selected="false" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect103"- effect="bspline" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect99"- effect="bspline" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect95"- effect="bspline" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect91"- effect="bspline" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect79"- effect="bspline" />- <inkscape:path-effect- only_selected="false"- apply_with_weight="true"- apply_no_weight="true"- helper_size="0"- steps="2"- weight="33.333333"- lpeversion="1"- is_visible="true"- id="path-effect75"- effect="bspline" />- </defs>- <metadata- id="metadata5">- <rdf:RDF>- <cc:Work- rdf:about="">- <dc:format>image/svg+xml</dc:format>- <dc:type- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />- <dc:title></dc:title>- </cc:Work>- </rdf:RDF>- </metadata><gstyle="display:inline"transform="translate(-42.767119,-68.460435)"diff --git a/tests/test_graphical_units/test_img_and_svg.py b/tests/test_graphical_units/test_img_and_svg.pyindex a6b2fa982..4a8c9caf1 100644--- a/tests/test_graphical_units/test_img_and_svg.py+++ b/tests/test_graphical_units/test_img_and_svg.py@@ -7,26 +7,165 @@ from ..helpers.path_utils import get_project_rootfrom ..utils.testing_utils import get_scenes_to_testfrom ..utils.GraphicalUnitTester import GraphicalUnitTester-# Tests for the modules image_mobject and svg_mobject+from ..helpers.graphical_units import set_test_scene-class SVGMobjectTest(Scene):+def get_test_resource(filename):+ return str(+ get_project_root() / "tests/test_graphical_units/img_svg_resources" / filename+ )+++# Tests break down into two kinds: one where the SVG is simple enough to step through+# and ones where the SVG is realistically complex, and the output should be visually inspected.++# First are the simple tests.+++class CubicPathTest(Scene):def construct(self):- path = (- get_project_root()- / "tests/test_graphical_units/img_svg_resources/weight.svg"- )- svg_obj = SVGMobject(str(path))+ cubic_demo = SVGMobject(get_test_resource("cubic_demo.svg"))+ self.add(cubic_demo)+ self.wait()+++class CubicAndLinetoTest(Scene):+ def construct(self):+ cubic_lineto = SVGMobject(get_test_resource("cubic_and_lineto.svg"))+ self.add(cubic_lineto)+ self.wait()+++class RhomboidTest(Scene):+ """Test the default fill and parsed stroke of a rhomboid"""++ def construct(self):+ rhomboid = SVGMobject(get_test_resource("rhomboid.svg")).scale(0.5)+ rhomboid_fill = rhomboid.copy().set_fill(opacity=1).shift(UP * 2)+ rhomboid_no_fill = rhomboid.copy().set_fill(opacity=0).shift(DOWN * 2)++ self.add(rhomboid, rhomboid_fill, rhomboid_no_fill)+ self.wait()+++class InheritanceTest(Scene):+ """Ensure SVG inheritance is followed"""++ def construct(self):+ three_arrows = SVGMobject(get_test_resource("inheritance_test.svg")).scale(0.5)+ self.add(three_arrows)+ self.wait()+++class MultiPartPathTest(Scene):+ def construct(self):+ mpp = SVGMobject(get_test_resource("multi_part_path.svg"))+ self.add(mpp)+ self.wait()+++class QuadraticPathTest(Scene):+ def construct(self):+ quad = SVGMobject(get_test_resource("qcurve_demo.svg"))+ self.add(quad)+ self.wait()+++class SmoothCurvesTest(Scene):+ def construct(self):+ smooths = SVGMobject(get_test_resource("smooth_curves.svg"))+ self.add(smooths)+ self.wait()+++class WatchTheDecimals(Scene):+ def construct(self):+ decimal = SVGMobject(get_test_resource("watch_the_decimals.svg"))+ self.add(decimal)+ self.wait()+++# Second are the visual tests - these are probably too complex to verify step-by-step, so+# these are really more of a spot-check+++class WeightSVGTest(Scene):+ def construct(self):+ path = get_test_resource("weight.svg")+ svg_obj = SVGMobject(path)self.add(svg_obj)self.wait()+class BrachistochroneCurveTest(Scene):+ def construct(self):+ brach_curve = SVGMobject(get_test_resource("curve.svg"))+ self.add(brach_curve)+ self.wait()+++class DesmosGraph1Test(Scene):+ def construct(self):+ dgraph = SVGMobject(get_test_resource("desmos-graph_1.svg")).scale(3)+ self.add(dgraph)+ self.wait()+++class PenroseTest(Scene):+ def construct(self):+ penrose = SVGMobject(get_test_resource("penrose.svg"))+ self.add(penrose)+ self.wait()+++class ManimLogoTest(Scene):+ def construct(self):+ background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)+ manim_logo = SVGMobject(get_test_resource("manim-logo-sidebar.svg"))+ self.add(background_rect, manim_logo)+ self.wait()+++class UKFlagTest(Scene):+ def construct(self):+ uk_flag = SVGMobject(get_test_resource("united-kingdom.svg"))+ self.add(uk_flag)+ self.wait()+++class SingleUSStateTest(Scene):+ def construct(self):+ single_state = SVGMobject(get_test_resource("single_state.svg"))+ self.add(single_state)+ self.wait()+++class ContiguousUSMapTest(Scene):+ def construct(self):+ states = SVGMobject(get_test_resource("states_map.svg")).scale(3)+ self.add(states)+ self.wait()+++class PixelizedTextTest(Scene):+ def construct(self):+ background_rect = Rectangle(color=WHITE, fill_opacity=1).scale(2)+ rgb_svg = SVGMobject(get_test_resource("pixelated_text.svg"))+ self.add(background_rect, rgb_svg)+ self.wait()+++class VideoIconTest(Scene):+ def construct(self):+ video_icon = SVGMobject(get_test_resource("video_icon.svg"))+ self.add(video_icon)+ self.wait()++class ImageMobjectTest(Scene):def construct(self):- file_path = (- get_project_root()- / "tests/test_graphical_units/img_svg_resources/tree_img_640x351.png"- )+ file_path = get_test_resource("tree_img_640x351.png")+im1 = ImageMobject(file_path).shift(4 * LEFT + UP)im2 = ImageMobject(file_path, scale_to_resolution=1080).shift(4 * LEFT + 2 * DOWN