Android.Graphics.Paint Members

The members of Android.Graphics.Paint are listed below.

See Also: Inherited members from Java.Lang.Object

Public Constructors

Create a new paint with default settings.
Create a new paint, initialized with the attributes in the specified paint parameter.
Create a new paint with the specified flags.

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.

Public Fields

const
HintingOffPaintHinting (0). Font hinter option that disables font hinting.
const
HintingOnPaintHinting (1). Font hinter option that enables font hinting.

Public Properties

Alphaint. Helper to getColor() that just returns the color's alpha value.
AntiAliasbool. 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.
ColorColor. Return the paint's color.
[read-only]
ColorFilterColorFilter. Get the paint's colorfilter (maybe be null).
Ditherbool. 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.
ElegantTextHeightbool. Get the elegant metrics flag.
FakeBoldTextbool. Helper for getFlags(), returning true if FAKE_BOLD_TEXT_FLAG bit is set
FilterBitmapbool. Whether or not the bitmap filter is activated.
FlagsPaintFlags. Return the paint's flags.
FontFeatureSettingsstring. Get font feature settings.
[read-only]
FontSpacingfloat. Return the recommend line spacing based on the current typeface and text size.
HintingPaintHinting. Return the paint's hinting mode.
LetterSpacingfloat. Return the paint's letter-spacing for text.
LinearTextbool. Helper for getFlags(), returning true if LINEAR_TEXT_FLAG bit is set
[read-only]
MaskFilterMaskFilter. Get the paint's maskfilter object.
[read-only]
PathEffectPathEffect. Get the paint's patheffect object.
[read-only]
RasterizerRasterizer. Get the paint's rasterizer (or null).
[read-only]
ShaderShader. Get the paint's shader object.
StrikeThruTextbool. Helper for getFlags(), returning true if STRIKE_THRU_TEXT_FLAG bit is set
StrokeCapPaint.Cap. Return the paint's Cap, controlling how the start and end of stroked lines and paths are treated.
StrokeJoinPaint.Join. Return the paint's stroke join type.
StrokeMiterfloat. Return the paint's stroke miter value.
StrokeWidthfloat. Return the width for stroking.
SubpixelTextbool. Helper for getFlags(), returning true if SUBPIXEL_TEXT_FLAG bit is set
TextAlignPaint.Align. Return the paint's Align value for drawing text.
TextLocaleJava.Util.Locale. Get the text Locale.
TextScaleXfloat. Return the paint's horizontal scale factor for text.
TextSizefloat. Return the paint's text size.
TextSkewXfloat. Return the paint's horizontal skew factor for text.
[read-only]
TypefaceTypeface. Get the paint's typeface object.
UnderlineTextbool. Helper for getFlags(), returning true if UNDERLINE_TEXT_FLAG bit is set
[read-only]
XfermodeXfermode. Get the paint's xfermode object.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

Ascent() : float
Return the distance above (negative) the baseline (ascent) based on the current typeface and text size.
BreakText(string, bool, float, float[]) : int
Measure the text, stopping early if the measured width exceeds maxWidth.
BreakText(char[], int, int, float, float[]) : int
Measure the text, stopping early if the measured width exceeds maxWidth.
BreakText(Java.Lang.ICharSequence, int, int, bool, float, float[]) : int
Measure the text, stopping early if the measured width exceeds maxWidth.
BreakText(string, int, int, bool, float, float[]) : int
Documentation for this section has not yet been entered.
ClearShadowLayer()
Clear the shadow layer.
Descent() : float
Return the distance below (positive) the baseline (descent) based on the current typeface and text size.
GetFillPath(Path, Path) : bool
Applies any/all effects (patheffect, stroking) to src, returning the result in dst.
GetFontMetrics() : Paint.FontMetrics
Allocates a new FontMetrics object, and then calls getFontMetrics(fm) with it, returning the object.
GetFontMetrics(Paint.FontMetrics) : float
Return the font's recommended interline spacing, given the Paint's settings for typeface, textSize, etc.
GetFontMetricsInt() : Paint.FontMetricsInt
GetFontMetricsInt(Paint.FontMetricsInt) : int
Return the font's interline spacing, given the Paint's settings for typeface, textSize, etc.
GetStyle() : Paint.Style
Return the paint's style, used for controlling how primitives' geometries are interpreted (except for drawBitmap, which always assumes FILL_STYLE).
GetTextBounds(char[], int, int, Rect)
Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).
GetTextBounds(string, int, int, Rect)
Return in bounds (allocated by the caller) the smallest rectangle that encloses all of the characters, with an implied origin at (0,0).
GetTextPath(char[], int, int, float, float, Path)
Return the path (outline) for the specified text.
GetTextPath(string, int, int, float, float, Path)
Return the path (outline) for the specified text.
GetTextWidths(string, float[]) : int
Return the advance widths for the characters in the string.
GetTextWidths(Java.Lang.ICharSequence, int, int, float[]) : int
Return the advance widths for the characters in the string.
GetTextWidths(char[], int, int, float[]) : int
Return the advance widths for the characters in the string.
GetTextWidths(string, int, int, float[]) : int
Return the advance widths for the characters in the string.
MeasureText(string) : float
Return the width of the text.
MeasureText(Java.Lang.ICharSequence, int, int) : float
Return the width of the text.
MeasureText(char[], int, int) : float
Return the width of the text.
MeasureText(string, int, int) : float
Return the width of the text.
Reset()
Restores the paint to its default settings.
Set(Paint)
Copy the fields from src into this paint.
SetARGB(int, int, int, int)
Helper to setColor(), that takes a,r,g,b and constructs the color int
SetColorFilter(ColorFilter) : ColorFilter
Set or clear the paint's colorfilter, returning the parameter.
SetMaskFilter(MaskFilter) : MaskFilter
Set or clear the maskfilter object.
SetPathEffect(PathEffect) : PathEffect
Set or clear the patheffect object.
SetRasterizer(Rasterizer) : Rasterizer
Set or clear the rasterizer object.
SetShader(Shader) : Shader
Set or clear the shader object.
SetShadowLayer(float, float, float, Color)
This draws a shadow layer below the main layer, with the specified offset and color, and blur radius.
SetStyle(Paint.Style)
Set the paint's style, used for controlling how primitives' geometries are interpreted (except for drawBitmap, which always assumes Fill).
SetTypeface(Typeface) : Typeface
Set or clear the typeface object.
SetXfermode(Xfermode) : Xfermode
Set or clear the xfermode object.