Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

How reset the rotation of a PageItem (or access it's matrix at least) ?

$
0
0

I'd like to apply rotation to a few PageItem instances, but would like to reset the rotation first so it doesn't accumulate when I run the same script multiple times. I'm having a hard time trying to figure out how to restet the transformation matrix.

 

I've spotted this post which is close to what I need but it's a bit old now.

It looks like there isn't a matrix property anymore.

This:

 

alert(app.activeDocument.selection[0].matrix);

ouputs undefined

 

I've tried

 

app.activeDocument.selection[0].transform(app.getIdentityMatrix());

but it seems transformations are accumulated, multiplied, not reset.

 

If I want to reset the rotation of a PageItem, how would I go about doing that ?

 

Thanks,

George


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>