Gets the component of this offset on axis.
axis
double axisOffset(Axis axis) { return axis == Axis.vertical ? dy : dx; }