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(int flags)
TextPaint(Paint p)

Public methods

void set(TextPaint tp)

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

Inherited methods

Fields

baselineShift

Added in API level 1
public int baselineShift

bgColor

Added in API level 1
public int bgColor

density

Added in API level 5
public float density

drawableState

Added in API level 1
public int[] drawableState

linkColor

Added in API level 1
public int linkColor

underlineColor

Added in API level 29
public int underlineColor

Special value 0 means no custom underline

underlineThickness

Added in API level 29
public float underlineThickness

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

Public constructors

TextPaint

Added in API level 1
public TextPaint ()

TextPaint

Added in API level 1
public TextPaint (int flags)

Parameters
flags int

TextPaint

Added in API level 1
public TextPaint (Paint p)

Parameters
p Paint

Public methods

set

Added in API level 1
public void set (TextPaint tp)

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

Parameters
tp TextPaint