void GrClearBitmap(
GStateHandle gstate); /* GState to affect */
Clear out the content of a bitmap. Note that the part of the bitmap actually cleared depends on the bitmap mode. For the normal mode, the data portion of the bitmap is cleared. If the bitmap is in BM_EDIT_MASK mode, then the mask is cleared and the data portion is left alone.
Include: graphics.h
void GrCloseSubPath(
GStateHandle gstate); /* GState to affect */
Geometrically closes the currently open path segment. Note that you must still call
GrEndPath()
to end the path definition.
Include: graphics.h
void GrComment(
GStateHandle gstate, /* GState to affect */
const void * data, /* comment string */
word size); /* Size of data, in bytes */
Write a comment out to a graphics string.
Include: graphics.h
GSRetType GrCopyGString(
GStateHandle source, /* GState from which to get GString */
GStateHandle dest, /* GState to which to copy GString */
GSControl flags); /* flags for the copy */
Copy all or part of a Graphics String. The
GSControl
record can have the following flags:
GSC_ONE /* just do one element */ GSC_MISC /* return on MISC opcode */ GSC_LABEL /* return on GR_LABEL opcode */ GSC_ESCAPE /* return on GR_ESCAPE opcode */ GSC_NEW_PAGE /* return when we get to a NEW_PAGE */ GSC_XFORM /* return on TRANSFORMATIONopcode */ GSC_OUTPUT: /* return on OUTPUT opcode */ GSC_ATTR /* return on ATTRIBUTE opcode */ GSC_PATH /* return on PATH opcode */
The return value can be any one of
GSRetType
, a byte-size field:
GSRT_COMPLETE GSRT_ONE GSRT_MISC GSRT_LABEL GSRT_ESCAPE GSRT_NEW_PAGE GSRT_XFORM GSRT_OUTPUT GSRT_ATTR GSRT_PATH GSRT_FAULT
Include: gstring.h
VMBlockHandle GrCreateBitmap(
BMFormat initFormat, /* color fomat of bitmap */
word initWidth, /* initial width of bitmap */
word initHeight, /* initial height of bitmap */
VMFileHandle vmFile, /* VM file to hold bitmap's data*/
optr exposureOD, /* optr to get MSG_META_EXPOSED */
GStateHandle * bmgs); /* Draws to this GState
* will draw to the bitmap */
This routine allocates memory for a bitmap and creates an off-screen window in which to hold the bitmap. This routine takes the following arguments:
The routine returns a
VMBlockHandle
, the handle of the block within the passed VM file which contains the bitmap's data. The block will be set up as the first block of a HugeArray. Its header area will be filled with the following:
CBitmap
structure which contains some basic information about the bitmap.The bitmap's raw data is in the VM block, but outside of the header area.
Include: graphics.h
GStateHandle GrCreateGString(
Handle han, /* memory, stream, or VM file handle */
GStringType hanType, /* type of handle in han parameter */
word * gsBlock); /* returned for GST_MEMORY and
* GST_VMEM types only */
Open a graphics string and start redirecting graphics orders to the string. The hanType parameter must be GST_MEMORY, GST_STREAM, or GST_VMEM.
Include: gstring.h
word GrCreatePalette( /* Returns # of entries in color table
* or 0 for monochrome or 24-bit */
GStateHandle gstate);
Create a color mapping table and associate it with the current window. Initialize the table entries to the default palette for the device.
Include: graphics.h
GStateHandle GrCreateState(
WindowHandle win); /* Window in which GState will be active */
Create a graphics state (GState) block containg default GState information.
If zero is passed, then the GState created will have no window associated with it.
Include: graphics.h
void GrDeleteGStringElement(
GStateHandle gstate, /* GState containing GString */
word count); /* number of elements to delete */
Delete a range of GString elements from the GString in the passed GState.
Include: graphics.h
GEOS SDK TechDocs
|
|
GrApplyTranslation() ...
|
GrDestroyBitmap() ...