Programmer Guide/Command Reference/EVAL/pgtrans: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(Created page with '{{DISPLAYTITLE:{{SUBPAGENAME}}}} Shift, scale and/or rotate a polygon. ;Usage: :<code>pgtrans(<var>X</var>, <var>IX</var> {, <var>DX</var>, <var>DY</var>), <var>KX</var>, <var>KY…')
 
No edit summary
Line 6: Line 6:
:;<var>IX</var>:The index of the polygon of ''X'' to be tested; 0 <= <var>IX</var> < <code>[[../pgget|pgget]](''X'')</code>
:;<var>IX</var>:The index of the polygon of ''X'' to be tested; 0 <= <var>IX</var> < <code>[[../pgget|pgget]](''X'')</code>
:;<var>DX, DY</var>: shift values for x and y (default=0, no shift)
:;<var>DX, DY</var>: shift values for x and y (default=0, no shift)
::shift the center point <code><XC,YC></code> of polygon ''X<sub>IX</sub>'' to <code><XC+''DX'',YC+''YC''>
::-> shift the center point <code><XC,YC></code> of polygon ''X<sub>IX</sub>'' to <code><XC+''DX'',YC+''YC''>
:;<var>KX, KY</var>: scaling factors; both factors must be greater than zero (default=1, no scaling)
:;<var>KX, KY</var>: scaling factors; both factors must be greater than zero (default=1, no scaling)
:;<var>A</var>: rotation angle in degree (default=0, no rotation); a scaling factors (default=1)
:;<var>A</var>: rotation angle in degree (default=0, no rotation); a scaling factors (default=1)

Revision as of 11:02, 20 April 2011

Shift, scale and/or rotate a polygon.

Usage
pgtrans(X, IX {, DX, DY), KX, KY, A})
X
a closed point-list or a polygon-stream defining one or more polygons.
IX
The index of the polygon of X to be tested; 0 <= IX < pgget(X)
DX, DY
shift values for x and y (default=0, no shift)
-> shift the center point <XC,YC> of polygon XIX to <XC+DX,YC+YC>
KX, KY
scaling factors; both factors must be greater than zero (default=1, no scaling)
A
rotation angle in degree (default=0, no rotation); a scaling factors (default=1)
rotate the polygon around the center point
Result
The result r is a polygon-stream containing the transformed XIX.
See also
pginit, pgget, pgitest, pgxgrid, pgsplit, pgtrans, pghull

<function list>

Navigation menu

Personal tools