Raster ServicesAvailability LightWave® 6.0 Raster services are a set of functions for manipulating bitmaps (rasters) used as interface elements in your panels. A raster isn't visible until you call blitPanel to draw it on a panel. Global Call LWRasterFuncs *rastf; rastf = global( LWRASTERFUNCS_GLOBAL, GFUSE_TRANSIENT ); The global function returns a pointer to an LWRasterFuncs. typedef struct st_LWRasterFuncs {
void (*drawPixel) (LWRasterID, int color, int x, int y);
void (*drawRGBPixel)(LWRasterID, int r, int g, int b,
int x, int y);
void (*drawLine) (LWRasterID, int color, int x, int y,
int x2, int y2);
void (*drawBox) (LWRasterID, int color, int x, int y,
int w, int h);
void (*drawRGBBox) (LWRasterID, int r, int g, int b,
int x, int y, int w, int h);
void (*eraseBox) (LWRasterID, int x, int y, int w,
int h);
void (*drawBorder) (LWRasterID, int indent, int x, int y,
int w, int h);
void (*drawText) (LWRasterID, char *, int color, int x,
int y);
LWRasterID (*create) (int w, int h, int flags);
void (*destroy) (LWRasterID);
void (*blitPanel) (LWRasterID, int x, int y, LWPanelID,
int x, int y, int w, int h);
} LWRasterFuncs;
Example The binview SDK sample makes extensive use of the raster functions to create and display its own fixed-pitch font glyphs. It also uses a raster to display an icon. |