On Fri Feb 9 21:51:46 2024 +0000, Rémi Bernon wrote:
My 2 cents from a very quick look: what about a traversal function similar to `get_region_hrgn` but that only checks whether a point is inside a region, without constructing regions in most cases? You could then have a `is_visible_path_point` function to implement the path case, similar to `get_path_hrgn`, using a bounding box as a quick way to discard points outside of it, and keep the rasterization for now for anything within it. Then checking whether a point is within a polygon should also not be too difficult to implement in an efficient way (ie: without rasterizing at all), tho I don't know what GDI+ expects as a behavior here.
Doable, but it wouldn't be very efficient for cases where we need more than a 1x1 rasterization, and once we have that we may as well use it for the hit-testing (effectively a 1x1 rasterization) as well. A bounding box calculation is theoretically useful for path/region fills because it allows us to reduce the number of pixels we need to consider.