PixelMap (implements GifMaker)
by
Joe Strout
PixelMap is one implementation of the GifMaker abstract base class. It
creates a two-dimensional array of pixels; each pixel is an integer index
into a color palette.
Methods
- PixelMap(width,height,colors): constructor
- IsGood(x,y): return 1 if x,y is within map bounds
- GetColor(c): return RGB of given color number
- GetPixel(x,y): return color number of pixel x,y
- GetPixelRGB(x,y): return RGB of pixel x,y
- SetColor(c,rgb): set color number c to RGB rgb
- SetPixel(x,y,c): set pixel x,y to color c
- HLine(x1,x2,y,c): draw horizontal line in color c
- VLine(x,y1,y2,c): draw vertical line in color c
- FillBox(x1,x2,y1,y2,c): fill a rectangular area
Here's the source code:
http://www-ncmir.ucsd.edu/~jstrout/classlib/gifmaker/PixelMap.html
Last Updated:
6/07/96
Joe Strout (
joe@strout.net )