mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
add comments
This commit is contained in:
parent
565763a2ff
commit
925f2e123f
1 changed files with 3 additions and 0 deletions
|
@ -565,6 +565,7 @@ class InvalidPathError(ValueError):
|
||||||
|
|
||||||
|
|
||||||
class _PathStringParser:
|
class _PathStringParser:
|
||||||
|
# modified from https://github.com/regebro/svg.path/
|
||||||
def __init__(self, arguments, rules):
|
def __init__(self, arguments, rules):
|
||||||
self.args = []
|
self.args = []
|
||||||
arguments = bytearray(arguments, "ascii")
|
arguments = bytearray(arguments, "ascii")
|
||||||
|
@ -583,6 +584,8 @@ class _PathStringParser:
|
||||||
}
|
}
|
||||||
|
|
||||||
def _strip_array(self, arg_array):
|
def _strip_array(self, arg_array):
|
||||||
|
# wsp: (0x9, 0x20, 0xA, 0xC, 0xD) with comma 0x2C
|
||||||
|
# https://www.w3.org/TR/SVG/paths.html#PathDataBNF
|
||||||
while arg_array and arg_array[0] in [0x9, 0x20, 0xA, 0xC, 0xD, 0x2C]:
|
while arg_array and arg_array[0] in [0x9, 0x20, 0xA, 0xC, 0xD, 0x2C]:
|
||||||
arg_array[0:1] = b""
|
arg_array[0:1] = b""
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue