This function sets the new value to update rectangle. Usually this value is received from Expose X event.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI IG_dspl_update_rect_set( |
Name | Type | Description |
---|---|---|
hIGear | HIGEAR | Image handle of an image. |
dwGrpID | DWORD | Identifier of the group in which to set the update rectangle. |
lpUpdateRect | const LPAT_RECTANGLE | Sets new value to UpdateRect option. |
Returns the number of ImageGear errors that occurred during this function call.
All pixel formats supported by ImageGear for C and C++.
filters
Copy Code
|
|
---|---|
void wndDrawImage_callback( Widget w, XtPointer data, XtPointer call_data ) { XmDrawingAreaCallbackStruct*cbs = (XmDrawingAreaCallbackStruct*)call_data; XExposeEvent*event = (XExposeEvent*)cbs->event; AT_RECTANGLEUpdateRect; /* Redisplay only on last event of the series */ if( IG_image_is_valid( hIGear ) ) { /* Set the dirty rectangle for repaint */ UpdateRect.x= event->x; UpdateRect.y= event->y; UpdateRect.width= event->width; UpdateRect.height = event->height; IG_dspl_update_rect_set( hIGear, IG_GRP_DEFAULT, &UpdateRect ); /* Repaint window on expose events */ IG_dspl_image_draw( hIGear, IG_GRP_DEFAULT, XtWindow(w), XDefaultGCOfScreen(XtScreen(w)), NULL ); } } |