InterViews Reference Manual -- Raster
NAME
Raster - simple rasterized image data
SYNOPSIS
#include <InterViews/raster.h>
DESCRIPTION
A Raster is a two-dimensional array of Colors that can be rendered by
a Painter. Rasters can be constructed from data supplied by the application
program or from a region of a Canvas. The only operations currently defined on
rasters are for accessing individual raster cells.
PUBLIC OPERATIONS
Raster(Color** data, int width, int height)
Create a raster from the data specified. The data is formatted as a
two-dimensional matrix of pointers to Colors, organized in row-major order.
The data is transferred into an internal format, so subsequent changes in
either the passed data or the raster will not affect the other. Passing nil to
data is equivalent to passing an array with all cells containing a
pointer to the predefined Color white.
Raster(Canvas*, Coord x0, Coord y0, int width, int height)
Create a raster from the current contents of the Canvas. The coordinates
x0 and y0 specify the lower left corner of the region of the
Canvas to use.
Raster(Raster*)
Create a copy of the given raster.
int Width()
int Height()
These operations return the size of the raster.
Color* Peek(int x, int y)
void Poke(Color*, int
x, int y)
bool Contains(int x, int y)
Operations for reading and writing individual cells in the raster. If the
specified coordinates are not within the raster bounds, Contains
returns false, Peek returns nil, and Poke has no effect.
SEE ALSO
Painter , Transformer
Next: Regexp
| Prev: PropertySheet
| Up: index
| Top: index