path commands to shapes bugfix
This commit is contained in:
parent
aa19910380
commit
404b0504ab
4 changed files with 6 additions and 0 deletions
|
@ -698,6 +698,9 @@ proc commandsToShapes*(path: Path, pixelScale: float32 = 1.0): seq[seq[Vec2]] =
|
|||
|
||||
case command.kind:
|
||||
of Move:
|
||||
if shape.len > 0:
|
||||
result.add(shape)
|
||||
shape.setLen(0)
|
||||
at.x = command.numbers[0]
|
||||
at.y = command.numbers[1]
|
||||
start = at
|
||||
|
@ -769,6 +772,9 @@ proc commandsToShapes*(path: Path, pixelScale: float32 = 1.0): seq[seq[Vec2]] =
|
|||
at = to
|
||||
|
||||
of RMove:
|
||||
if shape.len > 0:
|
||||
result.add(shape)
|
||||
shape.setLen(0)
|
||||
at.x += command.numbers[0]
|
||||
at.y += command.numbers[1]
|
||||
start = at
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 280 KiB After Width: | Height: | Size: 280 KiB |
Binary file not shown.
Before Width: | Height: | Size: 520 KiB After Width: | Height: | Size: 519 KiB |
Binary file not shown.
Before Width: | Height: | Size: 519 KiB After Width: | Height: | Size: 519 KiB |
Loading…
Reference in a new issue