[CS6] IGeometry of page return bounds different than seen in UI
Hello all,
I'm running into this weird issue and hope someone could help shining some insights over.
For CS6, we have a plugin that needs to read the page bounds in page coordinates, and we have been using the below code to get it
InterfacePtr<IGeometry> pageGeometry(pageHierarchy, UseDefaultIID());
PMRect bounds = pageGeometry->GetBoundingBox(Geometry::PathBounds());
However, we have dicovered that when we resize the page(s) via "Document Setup" (our document has "Facing Pages" unchecked), the bounds we got from the code above no longer matches what being seen in the UI. E.g. if we enlarge the page size, the left and top values got from the code would be negative, where the UI shows that the page is still at 0,0. As if the origin of the coordinate system stays at the original place before the resize in the object model, but somehow the UI knows how to translate it to the new location.
Are we missing any coordinate system transformations that are not needed before CS6 but are needed now?
Thanks a lot.
-Jeff