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] Passing DrawPoints a Partial Array #2986

Open
1 task done
DJGosnell opened this issue Sep 3, 2024 · 0 comments · May be fixed by #2987
Open
1 task done

[FEATURE] Passing DrawPoints a Partial Array #2986

DJGosnell opened this issue Sep 3, 2024 · 0 comments · May be fixed by #2987

Comments

@DJGosnell
Copy link

Is your feature request related to a problem?

Sometimes it's useful to pass an array of points to SKCanvas.DrawPoints but not to draw all of them. Currently there is no public method of accomplishing a partial array draw.

Describe the solution you would like

Add an override to SKCanvas.DrawPoints to allow for passing a count parameter to the SkiaApi.sk_canvas_draw_points method instead of just passing the entire array length as it currently does.

Describe alternatives you have considered

Currently the way to get around this is to create an array with the proper size ahead of time and allocate it on the heap but that requires allocation. It would be even nicer to utilize Spans for this so they can be sliced, but I see multiple PRs #2617 & #2669 are stalled so I'm not sure about their integration.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@DJGosnell DJGosnell changed the title [FEATURE] <title> [FEATURE] Passing DrawPoints a Partial Array Sep 3, 2024
@DJGosnell DJGosnell linked a pull request Sep 3, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready For Work
Development

Successfully merging a pull request may close this issue.

1 participant