User Tools

Site Tools


jvs:cigal:manual:chapter3:getbox

CIGAL Reference Manual, Chapter 3 (Functions): GETBOX

GETBOX -- Get the upper left and lower right coordinates of a box

usage: iarray = getbox(flag,nx,ny)

GETBOX lets you use the cursor to select a rectangular region of the screen. The function returns an integer array of 4 values: the upper-left X and Y coordinates and the lower-right X and Y coordinates.

If the NX and NY arguments are specified (and greater than 0), GETBOX will make a box of that size and then expects you to enter 1 screen position, which it will use as the upper-left corner of the box.

If NX and NY are not specified, GETBOX expects 2 screen positions: the upper-left and lower-right corners of the box. (Screen positions as usual are specified by moving the cursor and then pressing the left mouse button or the <ENTER> key.)

The FLAG argument can be used to specify whether the returned values are to be in text position units (FLAG == 1) instead of pixel units, and whether in 3-dimensions (FLAG == 2) instead of 2 dimensions. By default, GETBOX returns pixel units if in a graphics mode and text units if in a non-graphics mode (see VMODE(4)). GETBOX always returns values in 2 dimensions when returning text position units.

See Also:
BOX(2), CURSOR(4), GETTXT(3), VMODE(4)

CIGAL Home, CIGAL Manual, Functions List, Manual Help

jvs/cigal/manual/chapter3/getbox.txt · Last modified: 2023/02/23 18:43 (external edit)