TextPaint


public class TextPaint
extends Paint

java.lang.Object
   ↳ android.graphics.Paint
     ↳ android.text.TextPaint


TextPaint is an extension of Paint that leaves room for some extra data used during text measuring and drawing.

Summary

Inherited constants

Fields

public int baselineShift

public int bgColor

public float density

public int[] drawableState

public int linkColor

public int underlineColor

Special value 0 means no custom underline

public float underlineThickness

Thickness of the underline, in pixels.

Public constructors

TextPaint()
TextPaint(Paint p)
TextPaint(int flags)

Public methods

float getUnderlineThickness()

Returns the thickness of the underline in pixels.

void set(TextPaint tp)

Copy the fields from tp into this TextPaint, including the fields inherited from Paint.

Inherited methods

Fields

baselineShift

public int baselineShift

bgColor

public int bgColor

density

public float density

drawableState

public int[] drawableState

linkColor

public int linkColor

underlineColor

public int underlineColor

Special value 0 means no custom underline

underlineThickness

public float underlineThickness

Thickness of the underline, in pixels.
The units of this value are pixels.

Public constructors

TextPaint

public TextPaint ()

TextPaint

public TextPaint (Paint p)

Parameters
p Paint

TextPaint

public TextPaint (int flags)

Parameters
flags int

Public methods

getUnderlineThickness

public float getUnderlineThickness ()

Returns the thickness of the underline in pixels.
The units of this value are pixels.

Returns
float the thickness of the underline in pixels.
The units of this value are pixels.

set

public void set (TextPaint tp)

Copy the fields from tp into this TextPaint, including the fields inherited from Paint.

Parameters
tp TextPaint