You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo_Image object:

Class

Cvo_Image

Syntax

#include <Cvo/Image.h++>

new Cvo_Image ( Cvo_Window *window,
[ char *filename,
[ char *resource ] ] )
new Cvo_Image ( Cvo_Window *window,
int width,
int height,
int depth,
CARD8 *bitmap )
new Cvo_Image ( Cvo_Window *window,
int width,
int height,
int ncolors,
int cpp,
char **colors,
char **pixels )

Overview

The Cvo_Image object stores an image (pixmap or bitmap) for later display in another object. The window parameter is used to determine things such as the display and depth of the window. It is also used for caching so that if the same image is loaded several times it will be shared. The window itself is used to look at resources, but for all other purposes the root window of that tree is used (so sibling windows may share Cvo_Image objects).

In all cases, if the resource pixmapFile(PixmapFile) (or resource(PixmapFile) in the first construction method) identifies a valid file, that file will be used and all other arguments will be ignored. Valid file formats are: XBM (X11 Bitmap), XPM and XPM2.

If a filename argument is passed, the Cvo_Image object attempts to load an image from that file.

If width, height, depth and bitmap are specified they should refer to a valid X11 bitmap.

If width, height, ncolors, cpp, colors, and pixels are specified, they should refer to a valid XPM pixmap. The array colors is two string pairs (i.e. 2 * ncolors strings) in which the first string describes the code for the color and the second string identifies the color. The pixels array should consist of height strings, each identifying width pixels by the codes given in the colors string array.

Member Functions

This object defines the following member functions.


See the example source code for an example of how to use this object.


See the legend for information about the conventions used in this documentation.