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

arcf Subroutine

Purpose

Draws a filled, pie-slice-shaped, circular arc.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void arcf
(Coord x, Coord y, Coord radius,
Angle startang, Angle endang)
void arcfi
(Icoord x, Icoord y, Icoord radius,
Angle startang, Angle endang)
void arcfs
(Scoord x, Scoord y, Scoord radius,
Angle startang, Angle endang)

FORTRAN Syntax

SUBROUTINE ARCF(x, y, radius, startang, endang)
REAL x, y, radius
INTEGER*4 startang, endang
SUBROUTINE ARCFI(x, y, radius, startang, endang)
INTEGER*4 x, y, radius, startang, endang
SUBROUTINE ARCFS(x, y, radius, startang, endang)
INTEGER*2 x, y, radius, startang, endang
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. Also, the FORTRAN INTEGER*2 version, the ARCFS 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 arcf subroutine draws a circular filled arc in the x-y plane (z = 0) and fills the arc with the current pattern. The filled area is bounded by the arc and by the start and end radii. The subroutine uses the current area attributes: texture, color, and writemask. To draw a filled arc in a plane other than the x-y plane, define the filled arc in the x-y plane and then rotate or translate the arc.

The syntax for each of the subroutine forms is the same except for the first argument. They differ only in that the arcf subroutine expects real coordinates for the first argument, the arcfi subroutine expects integer coordinates, and the arcfs subroutine expects short integer coordinates. After the arcf subroutine executes, the graphics position is undefined.

Parameters

x Specifies the x coordinate of the center of the filled arc, which is the center of the circle that would contain the arc.
y Specifies the y coordinate of the center of the filled arc, which is the center of the circle that would contain the arc.
radius Specifies the length of the radius of the filled arc, which is the radius of the circle that would contain the arc.
startang Specifies the measure of the start angle of the filled arc, which is measured from the positive x-axis.
endang Specifies the measure of the end angle of the filled arc, which is measured from the positive x-axis.

Example

The example C language program tpbig.c uses the arcfi subroutine to draw a scoop of ice cream.

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 circle with the circ 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 ]