DRAW(3G)
NAME
draw2d, draw3d, dcdraw − draw line from current to 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);
DESCRIPTION
Input Parameters
fildes 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.
Procedures draw2d and draw3d use world coordinate values, while dcdraw uses Device Coordinate values.
Dcdraw draws a line in device coordinates without going through any transformations or clipping steps. Dcdraw is device-dependent and should not be used when portability between devices is desirable.
If a series of draws and/or moves are to be executed in succession, the polyline procedure is much faster.
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 performed before any other Device Coordinate operations.
Similarly, the world coordinate current pen position is only consistent between world coordinate operations.
Note that when using a line style other than solid, 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_repeat_length(3G), line_type(3G), move(3G),
polyline(3G), write_enable(3G).
Hewlett-Packard Company — May 11, 2021