public int getAbsoluteY(TextLocation location) { int height = 0; for (int i = 0; i < location.line; i++) { TypedLayout layout = getLines().get(i); height += layout.getHeightWithLeading(); } return height; }