Article View: adobe.indesign.sdk
Article #55CS4 porting InnerToPasteboardMatrix to use new Transform::SpreadCoordinates()
From: Nick_Beadman
Date: Thu, 12 Mar 2009 20:59
Date: Thu, 12 Mar 2009 20:59
15 lines
1826 bytes
1826 bytes
I have a couple of InDesign plug-ins which I am moving from CS3 to CS4. Part of the functionality is to gather information, including position, for images in the document. I am having, expected, problems with this functionality because of the new spread view rotation and the previous reliance on Pasteboard coordinates. In many places I am getting the bounding box of page items using code similar to: InterfacePtr<IGeometry> iImageGeometry(iImageHierarchy, IID_IGEOMETRY); PMRect lImageBBox = iImageGeometry->GetPathBoundingBox(::InnerToPasteboardMatrix(iImageGeometry)); and in certain cases clipping the bounding box to the page bounding box (also in Pasteboard coordinates). While the Porting Guide discusses the new Transform::SpreadCoordinates() it doesn't really explain how to use that to transform from Pasteboard coordinates into Spread coordinates. I also don't understand why there is not a ::InnerToSpreadMatrix utility method in TransformUtils.h. My current thinking about this is to keep everything in Pasteboard coordinates and then doing a final tranform into Spread coordinates. Does this make sense? Thanks for any help, Nick
Technical Details
Message-ID:
<59b8323d.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f63e9,4788284f5d1b7c8,start X-Google-Attributes: gidf63e9,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Nick_Beadman@adobeforums.com Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.indesign.sdk Subject: CS4 porting InnerToPasteboardMatrix to use new Transform::SpreadCoordinates() Message-ID: <59b8323d.-1@webcrossing.la2eafNXanI> Date: Thu, 12 Mar 2009 13:59:34 -0700 Lines: 27 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit