Image Object Class
Overview
The ImageObject class displays an image that is specified as a pixmap. The
location and size of the image is specified in user coordinates using inherited
resource XmNrectangle. If resource XmNimageDisplayMode is set to
XintIMAGE_INTERPOLATE, the image is interpolated to fit into the specified
rectangle. If resource XmNimageDisplayMode is set to XintIMAGE_FIXED, the
rectangle end points are modified to match the image size.
If the input pixmap is of depth 1, inherited resources XmNfillColor (unset bits)
and XmNstippleColor (set bits) control the color of the bitmap. If inherited
resource XmNfillStyle (from Graphic class) is set to XintFILL_STIPPLED, the
bitmap is drawn in transparent mode, i.e. only the set bits are drawn.
Inherited Behavior and Resources
The Image object class inherits behavior and resources from the Xt Object,
Graphic and Rectangle classes.
- The class pointer is xintImageObjectClass.
- The class name is XintImageObject.
- The header file is included as <Xint/ImageObject.h>.
XmNimageColorRecord
Specifies a pointer to a color record structure describing the colors used by
the input pixmap XmNimagePixmap. This resource needs only to be specified in
cases where the image needs to be saved into an ASCII file (using function
XintEditObjectWriteFile for example) or cut and pasted from one application to
another, so that the colors used by the pixmap get saved and reallocated when
the image object is restored. See function XintChartCreateColorRecord to build
a color record structure. If used, the color record structure should contain a
list of all the pixels used by the image pixmap.
XmNimageDisplayMode
This resource controls how the image is processed. The value of this resource
is specified as one of the defined constants listed below:
| Resource Value | Description
|
|---|
| XintIMAGE_FIXED | The size of the rectangle specified with resource XmNrectangle is adjusted to match exactly the size of the input pixmap.
|
| XintIMAGE_INTERPOLATE (default) | The image is interpolated to fit the rectangle specified with resource XmNrectangle.
|
XmNimagePixmap
Specifies the pixmap to display by the image object. This pixmap depth should
be 1 or equal to the depth of the widget containing the image.
XmNfreePixmap
Specifies whether or not to free the pixmap, specified using resource
XmNimagePixmap, when the Image object is destroyed or when a new pixmap is
provided in a SetValues operation.
Defined Functions
Function XintCreateImageObject creates an Image object.
Object XintCreateImageObject (...)
| Widget | parent | Parent of new Image object.
|
| char * | name | Name of new Image object.
|
| ArgList | arglist | List of resource/value items.
|
| Cardinal | argcount | Number of items in arglist.
|
Macros
Macro XintIsImageObject returns True if the specified object is an Image object.
Boolean XintIsImageObject (Object object)