Package org.robolectric.shadows
Class ShadowPaint
java.lang.Object
org.robolectric.shadows.ShadowPaint
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void__constructor__(Paint otherPaint) protected intgetAlpha()getCap()protected intgetColor()protected ColorFilterprotected intgetFlags()protected intgetJoin()protected floatprotected PathEffectprotected Shaderintfloatfloatfloatprotected Paint.Capprotected Paint.Joinprotected floatprotected Paint.StylegetStyle()protected Paint.Alignprotected floatprotected floatprotected floatprotected TypefacefloatgetWidth()protected floatprotected booleanprotected booleanisDither()protected booleanprotected floatmeasureText(char[] text, int index, int count) protected floatmeasureText(CharSequence text, int start, int end) protected floatmeasureText(String text) protected floatmeasureText(String text, int start, int end) protected static intnative_breakText(long native_object, long native_typeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static intnative_breakText(long native_object, long native_typeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static floatnative_getRunAdvance(long nativeObject, long nativeTypeface, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static intnBreakText(long nObject, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static intnBreakText(long nObject, long nTypeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static intnBreakText(long nObject, long nTypeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static intnBreakText(long nObject, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static intnGetFontMetricsInt(long nativePaint, long nativeTypeface, Paint.FontMetricsInt fmi) protected intnGetFontMetricsInt(long nativePaint, long nativeTypeface, Object fmi) protected static intnGetFontMetricsInt(long paintPtr, Paint.FontMetricsInt fmi) protected static intnGetFontMetricsInt(long paintPtr, Paint.FontMetricsInt fmi, boolean useLocale) protected static floatnGetRunAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static floatnGetRunAdvance(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static floatnGetRunCharacterAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex) protected static floatnGetRunCharacterAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex, RectF drawingBounds, Object runInfo) protected static longnInit()protected voidsetAlpha(int alpha) protected voidsetAntiAlias(boolean antiAlias) protected voidsetColor(int color) protected ColorFiltersetColorFilter(ColorFilter filter) protected voidsetDither(boolean dither) protected voidsetFilterBitmap(boolean filterBitmap) protected voidsetFlags(int flags) protected voidsetLetterSpacing(float letterSpacing) protected PathEffectsetPathEffect(PathEffect effect) protected Shaderprotected voidsetShadowLayer(float radius, float dx, float dy, int color) protected voidsetStrikeThruText(boolean strikeThruText) protected voidsetStrokeCap(Paint.Cap cap) protected voidsetStrokeJoin(Paint.Join join) protected voidsetStrokeWidth(float width) protected voidsetStyle(Paint.Style style) protected voidsetTextAlign(Paint.Align align) protected voidsetTextScaleX(float scaleX) protected voidsetTextSize(float textSize) protected voidsetTextSkewX(float skewX) protected TypefacesetTypeface(Typeface typeface) protected TypefacesetTypefaceWithoutWarning(Typeface typeface) protected voidsetUnderlineText(boolean underlineText) protected voidsetWordSpacing(float wordSpacing)
-
Constructor Details
-
ShadowPaint
public ShadowPaint()
-
-
Method Details
-
__constructor__
-
nInit
@Implementation(minSdk=24) protected static long nInit() -
getFlags
@Implementation protected int getFlags() -
setFlags
@Implementation protected void setFlags(int flags) -
setUnderlineText
@Implementation protected void setUnderlineText(boolean underlineText) -
setStrikeThruText
@Implementation protected void setStrikeThruText(boolean strikeThruText) -
setShader
-
getAlpha
@Implementation protected int getAlpha() -
setAlpha
@Implementation protected void setAlpha(int alpha) -
getShader
-
setColor
@Implementation protected void setColor(int color) -
getColor
@Implementation protected int getColor() -
setStyle
-
getStyle
-
setStrokeCap
-
getStrokeCap
-
setStrokeJoin
-
getStrokeJoin
-
setStrokeWidth
@Implementation protected void setStrokeWidth(float width) -
getStrokeWidth
@Implementation protected float getStrokeWidth() -
setShadowLayer
@Implementation protected void setShadowLayer(float radius, float dx, float dy, int color) -
getTypeface
-
setTypeface
-
setTypefaceWithoutWarning
-
getTextSize
@Implementation protected float getTextSize() -
setTextSize
@Implementation protected void setTextSize(float textSize) -
getTextScaleX
@Implementation protected float getTextScaleX() -
setTextScaleX
@Implementation protected void setTextScaleX(float scaleX) -
getTextSkewX
@Implementation protected float getTextSkewX() -
setTextSkewX
@Implementation protected void setTextSkewX(float skewX) -
getLetterSpacing
@Implementation protected float getLetterSpacing() -
setLetterSpacing
@Implementation protected void setLetterSpacing(float letterSpacing) -
getWordSpacing
@Implementation(minSdk=29) protected float getWordSpacing() -
setWordSpacing
@Implementation(minSdk=29) protected void setWordSpacing(float wordSpacing) -
setTextAlign
-
getTextAlign
-
getShadowRadius
public float getShadowRadius()- Returns:
- shadow radius (Paint related shadow, not Robolectric Shadow)
-
getShadowDx
public float getShadowDx()- Returns:
- shadow Dx (Paint related shadow, not Robolectric Shadow)
-
getShadowDy
public float getShadowDy()- Returns:
- shadow Dx (Paint related shadow, not Robolectric Shadow)
-
getShadowColor
public int getShadowColor()- Returns:
- shadow color (Paint related shadow, not Robolectric Shadow)
-
getCap
-
getJoin
-
getWidth
public float getWidth() -
getColorFilter
-
setColorFilter
-
setAntiAlias
@Implementation protected void setAntiAlias(boolean antiAlias) -
setDither
@Implementation protected void setDither(boolean dither) -
isDither
@Implementation protected boolean isDither() -
isAntiAlias
@Implementation protected boolean isAntiAlias() -
isFilterBitmap
@Implementation protected boolean isFilterBitmap() -
setFilterBitmap
@Implementation protected void setFilterBitmap(boolean filterBitmap) -
getPathEffect
-
setPathEffect
-
measureText
-
measureText
-
measureText
-
measureText
@Implementation protected float measureText(char[] text, int index, int count) -
native_breakText
@Implementation(maxSdk=23) protected static int native_breakText(long native_object, long native_typeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
@Implementation(minSdk=24, maxSdk=27) protected static int nBreakText(long nObject, long nTypeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
@Implementation(minSdk=28) protected static int nBreakText(long nObject, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
native_breakText
@Implementation(maxSdk=23) protected static int native_breakText(long native_object, long native_typeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
@Implementation(minSdk=24, maxSdk=27) protected static int nBreakText(long nObject, long nTypeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
@Implementation(minSdk=28) protected static int nBreakText(long nObject, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
nGetFontMetricsInt
@Implementation(minSdk=35) protected static int nGetFontMetricsInt(long paintPtr, Paint.FontMetricsInt fmi, boolean useLocale) -
nGetFontMetricsInt
@Implementation(minSdk=28, maxSdk=34) protected static int nGetFontMetricsInt(long paintPtr, Paint.FontMetricsInt fmi) -
nGetFontMetricsInt
@Implementation(minSdk=26, maxSdk=27) protected static int nGetFontMetricsInt(long nativePaint, long nativeTypeface, Paint.FontMetricsInt fmi) -
nGetFontMetricsInt
@Implementation(minSdk=24, maxSdk=25) protected int nGetFontMetricsInt(long nativePaint, long nativeTypeface, Object fmi) -
getFontMetricsInt
-
nGetRunAdvance
@Implementation(minSdk=28) protected static float nGetRunAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) -
nGetRunCharacterAdvance
@Implementation(minSdk=34, maxSdk=34) protected static float nGetRunCharacterAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex) -
nGetRunCharacterAdvance
-
nGetRunAdvance
@Implementation(minSdk=24, maxSdk=27) protected static float nGetRunAdvance(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) -
native_getRunAdvance
@Implementation(minSdk=23, maxSdk=23) protected static float native_getRunAdvance(long nativeObject, long nativeTypeface, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset)
-