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

BezierPath.point() returns a PathElement instead of a point #373

Open
rlafuente opened this issue Apr 7, 2021 · 2 comments
Open

BezierPath.point() returns a PathElement instead of a point #373

rlafuente opened this issue Apr 7, 2021 · 2 comments
Labels

Comments

@rlafuente
Copy link
Contributor

It seems to me that BezierPath.point() is broken. It should return a point, but returns a PathElement (see source -- the docstring there suggests that this was noticed before)

I checked current Nodebox and it seems to have the same issue (source).

This also breaks BezierPath.points() :( I wonder if it works on Nodebox.

@stuaxo
Copy link
Contributor

stuaxo commented Apr 7, 2021

PathElement might be more useful than Point here though... if you want to draw just some of the path, that's easy with a PathElement - e.g. draw just the arc() to this place.

Is it just point() the api, vs Point() the object thats confusing here ?

@rlafuente
Copy link
Contributor Author

It's another problem: BezierPath.point(t) is meant to find the point at position t (0-1) along the path. It needs to:

  1. Determine which PathElement contains the point
  2. Get the actual point coordinates inside that PathElement and return them

Right now, it only does 1. and not 2. Sorry, my wording was confusing!

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

No branches or pull requests

2 participants