float
|
ascent()
Return the distance above (negative) the baseline (ascent) based on the current typeface and text size.
|
int
|
breakText(
CharSequence text, int start, int end, boolean measureForwards, float maxWidth, float[] measuredWidth)
Measure the text, stopping early if the measured width exceeds maxWidth.
|
int
|
breakText(
String text, boolean measureForwards, float maxWidth, float[] measuredWidth)
Measure the text, stopping early if the measured width exceeds maxWidth.
|
int
|
breakText(char[] text, int index, int count, float maxWidth, float[] measuredWidth)
Measure the text, stopping early if the measured width exceeds maxWidth.
|
void
|
clearShadowLayer()
Clear the shadow layer.
|
float
|
descent()
Return the distance below (positive) the baseline (descent) based on the current typeface and text size.
|
void
|
finalize()
Invoked when the garbage collector has detected that this instance is no longer reachable.
|
int
|
getAlpha()
Helper to getColor() that just returns the color's alpha value.
|
int
|
getColor()
Return the paint's color.
|
ColorFilter
|
getColorFilter()
Get the paint's colorfilter (maybe be null).
|
boolean
|
getFillPath(
Path src,
Path dst)
Applies any/all effects (patheffect, stroking) to src, returning the result in dst.
|
int
|
getFlags()
Return the paint's flags.
|
float
|
getFontMetrics(
Paint.FontMetrics metrics)
Return the font's recommended interline spacing, given the Paint's settings for typeface, textSize, etc.
|
Paint.FontMetrics
|
getFontMetrics()
Allocates a new FontMetrics object, and then calls getFontMetrics(fm) with it, returning the object.
|
Paint.FontMetricsInt
|
getFontMetricsInt()
|
int
|
getFontMetricsInt(
Paint.FontMetricsInt fmi)
Return the font's interline spacing, given the Paint's settings for typeface, textSize, etc.
|
float
|
getFontSpacing()
Return the recommend line spacing based on the current typeface and text size.
|
int
|
getHinting()
Return the paint's hinting mode.
|
MaskFilter
|
getMaskFilter()
Get the paint's maskfilter object.
|
PathEffect
|
getPathEffect()
Get the paint's patheffect object.
|
Rasterizer
|
getRasterizer()
Get the paint's rasterizer (or null).
|
Shader
|
getShader()
Get the paint's shader object.
|
Paint.Cap
|
getStrokeCap()
Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated.
|
Paint.Join
|
getStrokeJoin()
Return the paint's stroke join type.
|
float
|
getStrokeMiter()
Return the paint's stroke miter value.
|
float
|
getStrokeWidth()
Return the width for stroking.
|
Paint.Style
|
getStyle()
Return the paint's style, used for controlling how primitives' geometries are interpreted (except for drawBitmap, which always assumes FILL_STYLE).
|
Paint.Align
|
getTextAlign()
Return the paint's Align value for drawing text.
|
void
|
getTextBounds(char[] text, int index, int count,
Rect bounds)
Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).
|
void
|
getTextBounds(
String text, int start, int end,
Rect bounds)
Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).
|
Locale
|
getTextLocale()
Get the text Locale.
|
void
|
getTextPath(
String text, int start, int end, float x, float y,
Path path)
Return the path (outline) for the specified text.
|
void
|
getTextPath(char[] text, int index, int count, float x, float y,
Path path)
Return the path (outline) for the specified text.
|
float
|
getTextScaleX()
Return the paint's horizontal scale factor for text.
|
float
|
getTextSize()
Return the paint's text size.
|
float
|
getTextSkewX()
Return the paint's horizontal skew factor for text.
|
int
|
getTextWidths(
String text, float[] widths)
Return the advance widths for the characters in the string.
|
int
|
getTextWidths(
CharSequence text, int start, int end, float[] widths)
Return the advance widths for the characters in the string.
|
int
|
getTextWidths(
String text, int start, int end, float[] widths)
Return the advance widths for the characters in the string.
|
int
|
getTextWidths(char[] text, int index, int count, float[] widths)
Return the advance widths for the characters in the string.
|
Typeface
|
getTypeface()
Get the paint's typeface object.
|
Xfermode
|
getXfermode()
Get the paint's xfermode object.
|
final boolean
|
isAntiAlias()
Helper for getFlags(), returning true if ANTI_ALIAS_FLAG bit is set AntiAliasing smooths out the edges of what is being drawn, but is has no impact on the interior of the shape.
|
final boolean
|
isDither()
Helper for getFlags(), returning true if DITHER_FLAG bit is set Dithering affects how colors that are higher precision than the device are down-sampled.
|
final boolean
|
isFakeBoldText()
Helper for getFlags(), returning true if FAKE_BOLD_TEXT_FLAG bit is set
|
final boolean
|
isFilterBitmap()
Whether or not the bitmap filter is activated.
|
final boolean
|
isLinearText()
Helper for getFlags(), returning true if LINEAR_TEXT_FLAG bit is set
|
final boolean
|
isStrikeThruText()
Helper for getFlags(), returning true if STRIKE_THRU_TEXT_FLAG bit is set
|
final boolean
|
isSubpixelText()
Helper for getFlags(), returning true if SUBPIXEL_TEXT_FLAG bit is set
|
final boolean
|
isUnderlineText()
Helper for getFlags(), returning true if UNDERLINE_TEXT_FLAG bit is set
|
float
|
measureText(
String text)
Return the width of the text.
|
float
|
measureText(
CharSequence text, int start, int end)
Return the width of the text.
|
float
|
measureText(
String text, int start, int end)
Return the width of the text.
|
float
|
measureText(char[] text, int index, int count)
Return the width of the text.
|
void
|
reset()
Restores the paint to its default settings.
|
void
|
set(
Paint src)
Copy the fields from src into this paint.
|
void
|
setARGB(int a, int r, int g, int b)
Helper to setColor(), that takes a,r,g,b and constructs the color int
|
void
|
setAlpha(int a)
Helper to setColor(), that only assigns the color's alpha value, leaving its r,g,b values unchanged.
|
void
|
setAntiAlias(boolean aa)
Helper for setFlags(), setting or clearing the ANTI_ALIAS_FLAG bit AntiAliasing smooths out the edges of what is being drawn, but is has no impact on the interior of the shape.
|
void
|
setColor(int color)
Set the paint's color.
|
ColorFilter
|
setColorFilter(
ColorFilter filter)
Set or clear the paint's colorfilter, returning the parameter.
|
void
|
setDither(boolean dither)
Helper for setFlags(), setting or clearing the DITHER_FLAG bit Dithering affects how colors that are higher precision than the device are down-sampled.
|
void
|
setFakeBoldText(boolean fakeBoldText)
Helper for setFlags(), setting or clearing the FAKE_BOLD_TEXT_FLAG bit
|
void
|
setFilterBitmap(boolean filter)
Helper for setFlags(), setting or clearing the FILTER_BITMAP_FLAG bit.
|
void
|
setFlags(int flags)
Set the paint's flags.
|
void
|
setHinting(int mode)
Set the paint's hinting mode.
|
void
|
setLinearText(boolean linearText)
Helper for setFlags(), setting or clearing the LINEAR_TEXT_FLAG bit
|
MaskFilter
|
setMaskFilter(
MaskFilter maskfilter)
Set or clear the maskfilter object.
|
PathEffect
|
setPathEffect(
PathEffect effect)
Set or clear the patheffect object.
|
Rasterizer
|
setRasterizer(
Rasterizer rasterizer)
Set or clear the rasterizer object.
|
Shader
|
setShader(
Shader shader)
Set or clear the shader object.
|
void
|
setShadowLayer(float radius, float dx, float dy, int color)
This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.
|
void
|
setStrikeThruText(boolean strikeThruText)
Helper for setFlags(), setting or clearing the STRIKE_THRU_TEXT_FLAG bit
|
void
|
setStrokeCap(
Paint.Cap cap)
Set the paint's Cap.
|
void
|
setStrokeJoin(
Paint.Join join)
Set the paint's Join.
|
void
|
setStrokeMiter(float miter)
Set the paint's stroke miter value.
|
void
|
setStrokeWidth(float width)
Set the width for stroking.
|
void
|
setStyle(
Paint.Style style)
Set the paint's style, used for controlling how primitives' geometries are interpreted (except for drawBitmap, which always assumes Fill).
|
void
|
setSubpixelText(boolean subpixelText)
Helper for setFlags(), setting or clearing the SUBPIXEL_TEXT_FLAG bit
|
void
|
setTextAlign(
Paint.Align align)
Set the paint's text alignment.
|
void
|
setTextLocale(
Locale locale)
Set the text locale.
|
void
|
setTextScaleX(float scaleX)
Set the paint's horizontal scale factor for text.
|
void
|
setTextSize(float textSize)
Set the paint's text size.
|
void
|
setTextSkewX(float skewX)
Set the paint's horizontal skew factor for text.
|
Typeface
|
setTypeface(
Typeface typeface)
Set or clear the typeface object.
|
void
|
setUnderlineText(boolean underlineText)
Helper for setFlags(), setting or clearing the UNDERLINE_TEXT_FLAG bit
|
Xfermode
|
setXfermode(
Xfermode xfermode)
Set or clear the xfermode object.
|