Class LemonUI::Tools::Extensions
ClassList > LemonUI > Tools > Extensions
Extensions for converting values between relative and scaled.
Public Static Functions
| Type | Name |
|---|---|
| PointF | ToRelative (this PointF point) Converts a scaled 1080p-based position into a relative one. |
| SizeF | ToRelative (this SizeF size) Converts a scaled 1080p-based position into a relative one. |
| PointF | ToScaled (this PointF point) Converts a relative 0-1 position into a scaled one. |
| SizeF | ToScaled (this SizeF size) Converts a relative 0-1 position into a scaled one. |
| float | ToXRelative (this float x) Converts the scaled X or Width to a relative one. |
| float | ToXScaled (this float x) Converts the relative X or Width float to a scaled one. |
| float | ToYRelative (this float y) Converts the scaled Y or Height to a relative one. |
| float | ToYScaled (this float y) Converts the relative Y or Height float to a scaled one. |
Public Static Functions Documentation
function ToRelative [1/2]
Converts a scaled 1080p-based position into a relative one.
static PointF LemonUI::Tools::Extensions::ToRelative (
this PointF point
)
Parameters:
pointThe scaled PointF.
Returns:
A new PointF with relative values.
function ToRelative [2/2]
Converts a scaled 1080p-based position into a relative one.
static SizeF LemonUI::Tools::Extensions::ToRelative (
this SizeF size
)
Parameters:
sizeThe scaled SizeF.
Returns:
A new SizeF with relative values.
function ToScaled [1/2]
Converts a relative 0-1 position into a scaled one.
static PointF LemonUI::Tools::Extensions::ToScaled (
this PointF point
)
Parameters:
pointThe relative PointF.
Returns:
A new PointF with scaled values.
function ToScaled [2/2]
Converts a relative 0-1 position into a scaled one.
static SizeF LemonUI::Tools::Extensions::ToScaled (
this SizeF size
)
Parameters:
sizeThe relative SizeF.
Returns:
A new SizeF with scaled values.
function ToXRelative
Converts the scaled X or Width to a relative one.
static float LemonUI::Tools::Extensions::ToXRelative (
this float x
)
Parameters:
xThe value to convert.
Returns:
A relative float between 0 and 1.
function ToXScaled
Converts the relative X or Width float to a scaled one.
static float LemonUI::Tools::Extensions::ToXScaled (
this float x
)
Parameters:
xThe float to convert.
Returns:
A scaled float.
function ToYRelative
Converts the scaled Y or Height to a relative one.
static float LemonUI::Tools::Extensions::ToYRelative (
this float y
)
Parameters:
yThe value to convert.
Returns:
A relative float between 0 and 1.
function ToYScaled
Converts the relative Y or Height float to a scaled one.
static float LemonUI::Tools::Extensions::ToYScaled (
this float y
)
Parameters:
yThe float to convert.
Returns:
A scaled float.
The documentation for this class was generated from the following file repos/LemonUI/LemonUI/Tools/Extensions.cs