tab paint for android汉化,TextPaint  |  Android 开发者  |  Android Developers

float

Return the distance above (negative) the baseline (ascent) based on the

current typeface and text size.

int

breakText(char[] text, int index, int count, 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(CharSequence text, int start, int end, boolean measureForwards, float maxWidth, float[] measuredWidth)

Measure the text, stopping early if the measured width exceeds maxWidth.

void

Clear the shadow layer.

float

Return the distance below (positive) the baseline (descent) based on the

current typeface and text size.

boolean

Returns true of the passed

int

Helper to getColor() that just returns the color's alpha value.

Get the paint's blend mode object.

int

Return the paint's color in sRGB.

Get the paint's colorfilter (maybe be null).

long

Return the paint's color.

int

Get the current value of end hyphen edit.

boolean

Applies any/all effects (patheffect, stroking) to src, returning the

result in dst.

int

Return the paint's flags.

Returns the font feature settings.

float

Return the font's recommended interline spacing, given the Paint's

settings for typeface, textSize, etc.

Allocates a new FontMetrics object, and then calls getFontMetrics(fm)

with it, returning the object.

int

Return the font's interline spacing, given the Paint's settings for

typeface, textSize, etc.

float

Return the recommend line spacing based on the current typeface and

text size.

Returns the font variation settings.

int

Return the paint's hinting mode.

float

Return the paint's letter-spacing for text.

Get the paint's maskfilter object.

int

getOffsetForAdvance(char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance)

Get the character offset within the string whose position is closest to the specified

horizontal position.

int

getOffsetForAdvance(CharSequence text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance)

Get the paint's patheffect object.

float

getRunAdvance(char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset)

Measure cursor position within a run of text.

float

getRunAdvance(CharSequence text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset)

Get the paint's shader object.

int

Returns the color of the shadow layer.

long

Returns the color of the shadow layer.

float

Returns the x offset of the shadow layer.

float

Returns the y offset of the shadow layer.

float

Returns the blur radius of the shadow layer.

int

Get the current value of start hyphen edit.

float

Distance from top of the strike-through line to the baseline in pixels.

float

Returns the thickness of the strike-through line in pixels.

Return the paint's Cap, controlling how the start and end of stroked

lines and paths are treated.

Return the paint's stroke join type.

float

Return the paint's stroke miter value.

float

Return the width for stroking.

Return the paint's style, used for controlling how primitives'

geometries are interpreted (except for drawBitmap, which always assumes

FILL_STYLE).

Return the paint's Align value for drawing text.

void

getTextBounds(String text, int start, int end, Rect bounds)

Retrieve the text boundary box and store to bounds.

void

getTextBounds(CharSequence text, int start, int end, Rect bounds)

Retrieve the text boundary box and store to bounds.

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

Get the text's primary Locale.

Get the text locale list.

void

getTextPath(char[] text, int index, int count, float x, float y, Path path)

Return the path (outline) for the specified text.

void

getTextPath(String text, int start, int end, float x, float y, Path path)

Return the path (outline) for the specified text.

float

getTextRunAdvances(char[] chars, int index, int count, int contextIndex, int contextCount, boolean isRtl, float[] advances, int advancesIndex)

Retrieve the character advances of the text.

int

getTextRunCursor(CharSequence text, int contextStart, int contextEnd, boolean isRtl, int offset, int cursorOpt)

Returns the next cursor position in the run.

int

getTextRunCursor(char[] text, int contextStart, int contextLength, boolean isRtl, int offset, int cursorOpt)

Returns the next cursor position in the run.

float

Return the paint's horizontal scale factor for text.

float

Return the paint's text size.

float

Return the paint's horizontal skew factor for text.

int

getTextWidths(char[] text, int index, int count, float[] widths)

Return the advance widths for the characters in the string.

int

getTextWidths(String text, 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(CharSequence text, int start, int end, float[] widths)

Return the advance widths for the characters in the string.

Get the paint's typeface object.

float

Returns the distance from top of the underline to the baseline in pixels.

float

Returns the thickness of the underline in pixels.

float

Return the paint's extra word-spacing for text.

Get the paint's transfer mode object.

boolean

Determine whether the typeface set on the paint has a glyph supporting the string.

final

boolean

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

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.

boolean

Get the elegant metrics flag.

final

boolean

Helper for getFlags(), returning true if FAKE_BOLD_TEXT_FLAG bit is set

final

boolean

Whether or not the bitmap filter is activated.

final

boolean

Helper for getFlags(), returning true if LINEAR_TEXT_FLAG bit is set

final

boolean

Helper for getFlags(), returning true if STRIKE_THRU_TEXT_FLAG bit is set

final

boolean

Helper for getFlags(), returning true if SUBPIXEL_TEXT_FLAG bit is set

final

boolean

Helper for getFlags(), returning true if UNDERLINE_TEXT_FLAG bit is set

float

measureText(char[] text, int index, int count)

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

Return the width of the text.

void

Restores the paint to its default settings.

void

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

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

Set or clear the blend mode.

void

setColor(long color)

Set the paint's color with a ColorLong.

void

setColor(int color)

Set the paint's color.

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

Set the paint's elegant height metrics flag.

void

Set a end hyphen edit on the paint.

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

Set font feature settings.

boolean

Sets TrueType or OpenType font variation settings.

void

setHinting(int mode)

Set the paint's hinting mode.

void

setLetterSpacing(float letterSpacing)

Set the paint's letter-spacing for text.

void

setLinearText(boolean linearText)

Helper for setFlags(), setting or clearing the LINEAR_TEXT_FLAG bit

Set or clear the maskfilter object.

Set or clear the patheffect object.

Set or clear the shader object.

void

setShadowLayer(float radius, float dx, float dy, int shadowColor)

This draws a shadow layer below the main layer, with the specified

offset and color, and blur radius.

void

setShadowLayer(float radius, float dx, float dy, long shadowColor)

This draws a shadow layer below the main layer, with the specified

offset and color, and blur radius.

void

Set a start hyphen edit on the paint.

void

setStrikeThruText(boolean strikeThruText)

Helper for setFlags(), setting or clearing the STRIKE_THRU_TEXT_FLAG bit

void

Set the paint's Cap.

void

Set the paint's Join.

void

Set the paint's stroke miter value.

void

Set the width for stroking.

void

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

Set the paint's text alignment.

void

Set the text locale list to a one-member list consisting of just the locale.

void

Set the text locale list.

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.

Set or clear the typeface object.

void

setUnderlineText(boolean underlineText)

Helper for setFlags(), setting or clearing the UNDERLINE_TEXT_FLAG bit

void

setWordSpacing(float wordSpacing)

Set the paint's extra word-spacing for text.

Set or clear the transfer mode object.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值