Class ImageUtilities.ImageSize
Description of requested size for an image.
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public class ImageSize : Object
Constructors
ImageSize()
Constructor that sets no restriction on the image size.
Declaration
public ImageSize()
ImageSize(Int32, Int32)
Constructor forcing the image to the given size.
The image is scaled so it fits within the boounds.
Areas of the image not filling the requested area is
filled with White.
Declaration
public ImageSize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
Int32 | width | With of the image. |
Int32 | height | Height of the image. |
ImageSize(Int32, Int32, Int32, Int32)
Constructor forcing the image to be larger than the smallest size specified, yet larger then the outer bounds. Areas of the image not filling the requested area is filled with White.
Declaration
public ImageSize(int minWidth, int minHeight, int maxWidth, int maxHeight)
Parameters
Type | Name | Description |
---|---|---|
Int32 | minWidth | Minimum width of the image. |
Int32 | minHeight | Minimum height of the image. |
Int32 | maxWidth | Maximum height of the image. |
Int32 | maxHeight | Maximum height of the image. |
Properties
DefaultSize
Calculate the default size that can be used for fall-back images.
Declaration
public Size DefaultSize { get; }
Property Value
Type | Description |
---|---|
Size |
FillColor
Fill color to be used in areas of the image not filled by the original image
Declaration
public Color FillColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
MaxSize
Maximum size of a picture. A width or height of 0 indicates no maximum size.
Declaration
public Size MaxSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
MinSize
Minimum size of a picture. A width or hight of 0 indicates no minimum size.
Declaration
public Size MinSize { get; set; }
Property Value
Type | Description |
---|---|
Size |
ScaleStrategy
Strategy for scaling the picture within the supplied bounds.
Declaration
public ImageUtilities.ScaleStrategy ScaleStrategy { get; set; }
Property Value
Type | Description |
---|---|
ImageUtilities.ScaleStrategy |