DMFXImageViewer(3dm) DMFXImageViewer(3dm)
DMFXImageViewer - An image viewer class for plugins
#include <dmedia/fx_image_viewer.h>
Methods of class DMFXImageViewer:
DMFXImageViewer( Widget parent )
~DMFXImageViewer()
void setBuf(const void *buf, unsigned int width, unsigned int height,
unsigned int rowBytes)
void redraw()
void setExposeCallback(ExposeCallback exposeCB, XtPointer clientData)
void setGLContext()
void restoreGLContext()
Boolean setKeepAspectRatio(Boolean keepAspect)
Boolean getKeepAspectRatio()
Special effects plugins may have user customizable settings in the form
of a dialog box. These dialog boxes may have an image viewer. This
class provides an easy way for plugins to display an image.
DMFXImageViewer(const char *name, Widget parent, const String *resources)
The plugin image viewer constructor.
~DMFXImageViewer( )
The plugin image viewer destructor.
void setBuf(const void *buf, unsigned int width, unsigned int height,
unsigned int rowBytes)
Takes a pointer to an ABGR image that is to be displayed in the gl
widget. The image is resized as needed to show up in the window.
Ownership of the pointer remains with the caller, *but* this object
Page 1
DMFXImageViewer(3dm) DMFXImageViewer(3dm)
retains a pointer to it until the next setBuf call. It is OK to call
setBuf with NULL.
void redraw( )
Redraws the image. Note that no explicit call to redraw() is
necessary after a setBuf() call.
void setExposeCallback(ExposeCallback exposeCB, XtPointer clientData)
Set the expose callback, where exposeCB should look like:
void exposeCB(Widget w, XtPointer clientData, const XEvent *xev);
Note that when using setBuf(), expose events are handled by the image
viewer class, and the plugin does not need to handle them.
void setGLContext( )
Saves the GL context. PlugIns that render with OpenGL, and want to
render directly to the screen can use the setGLContext(), and
restoreGLContext().
void restoreGLContext( )
Restores the GL context. PlugIns that render with OpenGL, and want
to render directly to the screen can use the setGLContext(), and
restoreGLContext().
Boolean setKeepAspectRatio(Boolean keepAspect)
Set whether or not the image viewer should maintain its aspect ratio.
Boolean getKeepAspectRatio( ) [Toc] [Back]
Return whether or not the image viewer should maintain its aspect
ratio.
DMFXDialog(3dm).
PPPPaaaaggggeeee 2222 [ Back ]
|