Class ImageFileViewModel
- Namespace
- Dynamicweb.Frontend
- Assembly
- Dynamicweb.dll
- Inheritance
-
Image
File View Model
- Inherited Members
- Extension Methods
Properties
FocalX
Gets or sets the x axis focal point.
Property Value
- int
A number between -100 and 100 that tells in percent how far from the middle of the image the focal point is on the x-axis
Remarks
Negative numbers are left of the middle, positive right of the middle
FocalY
Gets or sets the y axis focal point.
Property Value
- int
A number between -100 and 100 that tells in percent how far from the middle of the image the focal point is on the y-axis
Remarks
Negative numbers are below the middle, positive above the middle
Ratio
Gets or sets the aspect ratio.
Property Value
- string
The ratio of the image width to its height, i.e. 1/1, 3/4, 16/9.
Methods
FocalPositionFromLeft()
Gets the focal points position from the left edge of the image in percentage.
Returns
- int
A number between 0 and 100 that tells in percent how far from the left of the image the focal point is on the x-axis (horizontal)
FocalPositionFromTop()
Gets the focal points position from the top edge of the image in percentage.
Returns
- int
A number between 0 and 100 that tells in percent how far from the top of the image the focal point is on the y-axis (vertical)
GetFocalPointParameters()
Returns a focal point parameter string for use with GetImage.ashx.
Returns
- string
If Has
Focal is true, the return is a strings of the following structure "x=FocalX&y=FocalY" Otherwise the return is Empty.Point()
Remarks
Returns focal point in the format: x=75&y=23 If focal points are not defined (if they are both 0) this method returns an empty string.
GetFocalPointPercentage()
Returns a focal percentage parameter string, based on Focal
Returns
- string
If Has
Focal is true, the return is a string of the following structure "FocalPoint() Position FocalFrom Left() Position %" Otherwise the return is Empty.From Top()
Remarks
Returns focal point percentage in the format: 75% 25% If focal points are not defined (if they are both 0) this method returns an empty string.
HasFocalPoint()
Detects if the current image has at least one focal point set.
Returns
- bool
Boolean as true if focal point exists, and false if it doesn't.