Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

drawing_mode(3G)

inquire_current_position(3G)

line_color(3G)

line_endpoint(3G)

line_repeat_length(3G)

line_type(3G)

line_width(3G)

move(3G)

polyline(3G)

write_enable(3G)

draw(3G)

NAME

draw2d, draw3d, dcdraw, intdraw2d − 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;

void intdraw2d(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

subroutine intdraw2d(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);

procedure intdraw2d(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, draw3d, and intdraw2d 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. Line style is not supported on lines wider than zero width.

Integer operations are only available when using the INT_XFORM gopen mode. When in INT_XFORM mode, floating point operations are not available for that fildes. Floating point operations are the default, or can be specified with FLOAT_XFORM mode. For a list of integer operations, floating point operations and common operations see the starbase.3g manual page. 

For increased performance for draw2d and draw3d, macros can be used to generate in-line code for C. See "Move and Draw Macros" in Starbase Graphics Techniques − HP-UX Concepts and Tutorials. 

SEE ALSO

drawing_mode(3G), inquire_current_position(3G), line_color(3G), line_endpoint(3G), line_repeat_length(3G), line_type(3G), line_width(3G), move(3G), polyline(3G), write_enable(3G), Starbase Graphics Techniques. 

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026