RelativeRectangle class

RelativeRectangle class

Relative rectangle The formula between relative component to absolute value is: Scale * (Reference Width) + offset So if we want it to represent an absolute value, leave all scale fields zero, and use offset fields instead.

The RelativeRectangle type exposes the following members:

Constructors

ConstructorDescription
initConstruct a RelativeRectangle
initConstructs a new instance of RelativeRectangle

Properties

PropertyDescription
scale_xRelative coordinate X
scale_yRelative coordinate Y
scale_widthRelative width
scale_heightRelative height
offset_xGets or sets the offset for coordinate X
offset_yGets or sets the offset for coordinate Y
offset_widthGets or sets the offset for width
offset_heightGets or sets the offset for height

Methods

MethodDescription
to_absoluteConvert the relative rectangle to absolute rectangle
from_scaleConstruct a RelativeRectangle with all offset fields zero and scale fields from given parameters.

See Also