10.3. Resizing Images

Use the .fit(x,y) service to resize an image.

  • For raster images, this service is optional. The service fits the image into a box whose width and height are defined with x pixels an y pixels, while preserving the original aspect ratio of the image.

  • For vector images, whose size is unknown, this service is required. The vector image is sized based on the width and height of the box you define in .fit(x,y).

For more information about M2Doc image services, see the M2Doc site. Note that not all of these image services have been tested with vector images.

Example

{ m:mySystemDiagram.asImage().fit(450,1000)}