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

How to interpret PageItem.Matrix

New Here ,
Dec 14, 2012 Dec 14, 2012

I am using the COM SDK.

Most of the objects have a Matrix which is going to store the objects rotations, flips, etc.

Many objects that I see appear to have a translation that takes it to somewhere around 7,000 - 9,000, but it's not constant.

What is this matrix in relation to? 

From what point is it translated from?

When I set the matrix to the "identity" matrix, all the items are flipped upside down.  Why?

Thanks,

...Matt

TOPICS
SDK
931
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
Adobe
Enthusiast ,
Mar 08, 2013 Mar 08, 2013
LATEST

You should take a look at AIHardSoftSuite.

This suite provides functions for converting between different coordinate

systems used at different levels of Illustrator.

The geometry of an object is described by coordinates that are relative to

a pair of imaginary axes imposed on the artboard. Illustrator uses two ways of

placing these axes; one for storing coordinate information internally, and

another for passing coordinate information across the SDK functions.

In the internal coordinate system, the origin is the top left corner of the

artboard--that is, of the white area that can be seen when zoomed out as far as

possible. The X axis is horizontal, with the values increasing to the right.

The Y axis is vertical, with values increasing downward. Values in this

system are called \e hard, or \e artboard coordinates.

In the public coordinate system, the origin is the \e ruler origin--that is,

the point that corresponds to the 0 marks on the ruler when it is visible.

By default, it is the bottom left corner of the page, but it can be changed by the

user. The X axis is horizontal, with the values increasing to the right.

The Y axis is vertical, with values increasing upward. Values in this system

are called \e soft, or \e page coordinates.

Most functions in the SDK use the public system of page coordinates, but

some use the internal artboard coordinates. This suite provides functions

for mapping between the coordinate systems.          For example, if you pass

the origin point, [0,0], to \c #AIRealPointHarden(), the function returns the

vector from the artboard origin (the top left of the canvas) to the page origin

(the bottom left of the visible page).

These matrix conversion functions do not convert all

components of translation matrices. To do this, you must understand

the details of the two coordinate systems involved and use linear algebra.

You must analyzed each case. For example, the matrix stored

in an \c #AIPatternStyle maps coordinates from pattern space to internal

artboard space, whereas the matrix for an image maps from image space to

public page space.

Thomas.

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