SoQtCursor::CustomCursor(3) SoQt SoQtCursor::CustomCursor(3)NAME
SoQtCursor::CustomCursor -
The SoQtCursor::CustomCursor class is used to specify bitmap data for SoQtCursor custom cursors.
SYNOPSIS
Public Attributes
SbVec2s dim
SbVec2s hotspot
unsigned char * bitmap
unsigned char * mask
Detailed Description
The SoQtCursor::CustomCursor class is used to specify bitmap data for SoQtCursor custom cursors.
Member Data Documentation
SbVec2s SoQtCursor::CustomCursor::dim Size of cursor data. Can be anything from 1 pixel wide and high, up to maximum 32 pixels in each
dimension.
SbVec2s SoQtCursor::CustomCursor::hotspot Position of cursor hotspot, ie the pixel of the cursor which is considered to be the 'pick point'
when interacting with the canvas or widgets.
The hotspot position should be specified relative to the uppermost, leftmost corner (which is position <0, 0>).
unsigned char * SoQtCursor::CustomCursor::bitmap The size of the array of bitmap data should be equal to (width+7)/8*height, as each cursor
pixel is specified with just two bits, one in the bitmap array, one in the mask array.
The bitmap and mask bits should be laid out as follows:
B=1 and M=1 == black
B=0 and M=1 == white
B=0 and M=0 == transparency
B=1 and M=0 will give undefined results for some platforms, so avoid.
unsigned char * SoQtCursor::CustomCursor::mask See doc of SoQtCursor::CustomCursor::bitmap.
Author
Generated automatically by Doxygen for SoQt from the source code.
Version 1.5.0 Sun Dec 11 2011 SoQtCursor::CustomCursor(3)
Check Out this Related Man Page
XCreatePixmapCursor() XCreatePixmapCursor()
Name
XCreatePixmapCursor - create a cursor from two bitmaps.
Synopsis
Cursor XCreatePixmapCursor(display, source, mask, foreground_color,
background_color, x, y)
Display *display;
Pixmap source;
Pixmap mask;
XColor *foreground_color;
XColor *background_color;
unsigned int x, y;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
source Specifies the shape of the source cursor. A pixmap of depth 1.
mask Specifies the bits of the cursor that are to be displayed (the mask or stipple). A pixmap of depth 1. May be None.
foreground_color
Specifies the red, green, and blue (RGB) values for the foreground.
background_color
Specifies the red, green, and blue (RGB) values for the background.
x Specify the coordinates of the cursor's hotspot relative to the source's origin. Must be a point within the source.
y
Returns
The created cursor.
Description
XCreatePixmapCursor() creates a cursor and returns a cursor ID. Foreground and background RGB values must be specified using fore-
ground_color and background_color, even if the server only has a monochrome screen. The foreground_color is used for the 1 bits in the
source, and the background is used for the 0 bits. Both source and mask (if specified) must have depth 1, but can have any root. The mask
pixmap defines the shape of the cursor; that is, the 1 bits in the mask define which source pixels will be displayed. If no mask is given,
all pixels of the source are displayed. The mask, if present, must be the same size as the source.
The pixmaps can be freed immediately if no further explicit references to them are to be made.
For more information on cursors, see Volume One, Chapter 6, Drawing Graphics and Text.
Structures
typedef struct {
unsigned long pixel;
unsigned short red, green, blue;
char flags; /* DoRed, DoGreen, DoBlue */
char pad;
} XColor;
Errors
BadAlloc
BadMatch Mask bitmap must be the same size as source bitmap.
BadPixmap
See Also
XCreateBitmapFromData(), XDefineCursor(), XCreateFontCursor(), XCreatePixmap(), XCreatePixmapCursor(), XFreeCursor(), XFreePixmap(),
XQueryBestCursor(), XQueryBestCursor(), XQueryBestSize(), XQueryBestSize(), XReadBitmapFile(), XRecolorCursor(), XUndefineCursor().
Xlib - Pixmaps and Tiles XCreatePixmapCursor()