NAME
draw_area -- draw area into window
PROTOTYPE
unitptr draw_area( int iNum, char *pcWdw, char *pcFmt, unitptr uHost)
ARGUMENTS
- int iNum
- nr of corner points: 0=dynamic, >0: scalar field, <0: packed field. Special case: iNum=1 or -1 as a shorthand for specifying a rectangle by its width and height.
- char *pcWdw
- specifies which window to draw into: if this string can be interpreted as an integer number iPos, the iPos -th successor window (if iPos>0 ) or the -iPos -th predecessor window (if iPos<0 ) is used; otherwise, a window that has pcWdw as its title is sought.
- char *pcFmt
- string to specify options
- unitptr uHost
- host unit
RETURN VALUE:
A pointer to the created unit or NULL in the case of an error.
INTERFACE OF CREATED UNIT:
- X_in[2]:
- position of origin
- Y_in[*]:
- 2*iNum corners of polygon enclosing area to fill
- Z_in[1]:
- (input field 2) fill color (0-8)
- in_3[1]
- optional rotation angle
- CTL_in[1]:
- (control field) size scaling factor (0=no drawing)
EXECUTION OF CREATED UNIT:
Draws area enclosed by polygon into designated predecessor window.
DESCRIPTION:
String fmt may be used to specify options
for this routine. Each option is of the form %f1:f2:f3c,
where f1..f3 are floating point numbers (which need not
all be present) and .c
is a control character. Currently, the following control fields
are recognized:
- %a:bR:
- centered rectangle of sides a and b. Will cause iNum=1.
- %R:
- initialize the iNum (as given in constructor)
corner points for a centered polygon.
For rotation angle=0, one corner is always on the vertical
axis. If iNum=0 was chosen, %R is ignored.
- %fS:
- initial scaling factor of f (e.g., to set size of
specified shapes).
- %C:
- only contour, i.e., unfilled (NOTE: %iC sets color).
- %D:
- expect rotation angle at in_3[0] in degrees (instead of radian).
- %a:
- automatic scaling (currently for xyplot
and write_pix-units.). If this option is specified,
the routine checks, whether any special coordinate system is defined
for the specified window w and if so, automatically interpretes
the specified location as given in these coordinates.
This is, for instance, useful
for windows created by units xyplot and write_pix.
The presence of this option overrides any other scaling option.
- %F:
- draw into frontbuffer
- %G:
- draw into backbuffer
- %iC:
- use initial color i
Default is %1C, i.e. red.
In the case of conflicting options, the rightmost option of a set of
conflicting options will prevail.
STATUS:
alpha
FILE
/local/homes/rhaschke/nst7/man/../o.linx86_64//../nstsrc/nst_draw.c