Click or drag to resize

BitmapWithSize Method (Size)

Gets an Icon representation of this Bitmap scaled to draw within the specified fitting size.

Namespace:  Eto.Drawing
Assembly:  Eto (in Eto.dll) Version: 2.5.3-dev
Syntax
public Icon WithSize(
	Size fittingSize
)

Parameters

fittingSize
Type: Eto.DrawingSize
The maximum size to draw the Icon.

Return Value

Type: Icon
A new icon that will draw within the fitting size.
Remarks
This is useful when you want to draw the image at a different size than the default size without resizing the image. Note that the fittingSize specifies the maxiumum drawing size of the Icon, but will not change the aspect of each frame's bitmap. For example, if an existing frame is 128x128, and you specify 16x32, then the resulting frame will draw at 16x16.
See Also