GINO Graphics Suite - GINO v9.0  

gSetSegTransform

Syntax

[C/C++:]
void gSetSegTransform(int nseg, float xsca, float ysca, float ang, float xpos, float ypos);
void gSetSegTransform2D(int nseg, GMAT2D a);
[F90:]
subroutine gSetSegTransform(nseg, xsca, ysca, ang, xpos, ypos)
subroutine gSetSegTransform(nseg, xsca, ysca, ang, xpos, ypos, xshear, yshear)

subroutine gSetSegTransform2D(nseg,a)
integer, intent(in) :: nseg
real, intent(in) :: xsca,ysca,ang,xpos,ypos,xshear,yshear
real, intent(in) :: a(6)

Arguments

nseg
Picture segment or segment group number

> 0, Transform segment(s) specified by segment nseg
= -1, Transform all segments
< -1, Transform all segments except those specified by nseg

xsca
Scaling factor for X coordinates

ysca
Scaling factor for Y coordinates

ang
Angle of rotation about anchor point

xpos,ypos
Coordinates of new anchor point

xshear,yshear
Optional shear factors

a
3 x 2 array containing a 2-D segment transformation matrix

Description

The routines gSetSegTransform() and gSetSegTransform2D() sets the elements of a 2-D segment transformation matrix either by means of separate components or as a complete 2D matrix to be applied to segment nseg.

In the case of gSetSegTransform() the elements are applied in the order scale, rotation, and then translation. The scale and rotation are applied about the segment anchor position. xpos and ypos are assumed to be in picture coordinates and will not be affected by any modelling transformation that may be current.

In the case of gSetSegTransform2D(), if a unit transformation matrix is set the segment will appear in the original position it was created. The routines gBuildMatrix2D() and gCombineMatrix2D() can be used to build or compose a suitable transformation matrix.

When the software emulation of picture segments is used and nseg does not exist an error message is generated. When using this routine in the default hardware segmentation mode, gSetSegMode(GHARDWARE), no error message is generated. However, the device may output a local error message.

Some displays do not permit this segment operation on the currently opened segment.

See Also

gSetSegTransform Usage
gEnqSegTransform