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

Add dedicated polygon rasterizing metho #5

Open
xulman opened this issue Oct 6, 2024 · 0 comments
Open

Add dedicated polygon rasterizing metho #5

xulman opened this issue Oct 6, 2024 · 0 comments

Comments

@xulman
Copy link
Contributor

xulman commented Oct 6, 2024

... into PlanarShapesRasterizer as a new (utility) method, e.g. by implementing the "scanline" method (goes along x-axis from a border to a border).

Currently, the rasterization happens stupidly by sweeping the bounding box of the polygon and querying isPointInShape().
So, it a) scans more pixels it needs, and b) the query does not benefit from the knowledge obtained during previous query.

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