Class ImageCrop
Represents an image crop definition in the Delivery API.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models.DeliveryApi
Assembly: Umbraco.Core.dll
Syntax
public class ImageCrop
Constructors
View SourceImageCrop(string?, int, int, ImageCropCoordinates?)
Initializes a new instance of the ImageCrop class.
Declaration
public ImageCrop(string? alias, int width, int height, ImageCropCoordinates? coordinates)
Parameters
| Type | Name | Description |
|---|---|---|
| string | alias | The alias of the crop. |
| int | width | The width of the crop in pixels. |
| int | height | The height of the crop in pixels. |
| ImageCropCoordinates | coordinates | The coordinates of the crop area. |
Properties
View SourceAlias
Gets the alias of the crop.
Declaration
public string? Alias { get; }
Property Value
| Type | Description |
|---|---|
| string |
Coordinates
Gets the coordinates of the crop area.
Declaration
public ImageCropCoordinates? Coordinates { get; }
Property Value
| Type | Description |
|---|---|
| ImageCropCoordinates |
Height
Gets the height of the crop in pixels.
Declaration
public int Height { get; }
Property Value
| Type | Description |
|---|---|
| int |
Width
Gets the width of the crop in pixels.
Declaration
public int Width { get; }
Property Value
| Type | Description |
|---|---|
| int |