Skip to main content
Participant
February 13, 2008
Question

get current scaling

  • February 13, 2008
  • 5 replies
  • 398 views
Hi.
Could you please help me to figure out the next problem? I try to get current scaling percent, but my code always returns the same value 1.02940 and does not become updated when I change scaling. Could you please help me to figure out with this? I use the following code:
InterfacePtr<ITransform> xform(this, UseDefaultIID());
if (xform != nil) {
PMReal scaleX = xform->GetItemScaleX();
PMReal scaleY = xform->GetItemScaleY();
}
this is inherited from CGraphicFrameShape class.
Thanks for any help.
This topic has been closed for replies.

5 replies

Known Participant
March 7, 2008
I've also faced the same problem. The heart of problem is following:

AFAIK, after choosing the desired scaling percentage value in combobox in InDesign, the one scales the shape and sets scaling percentage back to 100%. ONLY AFTER these operations, the method DrawShape(...) is called. That's why we have the same values every call.

Possible solution may be: We should track (capture) choosing desired scaling percentage value in combobox BEFORE DrawShape is called. The question is - HOW? Is there any interfaces that allow doing that?
Participant
March 4, 2008
Yes, Ive tried these methods but they return correct value in method PrintSetupProvider, but in method DrawShape I always get 1. Maybe I should use another method for initialization scale variable in my class before draw method will be called.
Thanks,
Andrey
Participating Frequently
March 4, 2008
Have you tried ITransformFacade::GetItemScale? Or use the selection suite ITransformSuite::GetSelectionScale?

Regards,
lee
Participant
March 3, 2008
I create an object that was inherited from CGraphicFrameShape. I insert some image into this object and want to scale this image when a user scales my object. Under scale I mine the following menu item Object->Transform->Scale
Known Participant
February 19, 2008
which item do you want to get?