directionExtent method
Returns the extent towards direction
.
Implementation
double directionExtent(AxisDirection direction) {
if (direction == AxisDirection.up) return -dy;
else if (direction == AxisDirection.right) return dx;
else if (direction == AxisDirection.down) return dy;
else return -dx;
}