If a canvas has not yet been initialized ImageGlue will attempt to intelligently Autosize the canvas to match the operation you are performing.

An Autosized canvas is always guaranteed to be at least one pixel wide and high.


Canvas Width and Height Specified    

If both the width and height of the Canvas have been specified the positioning of the image on the canvas will be determined by the Positioning and Transform parameters.


No Width or Height Specified    

If no size for the Canvas has been defined, ImageGlue sets the size to the same as the source image.


Only Width or Height Specified    

If only the width or the height of the Canvas has been specified, the other will be pinned to maintain the correct aspect ratio for the image.

For example suppose you draw an image 200 pixels wide by 400 high onto a Canvas with a width of 100 but no specified height. The height will automatically be set to 200 pixels to ensure that the image is not distorted if it is scaled down to fit onto the Canvas.


Transformed Drawing    

If you are drawing rotated, skewed or otherwise transformed images any canvas initialization will be determined by a rectangle drawn around the boundary of the transformed image.

When you apply transforms to an object you may shift it off the canvas. To allow you to pin a transformed object to a particular location you can use the 'Pin' transform parameter. Additionally you can use the 'LimitWidth' and 'LimitHeight' parameters to limit the width and height of the final image.

Note that transforms are applied after positioning and fit parameters which means that if you combine the two your canvas may not autosize as expected.