Copy link to clipboard
Copied

How can i shear rectangle?
there is similar question.
(http://forums.adobe.com/message/1103495#1103495)
But i can't understand answer in there.
JavaScript Reference has 'getRotationMatrix', 'getScaleMatrix', 'getTranslationMatrix'.
But there is NOT 'getShearMatrix'!!
how i can shear rectangle?
if you can as javascript, show me your code please.
thank you.
use the Matrix properties b & c, the actual skewing values are in percentages of the objects dimensions, not degrees as in the UI...if you need angle values, that would be your homework.
draw a rectangle, select it and run the script to skew or shear 50%
...// skew or shear selection, carlos canto 07/04/13
// http://forums.adobe.com/message/5475881#5475881
var idoc = app.activeDocument;
var sel = idoc.selection[0];
var im = app.getIdentityMatrix();
//im.mValueB = .5; // skew y 50%
im.mValueC = .5; // skew
Copy link to clipboard
Copied
use the Matrix properties b & c, the actual skewing values are in percentages of the objects dimensions, not degrees as in the UI...if you need angle values, that would be your homework.
draw a rectangle, select it and run the script to skew or shear 50%
// skew or shear selection, carlos canto 07/04/13
// http://forums.adobe.com/message/5475881#5475881
var idoc = app.activeDocument;
var sel = idoc.selection[0];
var im = app.getIdentityMatrix();
//im.mValueB = .5; // skew y 50%
im.mValueC = .5; // skew x 50%
sel.transform (im, true, true, true, true, 1, undefined);
Copy link to clipboard
Copied
Thank you! thats all i want
You helpful to me.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now