NAME

draw_str -- draw string into window

PROTOTYPE

unitptr draw_str( char *pcWdw, char *pcFmt, unitptr uHost)

ARGUMENTS

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[*]:
(text input field 0) character string to draw
Y_in[2 or 3]:
(input field 1) target position of character string in window (pixels or data coord when autoscaling)
Z_in[1]:
(input field 2) color (0-8)
CTL_in[1]:
(control field) mode

EXECUTION OF CREATED UNIT:

Draws input string 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:
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
%3D:
use 3D drawing mode
%iC:
use initial color i Default is %1m, i.e. red.
%f1:f2s:
specify that a window pixel has a size of f1 screen pixels along the horizontal direction, and of f2 screen pixels along the vertical direction (i.e. the horizontal and vertical mouse coordinates will be scaled by factors 1/f1 and 1/f2).
%f1:f2o:
add an offset vector (f1,f2) to the scaled coordinates. Th offset vector (f1,f2) is subtracted from the input vector X_in
In the case of conflicting options, the rightmost option of a set of conflicting options will prevail.

STATUS:

alpha

SEE ALSO:

mouse_xy

FILE

/amnt/loge/users/nistaff02/nistaff/rhaschke/nst7/man/../o.linux//../nstsrc/nst_draw.c