From 93862d19f0950e4ae5ccadb2613aee173f111b3a Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 28 Aug 2014 06:10:37 +0200 Subject: graph/font: Use 'pixelSize' var-name, remove redundancies --- src/jogl/classes/com/jogamp/graph/font/Font.java | 43 +++++++++++++++++++++--- 1 file changed, 39 insertions(+), 4 deletions(-) (limited to 'src/jogl/classes/com/jogamp/graph/font') diff --git a/src/jogl/classes/com/jogamp/graph/font/Font.java b/src/jogl/classes/com/jogamp/graph/font/Font.java index 92d35768b..52ad4076d 100644 --- a/src/jogl/classes/com/jogamp/graph/font/Font.java +++ b/src/jogl/classes/com/jogamp/graph/font/Font.java @@ -88,7 +88,7 @@ public interface Font { float getScale(final float pixelSize); /** * @param dest AABBox instance set to this metrics boundary w/ given pixelSize - * @param pixelSize + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link Font#getPixelSize(float, float)} * @param tmpV3 caller provided temporary 3-component vector * @return the given and set AABBox 'dest' */ @@ -113,14 +113,25 @@ public interface Font { public char getSymbol(); public short getID(); public AABBox getBBox(); + /** + * + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link Font#getPixelSize(float, float)} + * @return + */ public float getScale(final float pixelSize); /** * @param dest AABBox instance set to this metrics boundary w/ given pixelSize - * @param pixelSize + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link Font#getPixelSize(float, float)} * @param tmpV3 caller provided temporary 3-component vector * @return the given and set AABBox 'dest' */ public AABBox getBBox(final AABBox dest, final float pixelSize, float[] tmpV3); + /** + * + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link Font#getPixelSize(float, float)} + * @param useFrationalMetrics + * @return + */ public float getAdvance(final float pixelSize, boolean useFrationalMetrics); public OutlineShape getShape(); public int hashCode(); @@ -153,13 +164,37 @@ public interface Font { */ public float getPixelSize(final float fontSize /* points per inch */, final float resolution); + /** + * + * @param glyphID + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} + * @return + */ public float getAdvanceWidth(final int glyphID, final float pixelSize); public Metrics getMetrics(); public Glyph getGlyph(final char symbol); public int getNumGlyphs(); + /** + * + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} + * @return + */ public float getLineHeight(final float pixelSize); + /** + * + * @param string + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} + * @return + */ public float getMetricWidth(final CharSequence string, final float pixelSize); + /** + * + * @param string + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} + * @param tmp + * @return + */ public float getMetricHeight(final CharSequence string, final float pixelSize, final AABBox tmp); /** * Return the layout bounding box as computed by each glyph's metrics. @@ -168,7 +203,7 @@ public interface Font { * See {@link #getPointsBounds(AffineTransform, CharSequence, float, AffineTransform, AffineTransform)} for pixel correct results. *

* @param string string text - * @param pixelSize Use {@link Font#getPixelSize(float, float)} for resolution correct pixel-size. + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} */ public AABBox getMetricBounds(final CharSequence string, final float pixelSize); @@ -176,7 +211,7 @@ public interface Font { * Return the bounding box by taking each glyph's point-based bounding box into account. * @param transform optional given transform * @param string string text - * @param pixelSize Use {@link Font#getPixelSize(float, float)} for resolution correct pixel-size. + * @param pixelSize Use pointSize * resolution for resolution correct pixel-size, see {@link #getPixelSize(float, float)} * @param temp1 temporary AffineTransform storage, mandatory * @param temp2 temporary AffineTransform storage, mandatory */ -- cgit v1.2.3