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

cmov Subroutine

Purpose

Updates the current text character position.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

void cmov(Coord x, Coord y, Coord z)
void cmovi(Icoord x, Icoord y, Icoord z)
void cmovs(Scoord x, Scoord y, Scoord z)
void cmov2(Coord x, Coord y)
void cmov2i(Icoord x, Icoord y)
void cmov2s(Scoord x, Scoord y)

FORTRAN Syntax

SUBROUTINE CMOV(x, y, z)
REAL x, y, z
SUBROUTINE CMOVI(x, y, z)
INTEGER*4 x, y, z
SUBROUTINE CMOVS(x, y, z)
INTEGER*2 x, y, z
SUBROUTINE CMOV2(x, y)
REAL x, y
SUBROUTINE CMOV2I(x, y, z)
INTEGER*4 x, y
SUBROUTINE CMOV2S(x, y, z)
INTEGER*2 x, y
Note: For FORTRAN users, the INTEGER*2 versions of this subroutine, CMOVS and CMOV2S, 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 one of the short versions of this subroutine with an integer constant will result in unexpected behavior.

All of the functions are essentially the same except for the type declarations of the parameters. In addition, the cmov2* routines assume a 2-D point instead of a 3-D point.

Description

The cmov subroutine moves the current character position to a specified point (just as the move subroutine sets the current graphics position). The cmov subroutine transforms the specified modeling coordinates into screen coordinates, which become the new character position. If the transformed point is outside the viewport, the character position is undefined.

The cmov subroutine does not affect the current graphics position.

Parameters

x Specifies the x location of the point (in modeling coordinates) to which to move the current character position.
y Specifies the y location of the point (in modeling coordinates) to which to move the current character position.
z Specifies the z location of the point (in modeling coordinates) to which to move the current character position. (This parameter is not used by the 2-D subroutines.)

Example

The example C language program curved.c uses the cmov2 subroutine to move the character position to a specific location before drawing text.

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 string of raster characters on the screen with the charstr subroutine.

Moving the current graphics position with the move subroutine.

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


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