Neodynamic ImageDraw for ASP.NET
Resize
Represented by Neodynamic.WebControls.ImageDraw.Resize class.

This action changes the size of an Element. This action is typically used when you need to reduce or enlarge the current Element size to a new one. One interested feature is LockAspectRatio which determine how Element's proportions are maintained. For example, if LockAspectRatio is set to WidthBased, then the Element's proportions will be maintained based on the new specified width value i.e. the new Height of the Element will be automatically calculated based on the new Width value.

In the following example we have an ImageElement on the Canvas and a Resize action is applied on the ImageElement with none, width based, and height based lock aspect ratio respectively.


ImageElement before the action is applied.

ImageElement with Resize action applied on it. New width and height are 100 pixels. None LockAspectRatio was applied.

ImageElement with Resize action applied on it. New width is 100 pixels. LockAspectRatio is WidthBased and thus the new height is automatically calculated maintaining the aspect ratio.

ImageElement with Resize action applied on it. New height is 100 pixels. LockAspectRatio is HeightBased and thus the new width is automatically calculated maintaining the aspect ratio.


Syntax sample