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

circ Subroutine

Purpose

Outlines a circle.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void circ(Coord x, Coord y, Coord radius)
void circi(Icoord x, Icoord y, Icoord radius)
void circs(Scoord x, Scoord y, Scoord radius)

FORTRAN Syntax

SUBROUTINE CIRC(x, y, radius)
REAL x, y, radius
SUBROUTINE CIRCI(x, y, radius)
INTEGER*4 x, y, radius
SUBROUTINE CIRCS(x, y, radius)
INTEGER*2 x, y, radius
Note: For FORTRAN users, the INTEGER*2 version, the CIRCS 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.

Description

The circ subroutine draws an unfilled circle in the x-y plane (z = 0). The system draws the circle using the current line attributes: color, linestyle, linewidth, repeat factor, and writemask.

To create a circle that does not lie in the x-y plane, draw the circle in the x-y plane, then rotate or translate the circle. Circles rotated outside the 2-D x-y plane appear as ellipses.

All of the routines listed in the syntax are functionally the same. They differ only in the type declarations for the coordinates.

Parameters

x Specifies the x coordinate of the center of the circle specified in modeling coordinates.
y Specifies the y coordinate of the center of the circle specified in modeling coordinates.
radius Specifies the length of the radius of the circle.

Example

The example C language program boxcirc.c uses the circi subroutine to draw a red circle.

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

Drawing a circular arc with the arc subroutine.

Drawing a filled circular arc with the arcf subroutine.

Drawing a filled circle with the circf subroutine.

Drawing a curve with the crv subroutine.

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


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