Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Related to previous commit, this fixes "relative curves" #3

Merged
merged 3 commits into from
Nov 24, 2011
Merged

Related to previous commit, this fixes "relative curves" #3

merged 3 commits into from
Nov 24, 2011

Conversation

adamgit
Copy link

@adamgit adamgit commented Nov 24, 2011

The spec: "For the relative versions of the commands, all coordinate values shall be relative to the current point at the start of the command."

...main repository is instead using the point "at the start of the line" (each new step is defined in the spec as a new "command")

Added a simple SVG that demonstrates the bug, and shows it is fixed (test-wave-1.svg - should look like a roughly sinusoidal wave going horizontally across the screen)

…NITIAL point as their relative origin, in contravention of the spec: "For the relative versions of the commands, all coordinate values shall be relative to the current point at the start of the command."

Added a simple SVG that demonstrates the bug, and shows it is fixed (test-wave-1.svg - should look like a roughly sinusoidal wave going horizontally across the screen)
@adamgit
Copy link
Author

adamgit commented Nov 24, 2011

(by "line" above I mean ... the text line of input from the source file)

@adamgit
Copy link
Author

adamgit commented Nov 24, 2011

Ah, forgot to add: this includes an optional #define'd debug for all CGPath rendering, helps a lot with fixing these parser issues. It's defaulted to off, so compiled-out, but I recommend leaving it there as an option for future debugging.

(SVGKit is now rendering all the inkscape files I throw at it, but it's still failing on some famous SVG files, e.g. the Tiger, so clearly tehre's still some debugging to do here)

adam added 2 commits November 24, 2011 12:24
…e SVG document can be fetched by "id" tag (which is used in e.g. Inkscape as a general-purpose "name")
@reklis
Copy link
Owner

reklis commented Nov 24, 2011

Awesome, thanks! I thought at first we could avoid using the flag and simply test the parameter to see if it's equal to zero, but then I realized that wouldnt work if one of the points in the path actually was 0,0 midstream.

reklis pushed a commit that referenced this pull request Nov 24, 2011
Related to previous commit, this fixes "relative curves"
@reklis reklis merged commit e00cf9a into reklis:master Nov 24, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants