Article View: adobe.postscript.programming
Article #73Re: stroke and fill
From: Miklos_Somogyi
Date: Mon, 28 Jul 2008 12:12
Date: Mon, 28 Jul 2008 12:12
20 lines
1872 bytes
1872 bytes
David, Transformation matrices are a bit tricky business. E.g. a matrix that does rotation in 2D may have different forms, depending upon whether you use row vectors (as in PS) or column vectors (as in Math), and whether you are rotating points or coordinate systems. So whatever is said to PS transformation of points, may not be exact for lots of other cases. Imagine a Cartesian coordinate system. In Math you use the "i" unit vector with coordinates (1 0), and the "j" coordinate vector with coordinates (0 1). Now you wish to describe a coordinate transformation, where the i and j "direction vectors" will become i' and j'. In the PS transformation matrix the first two elements are the coordinates of i', the next two are the coordinates of j', the last two describe an x-y translation. In your case the first two elements are (1 0), that is there is no change in the x direction. The next two are (0 -1), that is the new y goes downwards. That's mirroring. The last two elements show no translation in x direction, but in y direction there is an upward lift of pageHeight. Now you know how to correct your matrix, and you can construct other matrices for rotation, for skew, etc. Miklos
Technical Details
Message-ID:
<59b5e90e.33@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossingReferences:
<59b5e90e.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 10c61a,59978ad8602309c9 X-Google-Attributes: gid10c61a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Miklos_Somogyi@adobeforums.com Newsgroups: adobe.postscript.programming Subject: Re: stroke and fill Message-ID: <59b5e90e.33@webcrossing.la2eafNXanI> Date: Mon, 28 Jul 2008 05:12:29 -0700 References: <59b5e90e.-1@webcrossing.la2eafNXanI> Lines: 32 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!tudelft.nl!txtfeed1.tudelft.nl!news4us.nl!webcrossing