Raster
Name
Raster -- A two dimension color display class.
Description
2 dimensional, colour pixel images. Raster is based on a Tk frame widget with our own code for fast display of images. You can draw coloured dots on a Raster, or generic Drawers. Raster widgets are double buffered - the pixels you draw are not actually put on the screen until drawSelf is called. In addition, Rasters handle mouse clicks.
Methods
Phase: Using
- (void)
erase Erase the raster.
- (void)
draw: (id <Drawer>)
drawer X: (int)
x Y: (int)
y Draw an object at a given position.
- (void)
rectangleX0: (int)
x0 Y0: (int)
y0 X1: (int)
x1 Y1: (int)
y1 Width: (unsigned)
penWidth Color: (Color)
c Draw a rectangle of given geometry, pen width, and color.
- (void)
lineX0: (int)
x0 Y0: (int)
y0 X1: (int)
x1 Y1: (int)
y1 Width: (unsigned)
penWidth Color: (Color)
c Draw a line of given geometry, pen width, and color.
- (void)
ellipseX0: (int)
x0 Y0: (int)
y0 X1: (int)
x1 Y1: (int)
y1 Width: (unsigned)
penWidth Color: (Color)
c Draw an ellipse of given geometry, pen width, and color.
- (void)
fillRectangleX0: (int)
x0 Y0: (int)
y0 X1: (int)
x1 Y1: (int)
y1 Color: (Color)
color Fill a rectangle of given geometry and color.
- (void)
setButton: (int)
n Client: c Message: (SEL)
sel Configure at mouse button to send a message to a given client object.
- (void)
drawSelf Draw the raster to the display.
- (void)
drawPointX: (int)
x Y: (int)
y Color: (Color)
c Draw a point at the given coordinates with the given color.
-
setColormap: (id <Colormap>)
c Set the palette for this raster.