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

Implement SkPoint class & SkPathMeasure #179

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ErikSom
Copy link
Contributor

@ErikSom ErikSom commented May 25, 2024

Adding class implementation for SkPoint and SkPathMeasure.

I tried getting the SkPathMeasure to work with the following embind:

    value_array<SkPoint>("SkPoint")
        .element(&SkPoint::fX)
        .element(&SkPoint::fY);

But I kept on getting the error UnboundTypeError, Cannot call SkPathMeasure._getPosTan due to unbound types: 0x2c03
It seems when using a value_array as a raw pointer there are difficulties with properly binding the C++ types to their JavaScript equivalents.

I would also like to implement SkPathMeasure::getMatrix but this would also require binding the SkMatrix with class_<SkMatrix>, and before I do that I wanted to check in with you If I'm missing something or if this is the way to go.

@skia-codereview-bot
Copy link
Collaborator

This PR (HEAD: c523e15) has been imported to Gerrit for code review.

Please visit review.skia.org/858116 to see it. Please CC yourself to the Gerrit change.

Note:

  • Skia uses only Gerrit for reviews and submitting code (doc).
  • All comments are handled within Gerrit. Any comments on the GitHub PR will be ignored.
  • The PR author can continue to upload commits to the branch used by the PR in order to address feedback from Gerrit.
  • Once the code is ready to be merged, a maintainer will submit the change on Gerrit and skia-codereview-bot will close this PR.
  • Similarly, if a change is abandoned on Gerrit, the corresponding PR will be closed with a note.

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