Added in API level 1

TextPaint


open class TextPaint : Paint
kotlin.Any
   ↳ 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
Public constructors

TextPaint(flags: Int)

Public methods
open Float

Returns the thickness of the underline in pixels.

open Unit
set(tp: TextPaint!)

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

Inherited functions
Properties
Int

Int

Float

IntArray!

Int

Int

Special value 0 means no custom underline

Float

Thickness of the underline, in pixels.

Public constructors

TextPaint

Added in API level 1
TextPaint()

TextPaint

Added in API level 1
TextPaint(p: Paint!)

TextPaint

Added in API level 1
TextPaint(flags: Int)

Public methods

getUnderlineThickness

Added in API level 29
open fun getUnderlineThickness(): Float

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

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

set

Added in API level 1
open fun set(tp: TextPaint!): Unit

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

Properties

baselineShift

Added in API level 1
var baselineShift: Int

bgColor

Added in API level 1
var bgColor: Int

density

Added in API level 5
var density: Float

drawableState

Added in API level 1
var drawableState: IntArray!

linkColor

Added in API level 1
var linkColor: Int

underlineColor

Added in API level 29
var underlineColor: Int

Special value 0 means no custom underline

underlineThickness

Added in API level 29
var underlineThickness: Float

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