Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newby question to translate operator

Status
Not open for further replies.

CrossCountryRunner

Programmer
Dec 20, 2009
1
CH
Here is part of the description of the translate operator from the PLRM
tx ty translate –
tx ty matrix translate matrix

moves the origin of the user coordinate space by tx units horizontally and ty units
vertically, ... The orientation of the axes and the sizes of the coordinate units are unaffected.
This transformation is represented by the matrix
1 0 0
T = 0 1 0
tx ty 1
The first form of the operator applies this transformation to the user coordinate
system by concatenating matrix T with the current transformation matrix (CTM);
that is, it replaces the CTM with the matrix product T ´ CTM.

Now I do the following in Ghostscript under Windows

GS>matrix currentmatrix ==
[1.33333337 0.0 0.0 1.33333337 0.0 0.0]
GS>0.75 0.75 scale
GS>matrix currentmatrix ==
[1.0 0.0 0.0 1.0 0.0 0.0]
GS>0 0.25880944 translate
GS>matrix currentmatrix ==
[1.0 0.0 0.0 1.0 0.0 0.2578125]
GS>

After the scale by 0.75 0.75 my CTM is the unit matrix.
I do a translation with ty = 0.25880944

Why do I get in the resulting CTM an ty component of 0.2578125 and not 0.25880944 ?
What is happening here??

PS: I don't think this is an error in Ghostscript. But I would like to understand.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top