lightbulb_outline Help shape the future of the Google Play Console, Android Studio, and Firebase. Start survey

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 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

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