Interface ICrop
Represents the crop properties used to define the portion of an image to be cropped.
Namespace: Syncfusion.Office
Assembly: Syncfusion.Compression.Base.dll
Syntax
public interface ICrop
Properties
ContainerHeight
Gets or sets the height of a shape used to crop an image.
Declaration
float ContainerHeight { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for ContainerHeight is outside the valid range of 0 to 169092. |
ContainerLeft
Gets or sets the location of the left side of a shape used to crop an image.
Declaration
float ContainerLeft { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for ContainerLeft is outside the valid range of -169092 to 169092. |
ContainerTop
Gets or sets the location of the top of a shape used to crop an image.
Declaration
float ContainerTop { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for ContainerTop is outside the valid range of -169092 to 169092. |
ContainerWidth
Gets or sets the width of a shape used to crop an image.
Declaration
float ContainerWidth { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for ContainerWidth is outside the valid range of 0 to 169092. |
Height
Gets or sets the height of the image to be cropped.
Declaration
float Height { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for Height is outside the valid range of 0 to 169092. |
OffsetX
Gets or sets the x-axis offset of the image to be cropped.
Declaration
float OffsetX { get; set; }
Property Value
Type |
---|
System.Single |
Remarks
The bounding box properties (ContainerLeft, ContainerTop,
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for OffsetX is outside the valid range of -169092 to 169092. |
OffsetY
Gets or sets the y-axis offset of the image to be cropped.
Declaration
float OffsetY { get; set; }
Property Value
Type |
---|
System.Single |
Remarks
The bounding box properties (ContainerLeft, ContainerTop,
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for OffsetY is outside the valid range of -169092 to 169092. |
Width
Gets or sets the width of the image to be cropped.
Declaration
float Width { get; set; }
Property Value
Type |
---|
System.Single |
Examples
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
//Apply bounding box size and position.
picture.Crop.ContainerWidth = 280.8F;
picture.Crop.ContainerHeight = 180F;
picture.Crop.ContainerLeft = 360F;
picture.Crop.ContainerTop = 180.5F;
//Apply cropping size and offsets.
picture.Crop.Width = 410.4F;
picture.Crop.Height = 252F;
picture.Crop.OffsetX = -28.8F;
picture.Crop.OffsetY = 7.2F;
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown if the specified value for Width is outside the valid range of 0 to 169092. |