Contour Widget Class


Defined Functions

The following convenience functions are defined for creating and using a Contour widget.

Function NameDescription
XintCreateContourCreates an unmanaged Contour widget.
XintContourAbortAborts computation during gridding process.
XintContourFreeContourLevelConvenience function to free a contour level structure returned by function XintContourGetContourLevel.
XintContourGetContourLevelReturns a structure containing a contour level description for the specified Z value.
XintContourGetZValueReturns the Z value at a given location.
XintContourZoomZoom a Contour widget.


XintCreateContour

XintCreateContour creates an unmanaged Contour widget.

     Widget XintCreateContour (...)

WidgetparentParent of new Contour widget.
char *nameName of new Contour widget.
ArgListarglistList of resource/value items.
CardinalargcountNumber of items in arglist.


XintContourAbort

This function allow the application to abort computation during the gridding process.

     void XintContourAbort (Widget widget)

where widget is the ID of the contour widget.


XintContourFreeContourLevel

This convenience function can be used to free the contour level structure returned by function XintContourGetContourLevel.

     void XintContourFreeContourLevel (XintContourLevel *contour_level)

where contour_level is a pointer to a XintContourLevel structure.


XintContourGetContourLevel

This function allocates and returns a structure containing a contour level description for a particular Z value. The contour level description contains all the contours, described as an open or closed polyline, that match the specified Z value. Use convenience function XintContourFreeContourLevel to free the contour level structure after it is no longer needed.

     XintContourLevel *XintContourGetContourLevel (...)

WidgetwidgetID of contour widget.
floatz_valueThe Z value of interest.
intnrefineA positive integer that specifies the resolution of the output contours. (1 to get the grid resolution, 2 to get twice the grid resolution, etc.).

The function returns NULL if argument nrefine is invalid or if there is no grid available.


XintContourGetZValue

This function calculates the Z value at a given (X,Y) location.

     Boolean XintContourGetZValue (...)

WidgetwidgetID of contour widget.
floatxX coordinate.
floatyY coordinate.
float *z_valueReturns the corresponding Z value.

The function returns False if the input coordinate specification is outside the valid range.


XintContourZoom

Causes a selected area of a Contour widget display image to be zoomed. The area to be scaled must have been previously selected and returned to the application via an area selection callback.

     void XintContourZoom (...)

WidgetwidgetWidget ID of the Contour widget containing the area to be scaled.
WidgetparentSpecify a widget ID that will be used as the parent of the zoom widget or specify NULL to modify the original widget (zoom in place).
XintGridAreaSelectionCalbackStruct *selectionSpecify the address of the structure, returned by callback XmNareaSelectionCallback, that indicates the area to be zoomed or specify NULL if you want the whole widget area to be zoomed.
floatsxThe horizontal scale factor.
floatsyThe vertical scale factor.