Anti-aliasing was achieved by calculating the color of an imaginary pixel that lies between a cluster of actual pixels. In other words, whereas an Image class offers a method similar to:
Color getColor(int x, int y)
we needed a method with the signature:
Color getColor(double x, double y)
This was achieved by blending the four actual pixels that surround any imaginary double-precision pixel. Its color value is based on the weighted average of its distance to the four surrounding pixels, as demonstrated in the applet below:



© 2001 HugeHands.