Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rectangle(3G) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

drawing_mode(3G)

fill_color(3G)

interior_style(3G)

perimeter_color(3G)

perimeter_type(3G)

perimeter_repeat_length(3G)

polygon(3G)

write_enable(3G)

rectangle(3G)

NAME

rectangle, dcrectangle, intrectangle − define rectangular region to be filled and/or edged

SYNOPSIS

C Syntax:

void rectangle ( fildes, x1, y1, x2, y2 );
int fildes;
float x1, y1, x2, y2;

void dcrectangle ( fildes, dcx1, dcy1, dcx2, dcy2 );
int fildes, dcx1, dcy1, dcx2, dcy2;

void intrectangle ( fildes, x1, y1, x2, y2 );
int fildes, x1, y1, x2, y2;

FORTRAN77 Syntax:

subroutine rectangle ( fildes, x1, y1, x2, y2 )
integer*4 fildes
real x1, y1, x2, y2

subroutine dcrectangle ( fildes, dcx1, dcy1, dcx2, dcy2 )
integer*4 fildes, dcx1, dcy1, dcx2, dcy2

subroutine intrectangle ( fildes, x1, y1, x2, y2 )
integer*4 fildes, x1, y1, x2, y2

Pascal Syntax:

procedure rectangle ( fildes:integer; x1, y1, x2, y2:real );

procedure dcrectangle ( fildes, dcx1, dcy1, dcx2, dcy2:integer );

procedure intrectangle ( fildes, x1, y1, x2, y2:integer );

DESCRIPTION

Input Parameters

fildes Integer file descriptor returned by gopen when an I/O path to a graphics device is opened. 

x1, y1 First corner of the rectangle in world coordinates. 

x2, y2 Second corner of the rectangle in world coordinates. 

dcx1, dcy1 First corner of the rectangle in device coordinates. 

dcx2, dcy2 Second corner of the rectangle in device coordinates. 

Discussion

A boundary of a rectangular region is defined by defining diagonally opposite corners of the rectangle.  If the transform mode has been set to 3-D, the z value used is that of the current position. 

The rectangle is filled and/or outlined according to the current interior style, using the current fill color and perimeter attributes.  As with all output primitives, rectangle is affected by the current drawing mode and write enable. 

No clipping or transformations are performed on device coordinate procedures. 

Device coordinate current pen position and world device coordinate current pen position are not related. If you are switching between the two coordinate systems, always begin the use of either system with a move to a known location before performing any other operations. 

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. 

SEE ALSO

drawing_mode(3G), fill_color(3G), interior_style(3G), perimeter_color(3G), perimeter_type(3G), perimeter_repeat_length(3G), polygon(3G), write_enable(3G). 

Hewlett-Packard Company  —  November 03, 1994

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