public class TextPaint extends Paint
Paint.Align, Paint.Cap, Paint.FontMetrics, Paint.FontMetricsInt, Paint.Join, Paint.Style
Modifier and Type | Field and Description |
---|---|
int |
baselineShift |
int |
bgColor |
float |
density |
int[] |
drawableState |
int |
linkColor |
int |
underlineColor
Special value 0 means no custom underline
|
float |
underlineThickness
Defined as a multiplier of the default underline thickness.
|
ANTI_ALIAS_FLAG, BIDI_DEFAULT_LTR, BIDI_DEFAULT_RTL, BIDI_FORCE_LTR, BIDI_FORCE_RTL, BIDI_LTR, BIDI_RTL, CURSOR_AFTER, CURSOR_AT, CURSOR_AT_OR_AFTER, CURSOR_AT_OR_BEFORE, CURSOR_BEFORE, DEV_KERN_TEXT_FLAG, DIRECTION_LTR, DIRECTION_RTL, DITHER_FLAG, FAKE_BOLD_TEXT_FLAG, FILTER_BITMAP_FLAG, hasShadow, HINTING_OFF, HINTING_ON, LINEAR_TEXT_FLAG, mBidiFlags, mNativePaint, shadowColor, shadowDx, shadowDy, shadowRadius, STRIKE_THRU_TEXT_FLAG, SUBPIXEL_TEXT_FLAG, UNDERLINE_TEXT_FLAG
Constructor and Description |
---|
TextPaint() |
TextPaint(int flags) |
TextPaint(Paint p) |
Modifier and Type | Method and Description |
---|---|
void |
set(TextPaint tp)
Copy the fields from tp into this TextPaint, including the
fields inherited from Paint.
|
void |
setUnderlineText(int color,
float thickness)
Defines a custom underline for this Paint.
|
ascent, breakText, breakText, breakText, clearShadowLayer, descent, finalize, getAlpha, getBidiFlags, getColor, getColorFilter, getFillPath, getFlags, getFontMetrics, getFontMetrics, getFontMetricsInt, getFontMetricsInt, getFontSpacing, getHinting, getMaskFilter, getPathEffect, getRasterizer, getShader, getStrokeCap, getStrokeJoin, getStrokeMiter, getStrokeWidth, getStyle, getTextAlign, getTextBounds, getTextBounds, getTextGlyphs, getTextLocale, getTextPath, getTextPath, getTextRunAdvances, getTextRunAdvances, getTextRunAdvances, getTextRunAdvances, getTextRunAdvances, getTextRunAdvances, getTextRunCursor, getTextRunCursor, getTextRunCursor, getTextScaleX, getTextSize, getTextSkewX, getTextWidths, getTextWidths, getTextWidths, getTextWidths, getTypeface, getXfermode, isAntiAlias, isDither, isFakeBoldText, isFilterBitmap, isLinearText, isStrikeThruText, isSubpixelText, isUnderlineText, measureText, measureText, measureText, measureText, reset, set, setAlpha, setAntiAlias, setARGB, setBidiFlags, setColor, setColorFilter, setCompatibilityScaling, setDither, setFakeBoldText, setFilterBitmap, setFlags, setHinting, setLinearText, setMaskFilter, setPathEffect, setRasterizer, setShader, setShadowLayer, setStrikeThruText, setStrokeCap, setStrokeJoin, setStrokeMiter, setStrokeWidth, setStyle, setSubpixelText, setTextAlign, setTextLocale, setTextScaleX, setTextSize, setTextSkewX, setTypeface, setUnderlineText, setXfermode
public int bgColor
public int baselineShift
public int linkColor
public int[] drawableState
public float density
public int underlineColor
public float underlineThickness
public TextPaint()
public TextPaint(int flags)
public TextPaint(Paint p)
public void set(TextPaint tp)
public void setUnderlineText(int color, float thickness)
color
- underline solid colorthickness
- underline thickness