SCALE(3P) — SUNPHIGS LIBRARY
NAME
SCALE − calculate a 2D transformation matrix to perform a specified scaling
SYNOPSIS
C Syntax
void
pscale ( scale_vector, error_ind, matrix )
Pvector∗scale_vector;scale factor vector
Pint∗error_ind;OUT error indicator
Pmatrixmatrix;OUT transformation matrix
FORTRAN Syntax
SUBROUTINE psc ( FX, FY, ERRIND, XFRMT )
REALFX, FYscale factor vector
INTEGERERRINDOUT error indicator
REALXFRMT(3, 3)OUT transformation matrix
Required PHIGS Operating States
(PHOP, ∗, ∗, ∗)
DESCRIPTION
Purpose
Use SCALE to generate a 2D homogeneous (3 x 3) transformation matrix that performs a 2D scaling.
The returned matrix may be passed as an argument to SET LOCAL TRANSFORMATION or SET GLOBAL TRANSFORMATION to modify the modelling transformation that is applied to output primitives during traversal.
C Input Parameter
scale_vector
A pointer to a Pvector data structure containing the scale factors to be applied to the x and y dimensions. Pvector is defined in phigs.h as follows:
typedef struct {
Pfloatx;/∗ Sx, the x dimension scaling factor ∗/
Pfloaty;/∗ Sy, the y dimension scaling factor ∗/
} Pvector;
C Output Parameters
error_ind
A pointer to the location to store the error number of any error detected by this function.
matrixThe 3 x 3 homogeneous transformation matrix that performs the specified scaling. Pmatrix is defined in phigs.h as follows:
typedef PfloatPmatrix[3][3];
FORTRAN Input Parameter
FX, FY
The scale factors to be applied to the x, y, and z dimensions.
FORTRAN Output Parameters
ERRIND
The error number of any error detected by this function.
XFRMT
The 3 x 3 homogeneous transformation matrix that performs the specified scaling.
Execution
SCALE returns a 2D homogeneous (3 x 3) transformation matrix that performs the scaling specified by scale factor vector. The scaling is relative to the origin of the current modelling coordinate system.
The scale factor vector specifies sx and sy scaling factors that control scaling in the x and y directions.
ERRORS
002Ignoring function, function requires state (PHOP, ∗, ∗, ∗)
SEE ALSO
SET LOCAL TRANSFORMATION (3P)
ROTATE (3P)
TRANSLATE (3P)
BUILD TRANSFORMATION MATRIX (3P)
COMPOSE MATRIX (3P)
SCALE 3 (3P)
TRANSFORM POINT (3P)
Sun Release 4.0 — Last change: 1 August 1989