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

Feature Request: set a BLPath using the SVG geometry specification #50

Open
abu-irrational opened this issue Oct 3, 2019 · 3 comments

Comments

@abu-irrational
Copy link

I think it might be useful to add an alternative mode for building a BLPath, using the SVG notation:
something like
blPath->set("M 10 20 C -0 20 .......")
and conversely, get the path geometry as an equivalent internal string (.. just using the M, L, C, Q, Z 'commands' ...)

@kobalicek
Copy link
Member

I think this makes sense when we have locale-independent string to double conversion.

@abu-irrational
Copy link
Author

? what does it means ?
Are you talking about the format of the numerical coordinates ?
The only valid format should be the standard (american?) notation,
eg "12345.02" or "3.34e+2" ....
locale specific format such as "1.000,0" (italian notation) or "1,000.0" (english notation) should be forbidden.

see https://www.w3.org/TR/SVG/paths.html
[...]
The path data syntax is a prefix notation (i.e., commands followed by parameters). The only allowable decimal point is a Unicode U+0046 FULL STOP (".") character (also referred to in Unicode as PERIOD, dot and decimal point) and no other delimiter characters are allowed [UNICODE]. (For example, the following is an invalid numeric value in a path data stream: "13,000.56". Instead, say: "13000.56".)

@kobalicek
Copy link
Member

kobalicek commented Oct 4, 2019

I'm talking about functions like atof(), strtod(), etc... that are affected by locale. I have already written SVG path data parser, so it's not a problem from this point of view, just don't want to deal with float parsing at the moment.

So keeping this open as I think it would be nice to have, but at the moment text is a higher priority.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants