Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Find out height and width of selected content..?

Guest
Apr 06, 2009 Apr 06, 2009

Hi Everyone.!

i'm new baby to indesign script. Actually i link one Eps image to picture box.

now i want the height and width of eps image,angle and also need X and Y coordinates....

anyone help me..?

Thanks in Advance.

-yajiv

TOPICS
Scripting
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Apr 07, 2009 Apr 07, 2009

Harbs, that gives width and height.

The center point is at (geometricBounds[3] + geometricBounds[1])/2, geometricBounds[2] + geometricBounds[0])/2 (alternatively, geometricBounds[1] + width/2, geometricBounds[0] + height/2 -- which comes down to the same).

As for the angle, rotationAngle sounds about right, but compare to absoluteRotationAngle -- that seems to be a total value for multiple nested and rotated objects.

Oh, and you want the shear as well?  Every graphic item also has a shearAngle and,

...
Translate
Advocate ,
Apr 06, 2009 Apr 06, 2009

Use either the geometricBounds or visibleBounds properties of the object.

Dave

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 06, 2009 Apr 06, 2009

If you're dealing with frames which might have been rotated, you're probably going to want to use visibleBounds.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2009 Apr 06, 2009

Hi Harbs & Dave !.

               Thanks for Quick replay. I get the height and width of the content.

-yajiv

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2009 Apr 06, 2009

Hi Harbs & Dave !..

               Thanks for Quick replay. I get the height and width of the content but i can't findout X and Y co-ordinates... exactly i need center position of x and y co-ordinates.. i attach some picture for ur clarification..Thanks in Advance..!

-yajiv

Sample.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2009 Apr 07, 2009

y= bounds[2]-bound[0];

x=nounds[3]-bounds[1];

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 07, 2009 Apr 07, 2009

Harbs, that gives width and height.

The center point is at (geometricBounds[3] + geometricBounds[1])/2, geometricBounds[2] + geometricBounds[0])/2 (alternatively, geometricBounds[1] + width/2, geometricBounds[0] + height/2 -- which comes down to the same).

As for the angle, rotationAngle sounds about right, but compare to absoluteRotationAngle -- that seems to be a total value for multiple nested and rotated objects.

Oh, and you want the shear as well?  Every graphic item also has a shearAngle and, to top it off, an absoluteShearAngle as well.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 07, 2009 Apr 07, 2009

[Jongware] wrote:

Harbs, that gives width and height.

Yeah. That's what happens when you respond without thinking...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 08, 2009 Apr 08, 2009
LATEST

Thank you very much for such work..

Jongware and Harbs.

Thanks lot..

-yajiv

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines