Anchor2D class

Represents a point in a rectangle as a ratio of this rectangle's width and height.

Constructors

Anchor2D()
Creates a new instance of an Anchor2D with the default parameters
factory
Anchor2D.withHorizontalAndVertical(double horizontal, double vertical)
Creates a new instance of an Anchor2D.
factory

Properties

hashCode → int
The hash code for this object.
no setter
horizontal ↔ double
Defines the x axis where the left is 0, the right is 1 and the middle is 0.5. The default value is 0.5.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
vertical ↔ double
Defines the y axis where the top is 0, the bottom is 1 and the middle is 0.5. The default value is 0.5.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.

Static Methods

bottom() Anchor2D
Returns an anchor positioned at the bottom center.
bottomLeft() Anchor2D
Returns an anchor positioned at the bottom left.
bottomRight() Anchor2D
Returns an anchor positioned at the bottom right.
center() Anchor2D
Returns an anchor positioned at the center.
left() Anchor2D
Returns an anchor positioned at the left center.
Returns an anchor positioned at the right center.
top() Anchor2D
Returns an anchor positioned at the top center.
topLeft() Anchor2D
Returns an anchor positioned at the top left.
topRight() Anchor2D
Returns an anchor positioned at the top right.