OffsetAxisUtil extension
Extension on Offset that provides various directional utilities.
- on
Methods
-
axisOffset(
Axis axis) → double -
Available on Offset, provided by the OffsetAxisUtil extension
Gets the component of this offset onaxis. -
crossAxisOffset(
Axis axis) → double -
Available on Offset, provided by the OffsetAxisUtil extension
Gets the component of this offset crossingaxis. -
directionExtent(
AxisDirection direction) → double -
Available on Offset, provided by the OffsetAxisUtil extension
Returns the extent from origin towardsdirection. -
rotateWithAxis(
Axis axis) → Offset -
Available on Offset, provided by the OffsetAxisUtil extension
Rotates this offset withaxiswheredxbecomes the cross axis extent anddybecomes the main axis extent. -
rotateWithCrossAxis(
Axis crossAxis) → Offset -
Available on Offset, provided by the OffsetAxisUtil extension
Rotates this offset withcrossAxiswheredxbecomes the cross axis extent anddybecomes the main axis extent.
Static Methods
-
create(
Axis axis, double cross, double main) → Offset -
Available on Offset, provided by the OffsetAxisUtil extension
Creates an offset with the specifiedcrossandmaincomponents. -
direction(
AxisDirection direction, double cross, double main) → Offset -
Available on Offset, provided by the OffsetAxisUtil extension
Creates an offset wheremainis the extent ondirectionandcrossis the extent counter-clockwise todirection.