Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
Android APIs
public class

TextPaint

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

Class Overview

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

Summary

[Expand]
Inherited Constants
From class android.graphics.Paint
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.
[Expand]
Inherited Methods
From class android.graphics.Paint
From class java.lang.Object

Fields

public int baselineShift

Added in API level 1

public int bgColor

Added in API level 1

public float density

Added in API level 5

public int[] drawableState

Added in API level 1

public int linkColor

Added in API level 1

Public Constructors

public TextPaint ()

Added in API level 1

public TextPaint (int flags)

Added in API level 1

public TextPaint ( Paint p)

Added in API level 1

Public Methods

public void set ( TextPaint tp)

Added in API level 1

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