Code example for Layout

Methods: getLineForVertical, getOffsetForHorizontal