Skip to content

Problem with closing (z/Z) #1

@vonagam

Description

@vonagam

Hi, thanks for library.

Found some problem in SVGData. I had simple path and when i loaded it with .Path everything worked fine, but when i manually called .Line and then .Close it didn't show.

Turns out that there are two bugs:

  1. Because z command does not have arguments, this check in LoadCommand prevents z command from loading and calling .Close. (numArgs will always be 0, as will argsIndex at the start)

  2. .Close method just makes line to .Start position. The problem is that .Start position never have been changed from Vector2.zero. That is why currently it makes opposite of closing shape - opening it if first point wasn't zero. (That's why my line which is actually is closed, loaded ok with .Path, but failed to show when i called .Close)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions