Package org.robolectric.shadows
Class ShadowPaint
java.lang.Object
org.robolectric.shadows.ShadowPaint
@Implements(value=android.graphics.Paint.class,
looseSignatures=true)
public class ShadowPaint
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
__constructor__
(Paint otherPaint) protected int
getAlpha()
getCap()
protected int
getColor()
protected ColorFilter
protected int
getFlags()
protected int
getJoin()
protected float
protected PathEffect
protected Shader
int
float
float
float
protected Paint.Cap
protected Paint.Join
protected float
protected Paint.Style
getStyle()
protected Paint.Align
protected float
protected float
protected float
protected Typeface
float
getWidth()
protected float
protected final boolean
protected final boolean
isDither()
protected final boolean
protected float
measureText
(char[] text, int index, int count) protected float
measureText
(CharSequence text, int start, int end) protected float
measureText
(String text) protected float
measureText
(String text, int start, int end) protected int
native_breakText
(char[] text, int index, int count, float maxWidth, float[] measuredWidth) protected int
native_breakText
(char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
native_breakText
(long native_object, long native_typeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
native_breakText
(long native_object, long native_typeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected int
native_breakText
(String text, boolean measureForwards, float maxWidth, float[] measuredWidth) protected int
native_breakText
(String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static float
native_getRunAdvance
(long nativeObject, long nativeTypeface, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static float
native_getTextRunAdvances
(int nativeObject, char[] text, int index, int count, int contextIndex, int contextCount, int flags, float[] advances, int advancesIndex) protected static float
native_getTextRunAdvances
(int nativeObject, char[] text, int index, int count, int contextIndex, int contextCount, int flags, float[] advances, int advancesIndex, int reserved) protected static float
native_getTextRunAdvances
(int nativeObject, String text, int start, int end, int contextStart, int contextEnd, int flags, float[] advances, int advancesIndex) protected static float
native_getTextRunAdvances
(int nativeObject, String text, int start, int end, int contextStart, int contextEnd, int flags, float[] advances, int advancesIndex, int reserved) protected static float
native_getTextRunAdvances
(long nativeObject, long nativeTypeface, char[] text, int index, int count, int contextIndex, int contextCount, boolean isRtl, float[] advances, int advancesIndex) protected static float
native_getTextRunAdvances
(long nativeObject, long nativeTypeface, String text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float[] advances, int advancesIndex) protected static int
nBreakText
(long nObject, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
nBreakText
(long nObject, long nTypeface, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
nBreakText
(long nObject, long nTypeface, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
nBreakText
(long nObject, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) protected static int
nGetFontMetricsInt
(long nativePaint, long nativeTypeface, Paint.FontMetricsInt fmi) protected static int
nGetFontMetricsInt
(long paintPtr, Paint.FontMetricsInt fmi) protected static int
nGetFontMetricsInt
(long paintPtr, Paint.FontMetricsInt fmi, boolean useLocale) protected int
nGetFontMetricsInt
(Object nativePaint, Object nativeTypeface, Object fmi) protected static float
nGetRunAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static float
nGetRunAdvance
(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) protected static float
nGetRunCharacterAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex) protected static float
nGetRunCharacterAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex, RectF drawingBounds) protected static long
nInit()
protected void
setAlpha
(int alpha) protected void
setAntiAlias
(boolean antiAlias) protected void
setColor
(int color) protected ColorFilter
setColorFilter
(ColorFilter filter) protected void
setDither
(boolean dither) protected final void
setFilterBitmap
(boolean filterBitmap) protected void
setFlags
(int flags) protected void
setLetterSpacing
(float letterSpacing) protected PathEffect
setPathEffect
(PathEffect effect) protected Shader
protected void
setShadowLayer
(float radius, float dx, float dy, int color) protected void
setStrikeThruText
(boolean strikeThruText) protected void
setStrokeCap
(Paint.Cap cap) protected void
setStrokeJoin
(Paint.Join join) protected void
setStrokeWidth
(float width) protected void
setStyle
(Paint.Style style) protected void
setTextAlign
(Paint.Align align) protected void
setTextScaleX
(float scaleX) protected void
setTextSize
(float textSize) protected void
setTextSkewX
(float skewX) protected Typeface
setTypeface
(Typeface typeface) protected void
setUnderlineText
(boolean underlineText) protected void
setWordSpacing
(float wordSpacing)
-
Constructor Details
-
ShadowPaint
public ShadowPaint()
-
-
Method Details
-
__constructor__
-
nInit
-
getFlags
-
setFlags
-
setUnderlineText
-
setStrikeThruText
-
setShader
-
getAlpha
-
setAlpha
-
getShader
-
setColor
-
getColor
-
setStyle
-
getStyle
-
setStrokeCap
-
getStrokeCap
-
setStrokeJoin
-
getStrokeJoin
-
setStrokeWidth
-
getStrokeWidth
-
setShadowLayer
-
getTypeface
-
setTypeface
-
getTextSize
-
setTextSize
-
getTextScaleX
-
setTextScaleX
-
getTextSkewX
-
setTextSkewX
-
getLetterSpacing
-
setLetterSpacing
-
getWordSpacing
-
setWordSpacing
-
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
-
setDither
-
isDither
-
isAntiAlias
-
isFilterBitmap
-
setFilterBitmap
-
getPathEffect
-
setPathEffect
-
measureText
-
measureText
-
measureText
-
measureText
-
native_breakText
@Implementation(maxSdk=17) protected int native_breakText(char[] text, int index, int count, float maxWidth, float[] measuredWidth) -
native_breakText
@Implementation(minSdk=18, maxSdk=20) protected int native_breakText(char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
native_breakText
@Implementation(minSdk=21, 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=17) protected int native_breakText(String text, boolean measureForwards, float maxWidth, float[] measuredWidth) -
native_breakText
@Implementation(minSdk=18, maxSdk=20) protected int native_breakText(String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
native_breakText
@Implementation(minSdk=21, 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
-
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
@Implementation(minSdk=35) protected static float nGetRunCharacterAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex, RectF drawingBounds) -
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) -
native_getTextRunAdvances
@Implementation(minSdk=20, maxSdk=22) protected static float native_getTextRunAdvances(long nativeObject, long nativeTypeface, char[] text, int index, int count, int contextIndex, int contextCount, boolean isRtl, float[] advances, int advancesIndex) -
native_getTextRunAdvances
@Implementation(minSdk=20, maxSdk=22) protected static float native_getTextRunAdvances(long nativeObject, long nativeTypeface, String text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float[] advances, int advancesIndex) -
native_getTextRunAdvances
@Implementation(minSdk=18, maxSdk=19) protected static float native_getTextRunAdvances(int nativeObject, char[] text, int index, int count, int contextIndex, int contextCount, int flags, float[] advances, int advancesIndex) -
native_getTextRunAdvances
@Implementation(minSdk=18, maxSdk=19) protected static float native_getTextRunAdvances(int nativeObject, String text, int start, int end, int contextStart, int contextEnd, int flags, float[] advances, int advancesIndex) -
native_getTextRunAdvances
@Implementation(maxSdk=17) protected static float native_getTextRunAdvances(int nativeObject, char[] text, int index, int count, int contextIndex, int contextCount, int flags, float[] advances, int advancesIndex, int reserved) -
native_getTextRunAdvances
@Implementation(maxSdk=17) protected static float native_getTextRunAdvances(int nativeObject, String text, int start, int end, int contextStart, int contextEnd, int flags, float[] advances, int advancesIndex, int reserved)
-