The Filters sample is a fully functional Motif-based GUI sample that demonstrates all major operations that can be accomplished using ImageGear. This section provides information about how to display an image with the most common parameters by invoking just two ImageGear functions.
Although all ImageGear functions are based on pure Xlib and XToolkit capabilities and do not require additional libraries, the Filters sample uses Motif 1.2 libraries to demonstrate several advanced ImageGear functions. Motif can be found at http://www.opengroup.org/openmotif/.
According to the Motif programming concept, a Callback function, wndDrawImage_callback, in the filters.c module is called every time a window must be updated. The IG_dspl_update_rect_set() function passes a pointer to a structure with information that is part of the window to ImageGear. After that, IG_dspl_image_draw() should be called to make the actual drawing in this area.
The following is a segment from the filters.c module that demonstrates this:
Copy Code
|
|
---|---|
void wndDrawImage_callback( Widget w, XtPointer data, XtPointer call_data ) |