getFontHeight(android.graphics.Paint paint)
Determines the height of the tallest character that can be drawn by paint.
static android.graphics.Rect
getPackedStringDimensions(String text,
android.graphics.Paint paint)
Get the smallest rect that ecompasses the text to be drawn using paint.
static android.graphics.Rect
getStringDimensions(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.
public static float getFontHeight(android.graphics.Paint paint)
Determines the height of the tallest character that can be drawn by paint.
Parameters:
paint -
Returns:
getPackedStringDimensions
public static android.graphics.Rect getPackedStringDimensions(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(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.