We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Where are the properties of an Illustrator "Translation Matrix" object documented and explained?
What little documentation regarding the composition of the Translation Matrix included in:
merely lists these seven properties without definition nor explanation:
Hence this appeal: Where can one find documentation (and explanation) regarding the properties in an Illustrator Translation Matrix?
Many, many thanks for the assist!
Copy link to clipboard
Hi @Plane Wryter, small point of clarification: *translation* means moving—you can do that in Illustrator by using the translate() method of a page item.
What you are refering to (as Carlos mentioned) is a *transformation* matrix (or transform matrix). Tranformation includes rotation and skewing as well as translation.
I only mention this because if you actually only want to apply a translation (as your post mentions) you don't need to mess with matrices.
@m1b: Thanks for the clarification. I do need to make minor adjustments to dimensions (width & height), rotation, and [re-]scale (all less than 1%).
Can all three parameters be affected by a transformation matrices?
the senocular info it's not obtuse at all, you need to read it again, and again until it gets clear
it clearly reads in one of the first paragraphs
"The transformation matrices in Flash that define these affine transformations use a 3 x 3 matrix consisting of 3 rows and 3 columns. The positions of values within this matrix are labeled a, b, c, d, tx, ty, u, v, and w. In matrices, these are known as elements."
it lists the exact same properties Illustrator matrix object uses.
to read, modify and apply a 20 pt translation to a selected rectangle
var idoc = app.activeDocument; var sel = idoc.selection; var im = app.getIdentityMatrix(); // retrieve im.mValueTX = 20; // modify sel.transform (im, true, true, true, true, 1, undefined); // apply
but you shouldn't worry about matrix values or use them to do what you need, you can use getScaleMatrix, concatenateRotationMatrix, then concatenate other matrix if you need to, then finally apply that combined transformation matrix, it's all in the Illustrator Reference with samples.
The properties in question are the elements of the matrix. For example, the elements of a matrix which rotates a selected item 90 degrees are as follows:
var m = app.getRotationMatrix(90); alert(m.mValueA + "\t" + m.mValueB + "\n" + m.mValueC + "\t\t\t" + m.mValueD + "\n" + m.mValueTX + "\t\t\t" + m.mValueTY); selection.transform(m);
The fact is transformation matrixes are a widely used feature in 2D graphics; often used to position every object. I learned from the PostScript Language Reference Manual. So Adobe won't redocument this.
Two ways to think about them
- a magic set of rules for moving, rotating or scaling objects; combine them to make more transformations like shearing.
- a description of 6 of the elements in a 3x3 matrix used to transform positions. The other 3 elements are invariant.
Google should find you a treatment that works for you.
6 of your 7 items are standard matrix elements; the 7th is presumably part of the API needs.