com.androidplot.util
Class FontUtils

java.lang.Object
  extended by com.androidplot.util.FontUtils

public class FontUtils
extends java.lang.Object


Constructor Summary
FontUtils()
           
 
Method Summary
static float getFontHeight(android.graphics.Paint paint)
          Determines the height of the tallest character that can be drawn by paint.
static float getHalfStringHeight(java.lang.String text, android.graphics.Paint paint)
          Deprecated. 
static android.graphics.Rect getPackedStringDimensions(java.lang.String text, android.graphics.Paint paint)
          Get the smallest rect that ecompasses the text to be drawn using paint.
static android.graphics.Rect getStringDimensions(java.lang.String text, android.graphics.Paint paint)
          Like getPackedStringDimensions except adds extra space to accommodate all characters that can be drawn regardless of whether or not they exist in text.
static float getStringHeight(java.lang.String text, android.graphics.Paint paint)
          Deprecated. 
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontUtils

public FontUtils()
Method Detail

getFontHeight

public static float getFontHeight(android.graphics.Paint paint)
Determines the height of the tallest character that can be drawn by paint.

Parameters:
paint -
Returns:

getStringHeight

@Deprecated
public static float getStringHeight(java.lang.String text,
                                               android.graphics.Paint paint)
Deprecated. 

Parameters:
text -
paint -
Returns:

getHalfStringHeight

@Deprecated
public static float getHalfStringHeight(java.lang.String text,
                                                   android.graphics.Paint paint)
Deprecated. 

Parameters:
text -
paint -
Returns:

getPackedStringDimensions

public static android.graphics.Rect getPackedStringDimensions(java.lang.String text,
                                                              android.graphics.Paint paint)
Get the smallest rect that ecompasses the text to be drawn using paint.

Parameters:
text -
paint -
Returns:

getStringDimensions

public static android.graphics.Rect getStringDimensions(java.lang.String text,
                                                        android.graphics.Paint paint)
Like getPackedStringDimensions except adds extra space to accommodate all characters that can be drawn regardless of whether or not they exist in text. This ensures a more uniform appearance for things that have dynamic text.

Parameters:
text -
paint -
Returns:


Copyright © 2012. All Rights Reserved.