Skip navigation
Bill joy
Currently Being Moderated

Object coordinates

Jul 27, 2012 1:53 AM

Hi

 

I want to know about indesign object coordinates.

In .indd file coordinates take 32 byte for any coordinate for top, left, bottom, right or (x, y, width, height).

How calculate x and y value from these 8-8 byte.It contain floting value but not follow IEEE standered.

What format use to store coordinate in indesign .indd file.

When I create a text frame in indesign on first page using Facing option whose value are

X=0, Y=0, Width=50,Height=50 and ruler is set on (0,0).I am not using any rotation.

Then I find the 32 byte for this in .indd file

00 00 00 00 00 00 22 C0

67 BD 78 7C 6C 91 7A C0

EE 76 BB DD 6E D7 62 40

F0 01 9B CD 66 63 71 C0

How calculate x , y width, height value from these hex byte.

What standered use by indesign to store coordinate.

Is there is any function in sdk that take these hex value and return coordinate.

 

Thanks

 
Replies
  • Currently Being Moderated
    Jul 27, 2012 8:37 AM   in reply to Bill joy

    Bill joy wrote:

     

    How calculate x and y value from these 8-8 byte.It contain floting value but not follow IEEE standered.

     

    But it does follow an IEEE standard: "IEEE 754 double-precision binary floating-point format: binary64".

    Mind the byte order; the 8 bytes are stored according to the endianness as declared in your file header.

     

    Bill joy wrote:

     

    Is there is any function in sdk that take these hex value and return coordinate.

     

    There is none, for several reasons. First off, InDesign (naturally!) does not work with 'hex values'. As stated above, double floating point values are stored in their native binary format and also read as such. There is no 'conversion' of any kind necessary (apart from endianness differences, then).

    Since these are plain, pure floating point numbers, they do not "return" coordinates -- just like the single number "2,000,000" can represent either the number of megabytes on my external backup disk or the number of euros in my bank account. It's just a number.

     

    Furthermore, I believe the SDK is meant to allow the user handle high level operations and data such as coordinates transparently; the way the actual bytes are stored in memory is practically irrelevant, for any regular operation.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points