GDroi2d_buffer


Synopsis

define the data structure for the interactive drawing modules

GDroi2d_buffer


group GDroi2d_buffer
{
int npoints;
short pointbuf[npoints*2];
int nlines;
short linebuf[nlines*4];
int nbox;
short boxbuf[nbox*4];
int nfree;
int fbuf_size;
short freebuf[fbuf_size];
};

Description

GDroi2d_buffer is the major data structure that is unique to the ROI modules. This is the structure that is produced during the construction phase (that is, by the GDroi2d_click and GDroi2d_cont modules) and converted to world space during the mapping phase (that is, by the GDmap2d_ss module).

The data structure contains separate areas for points, lines, boxes, and freehand regions.

The data kept for points is the number of points and a buffer of XY screen space coordinates. Each point is represented by an XY position.

The data kept for lines is the number of lines and a buffer of XY screen space coordinates. Each line is represented by a start XY and end XY position.

The data kept for boxes is the number of boxes and a buffer of XY screen space coordinates. Each box is represented by start corner and end corner. The corners can be specfied arbitrarily; they are sorted appropriately by the low-level drawing routine.

The data kept for the freehand regions is the number of regions and a buffer of information. The data kept for each region is the number of points in the region and a set of XY screen space positions. Each region is expected to be closed.

Example

Libraries.Graphics_Display.Interactivity.GDroi2d_click
Libraries.Graphics_Display.Interactivity.GDroi2d_cont
Libraries.Graphics_Display.Interactivity.GDmap2d_ss

File

v/gd.v

See also