Resize around custom point


hi!

 

i wish resize selection around custom 2d point. have had @ resize function:

#target illustrator  sel = app.activedocument.selection[0];  var scale = 200; var scaleabout = transformation.topleft;  sel.resize(     scale , // x number (double)     scale , // y number (double)     true, // changepositions bool     true, // changefillpatterns bool     true, // changefillgradients bool     true, // changestrokepattern bool     scale , // changelinewidths  number (double)     scaleabout); // scaleabout transformation constant  

which works allright assume need use constants defined in transformation class? cannot input 2d point scale around? handy.

i have feeling need use transformation matrix this. have 1 working example of how this?

 

thank you,

 

best regards,

johan

i have started transformation matrices assume have use.

to scale arbitrary point p (px,py):  translate object p coincide origin: t(-px, -py)  scale object: s(sx,sy) translate object back: t(px,py)  

is way go?

any suggestsions?

 

br,

johan



More discussions in Illustrator Scripting


adobe

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account