Class ImageUrlGenerationOptions.CropCoordinates
The bounds of the crop within the original image, in whatever units the registered IImageUrlGenerator uses, typically a percentage between 0.0 and 1.0.
Inheritance
object
Namespace: Umbraco.Cms.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public class ImageUrlGenerationOptions.CropCoordinates
Constructors
View SourceCropCoordinates(decimal, decimal, decimal, decimal)
Initializes a new instance of the ImageUrlGenerationOptions.CropCoordinates class.
Declaration
public CropCoordinates(decimal left, decimal top, decimal right, decimal bottom)
Parameters
| Type | Name | Description |
|---|---|---|
| decimal | left | The left coordinate as a percentage (0.0 to 1.0). |
| decimal | top | The top coordinate as a percentage (0.0 to 1.0). |
| decimal | right | The right coordinate as a percentage (0.0 to 1.0). |
| decimal | bottom | The bottom coordinate as a percentage (0.0 to 1.0). |
Properties
View SourceBottom
Gets the bottom coordinate of the crop as a percentage of the total image height.
Declaration
public decimal Bottom { get; }
Property Value
| Type | Description |
|---|---|
| decimal |
Left
Gets the left coordinate of the crop as a percentage of the total image width.
Declaration
public decimal Left { get; }
Property Value
| Type | Description |
|---|---|
| decimal |
Right
Gets the right coordinate of the crop as a percentage of the total image width.
Declaration
public decimal Right { get; }
Property Value
| Type | Description |
|---|---|
| decimal |
Top
Gets the top coordinate of the crop as a percentage of the total image height.
Declaration
public decimal Top { get; }
Property Value
| Type | Description |
|---|---|
| decimal |
Methods
View SourceEquals(object?)
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Equals(CropCoordinates?)
Declaration
public bool Equals(ImageUrlGenerationOptions.CropCoordinates? other)
Parameters
| Type | Name | Description |
|---|---|---|
| ImageUrlGenerationOptions.CropCoordinates | other |
Returns
| Type | Description |
|---|---|
| bool |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int |