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

sboxf, sboxfi, or sboxfs Subroutine

Purpose

Draws a filled screen-aligned rectangle.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void sboxf
(Coord x1, Coord y1, 
Coord x2, Coord y2)
void sboxfi
(Icoord x1, Icoord y1, 
Icoord x2, Icoord y2)
void sboxfs
(Scoord x1, Scoord y1, 
Scoord x2, Scoord y2)

FORTRAN Syntax

SUBROUTINE SBOXF(x1, y1, x2, y2)
REAL x1, y1, x2, y2
SUBROUTINE SBOXFI(x1, y1, x2, y2)
INTEGER*4 x1, y1, x2, y2
SUBROUTINE SBOXFS(x1, y1, x2, y2)
INTEGER*2 x1, y1, x2, y2
Note: For FORTRAN users, the INTEGER*2 version, the SBOXFS subroutine, should not be called with integer constant parameters. For example, 2 is an integer constant; JJ is an integer variable. The XL FORTRAN compiler, invoked by the xlf command, stores all integer constants as long integers (INTEGER*4), not as short integers (INTEGER*2). Invoking the short version of this subroutine with an integer constant will result in unexpected behavior.

All of the foregoing functions are essentially the same except for the type declarations of the parameters.

Description

The sboxf subroutine draws a filled, two-dimensional, screen-aligned rectangle using the current color, writemask, and pattern. Only these attributes, not the normal area-fill attributes, are used. Most of the lighting/shading/viewing pipeline is bypassed.

The sides of the rectangle are parallel to the screen x and y axes. This rectangle cannot be rotated. The z coordinate is set to zero.

The sboxf subroutine performs the same function as the clear subroutine. A function equivalent to the sboxf subroutine can be obtained by setting the screenmask to the desired size, calling the clear subroutine, and then resetting the screenmask. Note that when you use the clear subroutine, the lighting, backfacing, depth-cueing, z-buffering, or Gouraud shading does not need to be turned off.

When you use the sboxf subroutine, you must not use lighting, backfacing, depth-cueing, z-buffering, Gouraud shading, or alpha blending.

Parameters

x1 Specifies the x screen coordinate of a corner of the filled box.
y1 Specifies the y screen coordinate of a corner of the filled box.
x2 Specifies the x screen coordinate of the opposite corner of the filled box.
y2 Specifies the y screen coordinate of the opposite corner of the filled box.

Implementation Specifics

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

The operation of the sbox and sboxf subroutines are identical to the rect and rectf subroutines on the POWERgraphics Gt4 and the GXT1000 adapters.

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

Clearing to the screenmask with the clear subroutine.

Drawing a filled rectangle with the rectf subroutine.

Drawing a screen-aligned rectangle with the sbox subroutine.

AIX Graphics Library Overview, Setting Drawing Attributes, and Drawing Rectangles, Circles, Arcs, and Polygons.


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