Cicode Programming Reference > Cicode Function Categories > Display Functions Introduction > DspRubSetClip

DspRubSetClip

Sets the clipping region for the rubber band display. If you enable the clipping region, the rubber band will not move outside of the clip region. This allows you to restrict the rubber band to within some constrained region. (For example, to prevent an operator from dragging the rubber band outside of the trend display when zooming the trend.)

you need to call this function (to enable the clipping region) before you can start the rubber band selection (with the DspRubStart() function).

Syntax

DspRubSetClip(x1, y1, x2, y2)

x1,y1,x2,y2:

The x and y coordinates of the clipping region.

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

DspRubStart, DspRubEnd, DspRubMove

Example

// Set the clipping region to a rectangle starting at 100, 100 to 
200, 300
DspRubSetClip(100, 100, 200, 300);
// Start the rubber band display with clipping mode on
DspRubStart(x, y, 4);

See Also

Display Functions