Some theory:
Here are some illustrations that shows the pixel we want to draw.
The grid shows the pixels that the monitor has, also our boundary - We can't draw
between those pixels.
Lest say we want to draw a red pixel on X position 2.6 and Y position 2.8 - Right between
two monitor pixels. Without AA the pixels position would be rounded off and it would
be painted on X 3 and Y 3 and we can't do anything about that, that's why we simulate
that the pixel is drawn inbetween. We do this by drawing 4 pixels (because our pixel
touches 4 of the monitors pixels) with different colors depending on how much our pixel
touches the surrounding pixels.
As you can see in the illustration, our pixel only touches the (2,2) pixel a little bit,
so we draw the (2,2) pixel just a little bit read.
The illustration also shows that our pixel touches the (3,3) pixel very much, so we will
draw that one almost red.
We do like this for all the pixels we touch. (In this case there are 4 pixels, but sometimes
there are only 2 pixels ore maybe even just 1)




Reply With Quote