DRAW(3G)
NAME
draw2d, draw3d, dcdraw − draw a line from the current pen position to the specified pen position.
SYNOPSIS
C SYNTAX
void draw2d(fildes,x,y)
int fildes
float x,y
void draw3d (fildes,x,y,z)
int fildes
float x,y,z
void dcdraw (fildes,x,y)
int fildes,x,y
FORTRAN77 SYNTAX
subroutine draw2d(fildes,x,y)
integer*4 fildes
real x,y
subroutine draw3d(fildes,x,y,z)
integer*4 fildes
real x,y,z
subroutine dcdraw(fildes,x,y)
integer*4 fildes,x,y
PASCAL SYNTAX
procedure draw2d(fildes:integer;x,y:real);
procedure draw3d(fildes:integer;x,y,z:real);
procedure dcdraw(fildes,x,y:integer);
HP-UX COMPATIBILITY
Level: HP-UX/STANDARD
Origin: HP
DESCRIPTION
INPUT PARAMETERS
fildes
is an integer file descriptor returned by gopen when the I/O path to the output graphic device is opened.
x, y, z
defines the position to draw to and the new current pen position.
DISCUSSION
All drawing is performed using the current line attributes, drawing_mode and write_enable. The procedures draw2d and draw3d use world coordinate values. The procedure dcdraw uses Device Coordinate values.
dcdraw draws a line in device coordinates and does not go through any transformations or clipping steps. dcdraw is device dependent and should NOT be used if portability between devices is desired.
If a series of draws and/or moves are to be executed in succession, the polyline procedure will give much superior performance.
The current pen position for device coordinate operations is entirely different than that of world coordinates. Device Coordinate current pen position is only consistent between Device Coordinate operations. After any world coordinates operation a dcmove should be done before other Device Coordinate operations.
Similarly, the world coordinate current pen position is only consistent between world coordinate operations.
When using a line style other than solid it is important to note that the pattern may not be continuous between draws. The pattern may restart at the beginning of any draw. If a continuous pattern is important use polyline.
SEE ALSO
drawing_mode(3g), line_color(3g), line_type(3g), line_repeat_length(3g), move(3g), polyline(3g), write_enable(3g).
Hewlett-Packard Company — May 11, 2021