... 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.