Skip to content
This repository

ctx.arcTo Bug #56

apitaru opened this Issue · 2 comments

2 participants

Amit Pitaru Dominic Szablewski
Amit Pitaru

While trying to port a few vector drawings into ejecta, I noticed that arcTo() is not drawing predictably.

A simple example is here:

In this example Ejecta will not draw the curve at all, making me thing that in arcToX1 "if( mm < 1.0e-8 || radius == 0 )" is inaccurately returning true. But more sophisticated drawings will cause it to shoot lines in unpredictable directions, so I think one of the base variables might be wrong.

I also looked at the original code that you mention arcToX1 is taken from ( ), and I wonder if your "cp" variable is getting the right values from:

EJVector2 cp = EJVector2ApplyTransform(EJVector2Make(x1, y1), CGAffineTransformInvert(transform));

Sorry I can't be more descriptive - I'm humbled by the math there : )


Amit Pitaru apitaru reopened this
Amit Pitaru

(btw - a few days ago i created a duplicate issue. github doesn't allow to delete them, so i'm "recycling" it with a new topic. sorry about that. never again.

Dominic Szablewski

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.