[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.ICrop

ICrop Interface

Represents the cropping settings for an image.

An ICrop object defines the source image size, the image offsets, and the shape bounds used to display only part of the image. You can obtain this interface from Crop.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface ICrop
Public Interface ICrop
Examples
worksheet.Range["A1:B2"].Value = new object[,] {{"Name", "Value"}, {"Test", 100}};
IShape picture = worksheet.Shapes.AddCameraPicture("=$A$1:$B$2", 20, 20);
ICrop crop = picture.PictureFormat.Crop;
crop.PictureWidth = 160;
crop.PictureHeight = 100;

Properties

Name Description
PictureHeight

Gets or sets the height of the image that is to be cropped.

This value represents the source image height currently used by the cropping settings.

PictureOffsetX

Gets or sets the x-axis offset of the image that is to be cropped.

PictureOffsetY

Gets or sets the y-axis offset of the image that is to be cropped.

PictureWidth

Gets or sets the width of the image that is to be cropped.

This value represents the picture width used by the crop settings.

ShapeHeight

Gets or sets the height of a shape that is used to crop an image.

Use this method to retrieve the current crop shape height from the ICrop settings.

ShapeLeft

Gets or sets the location of the left-side of a shape that is used to crop an image.

Use this method to retrieve the current left position of the cropping shape.

ShapeTop

Gets or sets the location of the top of a shape that is used to crop an image.

ShapeWidth

Gets or sets the width of a shape that is used to crop an image.

Use this method to retrieve the current width configured for the cropping shape.