android.graphics
Class Paint
java.lang.Object
android.graphics.Paint
- Direct Known Subclasses:
- TextPaint
public class Paint
- extends Object
Method Summary |
float |
ascent()
|
int |
breakText(char[] text,
int index,
int count,
float maxWidth,
float[] measuredWidth)
|
int |
breakText(CharSequence text,
int start,
int end,
boolean measureForwards,
float maxWidth,
float[] measuredWidth)
|
int |
breakText(String text,
boolean measureForwards,
float maxWidth,
float[] measuredWidth)
|
void |
clearShadowLayer()
|
float |
descent()
|
protected void |
finalize()
|
int |
getAlpha()
|
int |
getColor()
|
ColorFilter |
getColorFilter()
|
boolean |
getFillPath(Path src,
Path dst)
|
int |
getFlags()
|
Paint.FontMetrics |
getFontMetrics()
|
float |
getFontMetrics(Paint.FontMetrics metrics)
|
Paint.FontMetricsInt |
getFontMetricsInt()
|
int |
getFontMetricsInt(Paint.FontMetricsInt fmi)
|
float |
getFontSpacing()
|
MaskFilter |
getMaskFilter()
|
PathEffect |
getPathEffect()
|
Rasterizer |
getRasterizer()
|
Shader |
getShader()
|
Paint.Cap |
getStrokeCap()
|
Paint.Join |
getStrokeJoin()
|
float |
getStrokeMiter()
|
float |
getStrokeWidth()
|
Paint.Style |
getStyle()
|
Paint.Align |
getTextAlign()
|
void |
getTextBounds(char[] text,
int index,
int count,
Rect bounds)
|
void |
getTextBounds(String text,
int start,
int end,
Rect bounds)
|
void |
getTextPath(char[] text,
int index,
int count,
float x,
float y,
Path path)
|
void |
getTextPath(String text,
int start,
int end,
float x,
float y,
Path path)
|
float |
getTextScaleX()
|
float |
getTextSize()
|
float |
getTextSkewX()
|
int |
getTextWidths(char[] text,
int index,
int count,
float[] widths)
|
int |
getTextWidths(CharSequence text,
int start,
int end,
float[] widths)
|
int |
getTextWidths(String text,
float[] widths)
|
int |
getTextWidths(String text,
int start,
int end,
float[] widths)
|
Typeface |
getTypeface()
|
Xfermode |
getXfermode()
|
boolean |
isAntiAlias()
|
boolean |
isDither()
|
boolean |
isFakeBoldText()
|
boolean |
isFilterBitmap()
|
boolean |
isLinearText()
|
boolean |
isStrikeThruText()
|
boolean |
isSubpixelText()
|
boolean |
isUnderlineText()
|
float |
measureText(char[] text,
int index,
int count)
|
float |
measureText(CharSequence text,
int start,
int end)
|
float |
measureText(String text)
|
float |
measureText(String text,
int start,
int end)
|
void |
reset()
|
void |
set(Paint src)
|
void |
setAlpha(int a)
|
void |
setAntiAlias(boolean aa)
|
void |
setARGB(int a,
int r,
int g,
int b)
|
void |
setColor(int color)
|
ColorFilter |
setColorFilter(ColorFilter filter)
|
void |
setDither(boolean dither)
|
void |
setFakeBoldText(boolean fakeBoldText)
|
void |
setFilterBitmap(boolean filter)
|
void |
setFlags(int flags)
|
void |
setLinearText(boolean linearText)
|
MaskFilter |
setMaskFilter(MaskFilter maskfilter)
|
PathEffect |
setPathEffect(PathEffect effect)
|
Rasterizer |
setRasterizer(Rasterizer rasterizer)
|
Shader |
setShader(Shader shader)
|
void |
setShadowLayer(float radius,
float dx,
float dy,
int color)
|
void |
setStrikeThruText(boolean strikeThruText)
|
void |
setStrokeCap(Paint.Cap cap)
|
void |
setStrokeJoin(Paint.Join join)
|
void |
setStrokeMiter(float miter)
|
void |
setStrokeWidth(float width)
|
void |
setStyle(Paint.Style style)
|
void |
setSubpixelText(boolean subpixelText)
|
void |
setTextAlign(Paint.Align align)
|
void |
setTextScaleX(float scaleX)
|
void |
setTextSize(float textSize)
|
void |
setTextSkewX(float skewX)
|
Typeface |
setTypeface(Typeface typeface)
|
void |
setUnderlineText(boolean underlineText)
|
Xfermode |
setXfermode(Xfermode xfermode)
|
ANTI_ALIAS_FLAG
public static final int ANTI_ALIAS_FLAG
- See Also:
- Constant Field Values
FILTER_BITMAP_FLAG
public static final int FILTER_BITMAP_FLAG
- See Also:
- Constant Field Values
DITHER_FLAG
public static final int DITHER_FLAG
- See Also:
- Constant Field Values
UNDERLINE_TEXT_FLAG
public static final int UNDERLINE_TEXT_FLAG
- See Also:
- Constant Field Values
STRIKE_THRU_TEXT_FLAG
public static final int STRIKE_THRU_TEXT_FLAG
- See Also:
- Constant Field Values
FAKE_BOLD_TEXT_FLAG
public static final int FAKE_BOLD_TEXT_FLAG
- See Also:
- Constant Field Values
LINEAR_TEXT_FLAG
public static final int LINEAR_TEXT_FLAG
- See Also:
- Constant Field Values
SUBPIXEL_TEXT_FLAG
public static final int SUBPIXEL_TEXT_FLAG
- See Also:
- Constant Field Values
DEV_KERN_TEXT_FLAG
public static final int DEV_KERN_TEXT_FLAG
- See Also:
- Constant Field Values
Paint
public Paint()
Paint
public Paint(int flags)
Paint
public Paint(Paint paint)
reset
public void reset()
set
public void set(Paint src)
getFlags
public int getFlags()
setFlags
public void setFlags(int flags)
isAntiAlias
public final boolean isAntiAlias()
setAntiAlias
public void setAntiAlias(boolean aa)
isDither
public final boolean isDither()
setDither
public void setDither(boolean dither)
isLinearText
public final boolean isLinearText()
setLinearText
public void setLinearText(boolean linearText)
isSubpixelText
public final boolean isSubpixelText()
setSubpixelText
public void setSubpixelText(boolean subpixelText)
isUnderlineText
public final boolean isUnderlineText()
setUnderlineText
public void setUnderlineText(boolean underlineText)
isStrikeThruText
public final boolean isStrikeThruText()
setStrikeThruText
public void setStrikeThruText(boolean strikeThruText)
isFakeBoldText
public final boolean isFakeBoldText()
setFakeBoldText
public void setFakeBoldText(boolean fakeBoldText)
isFilterBitmap
public final boolean isFilterBitmap()
setFilterBitmap
public void setFilterBitmap(boolean filter)
getStyle
public Paint.Style getStyle()
setStyle
public void setStyle(Paint.Style style)
getColor
public int getColor()
setColor
public void setColor(int color)
getAlpha
public int getAlpha()
setAlpha
public void setAlpha(int a)
setARGB
public void setARGB(int a,
int r,
int g,
int b)
getStrokeWidth
public float getStrokeWidth()
setStrokeWidth
public void setStrokeWidth(float width)
getStrokeMiter
public float getStrokeMiter()
setStrokeMiter
public void setStrokeMiter(float miter)
getStrokeCap
public Paint.Cap getStrokeCap()
setStrokeCap
public void setStrokeCap(Paint.Cap cap)
getStrokeJoin
public Paint.Join getStrokeJoin()
setStrokeJoin
public void setStrokeJoin(Paint.Join join)
getFillPath
public boolean getFillPath(Path src,
Path dst)
getShader
public Shader getShader()
setShader
public Shader setShader(Shader shader)
getColorFilter
public ColorFilter getColorFilter()
setColorFilter
public ColorFilter setColorFilter(ColorFilter filter)
getXfermode
public Xfermode getXfermode()
setXfermode
public Xfermode setXfermode(Xfermode xfermode)
getPathEffect
public PathEffect getPathEffect()
setPathEffect
public PathEffect setPathEffect(PathEffect effect)
getMaskFilter
public MaskFilter getMaskFilter()
setMaskFilter
public MaskFilter setMaskFilter(MaskFilter maskfilter)
getTypeface
public Typeface getTypeface()
setTypeface
public Typeface setTypeface(Typeface typeface)
getRasterizer
public Rasterizer getRasterizer()
setRasterizer
public Rasterizer setRasterizer(Rasterizer rasterizer)
setShadowLayer
public void setShadowLayer(float radius,
float dx,
float dy,
int color)
clearShadowLayer
public void clearShadowLayer()
getTextAlign
public Paint.Align getTextAlign()
setTextAlign
public void setTextAlign(Paint.Align align)
getTextSize
public float getTextSize()
setTextSize
public void setTextSize(float textSize)
getTextScaleX
public float getTextScaleX()
setTextScaleX
public void setTextScaleX(float scaleX)
getTextSkewX
public float getTextSkewX()
setTextSkewX
public void setTextSkewX(float skewX)
ascent
public float ascent()
descent
public float descent()
getFontMetrics
public float getFontMetrics(Paint.FontMetrics metrics)
getFontMetrics
public Paint.FontMetrics getFontMetrics()
getFontMetricsInt
public int getFontMetricsInt(Paint.FontMetricsInt fmi)
getFontMetricsInt
public Paint.FontMetricsInt getFontMetricsInt()
getFontSpacing
public float getFontSpacing()
measureText
public float measureText(char[] text,
int index,
int count)
measureText
public float measureText(String text,
int start,
int end)
measureText
public float measureText(String text)
measureText
public float measureText(CharSequence text,
int start,
int end)
breakText
public int breakText(char[] text,
int index,
int count,
float maxWidth,
float[] measuredWidth)
breakText
public int breakText(CharSequence text,
int start,
int end,
boolean measureForwards,
float maxWidth,
float[] measuredWidth)
breakText
public int breakText(String text,
boolean measureForwards,
float maxWidth,
float[] measuredWidth)
getTextWidths
public int getTextWidths(char[] text,
int index,
int count,
float[] widths)
getTextWidths
public int getTextWidths(CharSequence text,
int start,
int end,
float[] widths)
getTextWidths
public int getTextWidths(String text,
int start,
int end,
float[] widths)
getTextWidths
public int getTextWidths(String text,
float[] widths)
getTextPath
public void getTextPath(char[] text,
int index,
int count,
float x,
float y,
Path path)
getTextPath
public void getTextPath(String text,
int start,
int end,
float x,
float y,
Path path)
getTextBounds
public void getTextBounds(String text,
int start,
int end,
Rect bounds)
getTextBounds
public void getTextBounds(char[] text,
int index,
int count,
Rect bounds)
finalize
protected void finalize()
throws Throwable
- Overrides:
finalize
in class Object
- Throws:
Throwable
Copyright © 2008-2010. All Rights Reserved.