[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

rectcopy Subroutine

Purpose

Copies a rectangle of pixels with an optional zoom.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void rectcopy
(Screencoord xll, Screencoord yll, 
Screencoord xur, Screencoord yur, 
Screencoord newx, Screencoord newy)

FORTRAN Syntax

SUBROUTINE RECTCO(xll, yll, xur, yur, newx, newy)
INTEGER*4 xll, yll, xur, yur, newx, newy
Note: For FORTRAN users, this subroutine accepts long integer parameters (INTEGER*4) when invoked from a FORTRAN program, although it accepts short integers when invoked from a C program. The C and FORTRAN syntax shown here reflect this difference.

Description

The rectcopy subroutine copies a rectangular array of pixels to another position on the screen. The current viewport and screenmask mask the drawing of the copied region. Self-intersecting copies work correctly in all cases.

Use the rectzoom subroutine to zoom the destination independently in both the x and y directions. Self-intersecting copies also work correctly with zooming.

Use the readsource subroutine to specify the front buffer, the back buffer, or the z-buffer as the source.

On machines that support it, you can use the rectzoom subroutine to zoom the destination independently in both the x and y directions. Self-intersecting copies also work correctly with zooming.

Pixel format is not considered during the copy. For example, if you copy pixels that contain color index data into an RGB window, the display controller cannot correctly interpret it.

Use the frontbuffer, backbuffer, and zdraw subroutines to specify the destination.

All coordinates are relative to the lower left corner of the window, not the screen or viewport.

The rectcopy subroutine leaves the current character position unpredictable. The result of the rectcopy subroutine is undefined if the value of the bool parameter in the zbuffer subroutine is TRUE.

Note: This subroutine cannot be used to add to a display list.

Parameters

xll Specifies the x coordinate of one corner of the rectangle.
yll Specifies the y coordinate of one corner of the rectangle.
xur Specifies the x coordinate of the opposite corner of the rectangle.
yur Specifies the y coordinate of the opposite corner of the rectangle.
newx Specifies the x coordinate of the lower left corner of the new position of the rectangle.
newy Specifies the y coordinate of the lower left corner of the new position of the rectangle.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Specifying the source for pixels to be read with the readsource subroutine.

Reading a rectangular array of pixels into host memory with the rectread or lrectread subroutine.

Drawing a rectangular array of pixels into the frame buffer with the rectwrite subroutine.

Specifying a zoom factor for rectangle copies and writes with the rectzoom subroutine.

AIX Graphics Library Overview and Reading and Writing Pixels.


[ Previous | Next | Contents | Glossary | Home | Search ]