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

How do you use AddArc given the context from SVG2.0 data? #15

Open
steampoweredtaco opened this issue Jun 3, 2022 · 0 comments
Open

Comments

@steampoweredtaco
Copy link

First, thanks for the library. This might be considered related to #13 Given documentation or a test as an example for AddArc may clarify both issues.

I am trying to figure out how to use AddArc given an SVG 2.0 instruction.

func AddArc(points []float64, cx, cy, px, py float64, p Adder) (lx, ly float64) {

Let's assume I have M 0 0 a4.9916 4.9916 0 0 1 -0.59375 0.1875 notice this is the relative version which I think simply means that the last two values must be adjusted by the current point and in this case it is 0, 0.

I have summarized so far that the Points is basically all the parameters of a, no issue there. What I can't figure out is what is cx, cy, px, py parameters?

I can't seem to get the correct arc. Is cx,cy current point that would make since, is that correct?

It is the px, py I don't really have any idea at all what it could be or how to derive it from the information I have.

Given this is a relative instruction would I need to update points based on the current location or is that somehow related to the c or p parameters?

Thanks for your time!

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

No branches or pull requests

1 participant