ShapePictureFill.SourceRect Property
Gets or sets the part of the picture used for the fill.
Namespace: DevExpress.Spreadsheet.Drawings
Assembly: DevExpress.Spreadsheet.v18.2.Core.dll
Declaration
Property Value
Type | Description |
---|---|
ShapeRectangleOffset | A ShapeRectangleOffset object that specifies the source rectangle offset from the corresponding edge of the bounding box. |
Remarks
If you set the SourceRect property to a positive value, the source image will be cropped and stretched to fill the available area. For example, a left offset of 35% specifies that the leftmost 35% of the picture will be cropped and the remaining part of the picture will be used to fill the shape, as shown in the table below (the chart is displayed in Microsoft® Excel®).
If you set the SourceRect property to a negative value, an empty space will appear along the corresponding edges of the picture. For example, the left and right offsets of -10% specifies that two blank bands of equal width (10% of the bounding box’s width) will be shown along the left and right edges of the picture.
SourceRect is not specified | SourceRect.Left = 0.35 | SourceRect.Left = -0.1 SourceRect.Right = -0.1 |
---|---|---|
To specify where the picture fill should start, use the ShapeComplexFill.FillRect property.
Note
The SourceRect property has no effect on the visual appearance of a chart when the document is loaded in the SpreadsheetControl. However, the property can be accessed in code, exported in supported formats and visualized in Microsoft Excel.