This function creates a new server side pixmap of the specified width and height.
![]() | A pixmap is basically an offscreen window. You can draw to a pixmap just as you would an on screen window. The return value of this function is a bit misleading, in that it should probably be a GR_DRAW_ID rather than a window ID. From a drawing point of view nano-X does not make much of a difference between window IDs and drawable IDs. |
![]() | When finished with the pixmap, the application must free the resources allocated to the pixmap by calling the function GrDestroyWindow() with the pixmap ID as the ID of the window to destroy. |
Type | Name | Description |
---|---|---|
GR_SIZE | width | The width in pixels of the pixmap. |
GR_SIZE | height | The height in pixels of the pixmap. |
void* | addr | Optional pointer to pixel buffer. If you have a pixel buffer already allocated for the pixmap, then pass that buffer via this parameter. If this parameter is NULL then the function will attemp to allocate a proper sized pixel buffer. If the pixel buffer is automatically allocated the buffer will automatically be freed when the pixmap is destroyed using GrDestroyWindow(). |