View Source
Class ImageCropperValue
Represents a value of the image cropper value editor.
Assembly: Umbraco.Infrastructure.dll
Syntax
public class ImageCropperValue : TemporaryFileUploadValueBase, IHtmlEncodedString
Properties
View Source
Crops
Gets or sets the value crops.
Declaration
public IEnumerable<ImageCropperValue.ImageCropperCrop>? Crops { get; set; }
Property Value
View Source
FocalPoint
Gets or sets the value focal point.
Declaration
public ImageCropperValue.ImageCropperFocalPoint? FocalPoint { get; set; }
Property Value
Methods
View Source
Equals(object?)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current object.
|
Returns
| Type |
Description |
| bool |
true if the specified object is equal to the current object; otherwise, false.
|
View Source
Equals(ImageCropperValue?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(ImageCropperValue? other)
Parameters
Returns
| Type |
Description |
| bool |
true if the current object is equal to the other parameter; otherwise, false.
|
View Source
GetCrop(string?)
Declaration
public ImageCropperValue.ImageCropperCrop? GetCrop(string? alias)
Parameters
| Type |
Name |
Description |
| string |
alias |
|
Returns
View Source
GetCropBaseOptions(string?, ImageCropperCrop?, bool)
Declaration
public ImageUrlGenerationOptions GetCropBaseOptions(string? url, ImageCropperValue.ImageCropperCrop? crop, bool preferFocalPoint)
Parameters
Returns
View Source
Gets the value image URL for a specific width and height.
Declaration
public string? GetCropUrl(int width, int height, IImageUrlGenerator imageUrlGenerator, string? cacheBusterValue = null)
Parameters
| Type |
Name |
Description |
| int |
width |
|
| int |
height |
|
| IImageUrlGenerator |
imageUrlGenerator |
|
| string |
cacheBusterValue |
|
Returns
View Source
Gets the value image URL for a specified crop.
Declaration
public string? GetCropUrl(string alias, IImageUrlGenerator imageUrlGenerator, bool useCropDimensions = true, bool useFocalPoint = false, string? cacheBusterValue = null)
Parameters
| Type |
Name |
Description |
| string |
alias |
|
| IImageUrlGenerator |
imageUrlGenerator |
|
| bool |
useCropDimensions |
|
| bool |
useFocalPoint |
|
| string |
cacheBusterValue |
|
Returns
View Source
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A hash code for the current object.
|
View Source
HasCrop(string)
Determines whether the value has a specified crop.
Declaration
public bool HasCrop(string alias)
Parameters
| Type |
Name |
Description |
| string |
alias |
|
Returns
View Source
HasCrops()
Determines whether the value has crops.
Declaration
Returns
View Source
HasFocalPoint()
Determines whether the value has a focal point.
Declaration
public bool HasFocalPoint()
Returns
View Source
HasImage()
Determines whether the value has a source image.
Declaration
Returns
View Source
Merge(ImageCropperValue)
Declaration
public ImageCropperValue Merge(ImageCropperValue imageCropperValue)
Parameters
Returns
View Source
ToHtmlString()
Returns an HTML-encoded string.
Declaration
public string? ToHtmlString()
Returns
| Type |
Description |
| string |
An HTML-encoded string.
|
View Source
ToString()
Returns a string that represents the current object.
Declaration
public override string? ToString()
Returns
| Type |
Description |
| string |
A string that represents the current object.
|
Operators
View Source
operator ==(ImageCropperValue?, ImageCropperValue?)
Declaration
public static bool operator ==(ImageCropperValue? left, ImageCropperValue? right)
Parameters
Returns
View Source
operator !=(ImageCropperValue?, ImageCropperValue?)
Declaration
public static bool operator !=(ImageCropperValue? left, ImageCropperValue? right)
Parameters
Returns