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

Resize around custom point

$
0
0

Hi!

 

I wish to resize a selection around a custom 2D point. I have had a look at the 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 but I assume that I need to use the constants defined in the Transformation class? I cannot just input a 2D point to scale around? Would be handy.

I have a feeling that I need to use a transformation matrix to do this. Have any one a working example of how to do this?

 

Thank you,

 

Best Regards,

Johan


Viewing all articles
Browse latest Browse all 12845

Trending Articles



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