I’m developing an application where a user can define 4 pixel points on screen, and what I would like to do is fill this shape with pixels using SetPixels.
While I can do this easily for square or rectangular shapes, I was wondering if there is any efficient code or algorithm to do this for more irregular four-sided shapes, such as trapezoids etc.
Note : Filling the shape with a mesh is not an option.
So far the best option I can think of is to draw the outline, then draw a line from each pixel point of every outline, to every other outline point, but I’m not sure that’s very efficient.