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

SVG: Added support for curves and removed flattening of the geometry #79

Merged
merged 1 commit into from Apr 9, 2017
Merged

SVG: Added support for curves and removed flattening of the geometry #79

merged 1 commit into from Apr 9, 2017

Conversation

ghost
Copy link

@ghost ghost commented Apr 8, 2017

Second attempt.. grin
Feel free to criticize & correct.

I'm not a fan of the if(.. is polywhatever) and then .. as polywhatever. constructs (casting twice)
Not sure how to fix it while maintaining readability.

I was also thinking about ditching the entire RenderGeometry thing. It creates more problems than it solves. For example I wanted to include colors in the svg but the geometry only provides path data not colors.

edit: I forgot: currently the geometry returned by BuildGeometry auto converts to cubic bezier curves while truetype fonts has quadratic curves. I've added the case for quadratic curves but it's untested. Should you want to use a more general portable non-wpf (freetype, for example) method of reading/rendering fonts, it's already in there and should work.

@ForNeVeR ForNeVeR requested review from ForNeVeR and gsomix April 8, 2017 14:51
@ForNeVeR ForNeVeR self-assigned this Apr 8, 2017
@ForNeVeR
Copy link
Owner

ForNeVeR commented Apr 9, 2017

Old part of the sigma sign (first) vs. the newer part (second):

image image

@Nocturnals, that's excellent, thank you.

@ForNeVeR ForNeVeR merged commit 1094d80 into ForNeVeR:master Apr 9, 2017
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