/** * Calculate the offsets required to translate from the specified anchor * position to the left baseline position. * * @param g2 the graphics device. * @param anchor the anchor position. * * @return The offsets. */ private float calculateBaselineOffset(final Graphics2D g2, final TextAnchor anchor) { float result = 0.0f; Iterator iterator = this.fragments.iterator(); while (iterator.hasNext()) { TextFragment fragment = (TextFragment) iterator.next(); result = Math.max(result, fragment.calculateBaselineOffset(g2, anchor)); } return result; }
/** * Calculate the offsets required to translate from the specified anchor * position to the left baseline position. * * @param g2 the graphics device. * @param anchor the anchor position. * * @return The offsets. */ private float calculateBaselineOffset(final Graphics2D g2, final TextAnchor anchor) { float result = 0.0f; Iterator iterator = this.fragments.iterator(); while (iterator.hasNext()) { TextFragment fragment = (TextFragment) iterator.next(); result = Math.max(result, fragment.calculateBaselineOffset(g2, anchor)); } return result; }
/** * Calculate the offsets required to translate from the specified anchor * position to the left baseline position. * * @param g2 the graphics device. * @param anchor the anchor position. * * @return The offsets. */ private float calculateBaselineOffset(final Graphics2D g2, final TextAnchor anchor) { float result = 0.0f; Iterator iterator = this.fragments.iterator(); while (iterator.hasNext()) { TextFragment fragment = (TextFragment) iterator.next(); result = Math.max(result, fragment.calculateBaselineOffset(g2, anchor)); } return result; }