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

scrmask Subroutine

Purpose

Defines a a rectangular 2-D clipping mask.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void scrmask
(Screencoord left,
Screencoord right,
Screencoord bottom,
Screencoord top)

FORTRAN Syntax

SUBROUTINE SCRMAS(left, right, bottom, top)
INTEGER*4 left, right, bottom, top
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 scrmask subroutine defines a rectangular, two-dimensional clipping mask. It is intended to be used primarily for fine character clipping, although it clips all drawing primitives, including clear.

By default, the viewport subroutine sets the same area for both the viewport and screenmask, which the parameters left, right, bottom, top define. Strings that begin outside the viewport are clipped out; this is called gross clipping. Strings that begin inside the viewport, but outside the screenmask, are clipped to the pixel boundaries of the screenmask; this is called fine clipping.

All drawing routines are also clipped to the viewport, but the scrmask subroutine is useful only for characters. Gross clipping is sufficient for all other primitives.

Parameters

left Specifies the coordinate of the left clipping plane of the screenmask.
right Specifies the coordinate of the right clipping plane of the screenmask.
bottom Specifies the coordinate of the bottom clipping plane of the screenmask.
top Specifies the coordinate of the top clipping plane of the screenmask.
Note: The left parameter must not be greater than the right parameter, nor the bottom parameter greater than the top parameter, otherwise no text can appear on the screen.

Example

The example C language program prompt.c uses the scrmask subroutine to define a new screenmask.

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

Returning the current screenmask with the getscrmask subroutine.

Setting the area of the window used for all drawing with the viewport subroutine.

AIX Graphics Library Overview, Using Viewports and Screenmasks, and Working with Coordinate Systems.


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