OffsetAxisUtil extension
Extension on Offset that provides various directional utilities.
- on
Methods
-
axisOffset(
Axis axis) → double -
Gets the component of this offset on
axis
. -
crossAxisOffset(
Axis axis) → double -
Gets the component of this offset crossing
axis
. -
directionExtent(
AxisDirection direction) → double -
Returns the extent from origin towards
direction
. -
rotateWithAxis(
Axis axis) → Offset -
Rotates this offset with
axis
wheredx
becomes the cross axis extent anddy
becomes the main axis extent. -
rotateWithCrossAxis(
Axis crossAxis) → Offset -
Rotates this offset with
crossAxis
wheredx
becomes the cross axis extent anddy
becomes the main axis extent.
Static Methods
-
create(
Axis axis, double cross, double main) → Offset -
Creates an offset with the specified
cross
andmain
components. -
direction(
AxisDirection direction, double cross, double main) → Offset -
Creates an offset where
main
is the extent ondirection
andcross
is the extent counter-clockwise todirection
.