I'm trying to implement a box filter line drawing algorithm and i'm
having some difficulties. basically my problem is with finding the
area under a 1-pixel wide line. usually in the worst case it cover 3
adjacent pixels at given x coordinate that is on the line segment.
i'm wondering if there is a general formula based on the angle the
line intersects the pixels giving the area.
maybe i'm way off track here.. can anyone help?
another thought i had was to draw line segments between all the
intersection points of the 1-pixel wide line and a given x value..
this would split up the area into triangles.. and then using the cross
product to calculate the areas and add them up,, but this seems to me
a wasteful way of doing it..
any input would be greatly appreciated..