Show / Hide Table of Contents

Class Extensions

Extensions for converting values between relative and scaled.

Inheritance
object
Extensions
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: LemonUI.Tools
Assembly: LemonUI.SHVDN3.dll
Syntax
public static class Extensions

Methods

View Source

ToRelative(PointF)

Converts a scaled 1080p-based position into a relative one.

Declaration
public static PointF ToRelative(this PointF point)
Parameters
Type Name Description
PointF point

The scaled PointF.

Returns
Type Description
PointF

A new PointF with relative values.

View Source

ToRelative(SizeF)

Converts a scaled 1080p-based position into a relative one.

Declaration
public static SizeF ToRelative(this SizeF size)
Parameters
Type Name Description
SizeF size

The scaled SizeF.

Returns
Type Description
SizeF

A new SizeF with relative values.

View Source

ToScaled(PointF)

Converts a relative 0-1 position into a scaled one.

Declaration
public static PointF ToScaled(this PointF point)
Parameters
Type Name Description
PointF point

The relative PointF.

Returns
Type Description
PointF

A new PointF with scaled values.

View Source

ToScaled(SizeF)

Converts a relative 0-1 position into a scaled one.

Declaration
public static SizeF ToScaled(this SizeF size)
Parameters
Type Name Description
SizeF size

The relative SizeF.

Returns
Type Description
SizeF

A new SizeF with scaled values.

View Source

ToXRelative(float)

Converts the scaled X or Width to a relative one.

Declaration
public static float ToXRelative(this float x)
Parameters
Type Name Description
float x

The value to convert.

Returns
Type Description
float

A relative float between 0 and 1.

View Source

ToXScaled(float)

Converts the relative X or Width float to a scaled one.

Declaration
public static float ToXScaled(this float x)
Parameters
Type Name Description
float x

The float to convert.

Returns
Type Description
float

A scaled float.

View Source

ToYRelative(float)

Converts the scaled Y or Height to a relative one.

Declaration
public static float ToYRelative(this float y)
Parameters
Type Name Description
float y

The value to convert.

Returns
Type Description
float

A relative float between 0 and 1.

View Source

ToYScaled(float)

Converts the relative Y or Height float to a scaled one.

Declaration
public static float ToYScaled(this float y)
Parameters
Type Name Description
float y

The float to convert.

Returns
Type Description
float

A scaled float.

  • View Source
In this article
Back to top Generated by DocFX