Reply To: How to resize Graphic to specific inches ?

#90599
Anonymous
Inactive

Sorry to insist but what about:

app.selection[0].fit ( FitOptions.PROPORTIONALLY );
app.selection[0].fit ( FitOptions.CENTER_CONTENT );

?

But to be helpful, as resize require points, an easy way out with delaing with units is using an UnitValue Object:

var w = new UnitValue ( “3in” ).as(‘pt’);
var h = new UnitValue ( “2in” ).as(‘pt’);

myGraphic.resize(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.CENTER_ANCHOR, ResizeMethods.REPLACING_CURRENT_DIMENSIONS_WITH, [w, h]);

FWIW

This article was last modified on December 19, 2016

Comments (0)

Loading comments...