Package org.robolectric.nativeruntime
Class PaintNatives
java.lang.Object
org.robolectric.nativeruntime.PaintNatives
Native methods for Paint JNI registration.
Native method signatures are derived from https://cs.android.com/android/platform/superproject/+/android-12.0.0_r1:frameworks/base/graphics/java/android/graphics/Paint.java
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic float
nAscent
(long paintPtr) static float
nAscent
(long paintPtr, long typefacePtr) static int
nBreakText
(long nObject, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) static int
nBreakText
(long nObject, long typefacePtr, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) static int
nBreakText
(long nObject, long typefacePtr, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) static int
nBreakText
(long nObject, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) static float
nDescent
(long paintPtr) static float
nDescent
(long paintPtr, long typefacePtr) static boolean
nEqualsForTextMeasurement
(long leftPaintPtr, long rightPaintPtr) static int
nGetAlpha
(long paintPtr) static void
nGetCharArrayBounds
(long nativePaint, char[] text, int index, int count, int bidiFlags, Rect bounds) static void
nGetCharArrayBounds
(long nativePaint, long typefacePtr, char[] text, int index, int count, int bidiFlags, Rect bounds) static int
nGetColor
(long paintPtr) static int
nGetElegantTextHeight
(long paintPtr) static int
nGetEndHyphenEdit
(long paintPtr) static boolean
nGetFillPath
(long paintPtr, long src, long dst) static int
nGetFlags
(long paintPtr) static float
nGetFontMetrics
(long paintPtr, long typefacePtr, Paint.FontMetrics metrics) static float
nGetFontMetrics
(long paintPtr, Paint.FontMetrics metrics) static int
nGetFontMetricsInt
(long paintPtr, long typefacePtr, Paint.FontMetricsInt fmi) static int
nGetFontMetricsInt
(long paintPtr, Paint.FontMetricsInt fmi) static void
nGetFontMetricsIntForText
(long paintPtr, char[] text, int start, int count, int ctxStart, int ctxCount, boolean isRtl, Paint.FontMetricsInt outMetrics) static void
nGetFontMetricsIntForText
(long paintPtr, String text, int start, int count, int ctxStart, int ctxCount, boolean isRtl, Paint.FontMetricsInt outMetrics) static int
nGetHinting
(long paintPtr) static float
nGetLetterSpacing
(long paintPtr) static long
static int
nGetOffsetForAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance) static int
nGetOffsetForAdvance
(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance) static float
nGetRunAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) static float
nGetRunAdvance
(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) static float
nGetRunCharacterAdvance
(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex) static int
nGetStartHyphenEdit
(long paintPtr) static float
nGetStrikeThruPosition
(long paintPtr) static float
nGetStrikeThruThickness
(long paintPtr) static void
nGetStringBounds
(long nativePaint, long typefacePtr, String text, int start, int end, int bidiFlags, Rect bounds) static void
nGetStringBounds
(long nativePaint, String text, int start, int end, int bidiFlags, Rect bounds) static int
nGetStrokeCap
(long paintPtr) static int
nGetStrokeJoin
(long paintPtr) static float
nGetStrokeMiter
(long paintPtr) static float
nGetStrokeWidth
(long paintPtr) static int
nGetStyle
(long paintPtr) static float
nGetTextAdvances
(long paintPtr, char[] text, int index, int count, int contextIndex, int contextCount, int bidiFlags, float[] advances, int advancesIndex) static float
nGetTextAdvances
(long paintPtr, long typefacePtr, char[] text, int index, int count, int contextIndex, int contextCount, int bidiFlags, float[] advances, int advancesIndex) static float
nGetTextAdvances
(long paintPtr, long typefacePtr, String text, int start, int end, int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex) static float
nGetTextAdvances
(long paintPtr, String text, int start, int end, int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex) static int
nGetTextAlign
(long paintPtr) static void
nGetTextPath
(long paintPtr, int bidiFlags, char[] text, int index, int count, float x, float y, long path) static void
nGetTextPath
(long paintPtr, int bidiFlags, String text, int start, int end, float x, float y, long path) static void
nGetTextPath
(long paintPtr, long typefacePtr, int bidiFlags, char[] text, int index, int count, float x, float y, long path) static void
nGetTextPath
(long paintPtr, long typefacePtr, int bidiFlags, String text, int start, int end, float x, float y, long path) int
nGetTextRunCursor
(long paintPtr, char[] text, int contextStart, int contextLength, int dir, int offset, int cursorOpt) int
nGetTextRunCursor
(long paintPtr, long typefacePtr, char[] text, int contextStart, int contextLength, int dir, int offset, int cursorOpt) int
nGetTextRunCursor
(long paintPtr, long typefacePtr, String text, int contextStart, int contextEnd, int dir, int offset, int cursorOpt) int
nGetTextRunCursor
(long paintPtr, String text, int contextStart, int contextEnd, int dir, int offset, int cursorOpt) static float
nGetTextScaleX
(long paintPtr) static float
nGetTextSize
(long paintPtr) static float
nGetTextSkewX
(long paintPtr) static float
nGetUnderlinePosition
(long paintPtr) static float
nGetUnderlineThickness
(long paintPtr) static float
nGetWordSpacing
(long paintPtr) static boolean
static boolean
static boolean
nHasShadowLayer
(long paintPtr) static long
nInit()
static long
nInitWithPaint
(long paint) static boolean
nIsElegantTextHeight
(long paintPtr) static void
nReset
(long paintPtr) static void
nSet
(long paintPtrDest, long paintPtrSrc) static void
nSetAlpha
(long paintPtr, int a) static void
nSetAntiAlias
(long paintPtr, boolean aa) static void
nSetColor
(long paintPtr, int color) static void
nSetColor
(long paintPtr, long colorSpaceHandle, long color) static long
nSetColorFilter
(long paintPtr, long filter) static void
nSetDither
(long paintPtr, boolean dither) static void
nSetElegantTextHeight
(long paintPtr, int value) static void
nSetEndHyphenEdit
(long paintPtr, int hyphen) static void
nSetFakeBoldText
(long paintPtr, boolean fakeBoldText) static void
nSetFilterBitmap
(long paintPtr, boolean filter) static void
nSetFlags
(long paintPtr, int flags) static void
nSetFontFeatureSettings
(long paintPtr, String settings) static void
nSetHinting
(long paintPtr, int mode) static void
nSetLetterSpacing
(long paintPtr, float letterSpacing) static void
nSetLinearText
(long paintPtr, boolean linearText) static long
nSetMaskFilter
(long paintPtr, long maskfilter) static long
nSetPathEffect
(long paintPtr, long effect) static long
nSetShader
(long paintPtr, long shader) static void
nSetShadowLayer
(long paintPtr, float radius, float dx, float dy, int shadowColor) static void
nSetShadowLayer
(long paintPtr, float radius, float dx, float dy, long colorSpaceHandle, long shadowColor) static void
nSetStartHyphenEdit
(long paintPtr, int hyphen) static void
nSetStrikeThruText
(long paintPtr, boolean strikeThruText) static void
nSetStrokeCap
(long paintPtr, int cap) static void
nSetStrokeJoin
(long paintPtr, int join) static void
nSetStrokeMiter
(long paintPtr, float miter) static void
nSetStrokeWidth
(long paintPtr, float width) static void
nSetStyle
(long paintPtr, int style) static void
nSetSubpixelText
(long paintPtr, boolean subpixelText) static void
nSetTextAlign
(long paintPtr, int align) static int
nSetTextLocales
(long paintPtr, String locales) static void
nSetTextLocalesByMinikinLocaleListId
(long paintPtr, int mMinikinLocaleListId) static void
nSetTextScaleX
(long paintPtr, float scaleX) static void
nSetTextSize
(long paintPtr, float textSize) static void
nSetTextSkewX
(long paintPtr, float skewX) static void
nSetTypeface
(long paintPtr, long typeface) static void
nSetUnderlineText
(long paintPtr, boolean underlineText) static void
nSetWordSpacing
(long paintPtr, float wordSpacing) static void
nSetXfermode
(long paintPtr, int xfermode)
-
Constructor Details
-
PaintNatives
public PaintNatives()
-
-
Method Details
-
nGetNativeFinalizer
public static long nGetNativeFinalizer() -
nInit
public static long nInit() -
nInitWithPaint
public static long nInitWithPaint(long paint) -
nBreakText
public static int nBreakText(long nObject, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
public static int nBreakText(long nObject, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
public static int nBreakText(long nObject, long typefacePtr, char[] text, int index, int count, float maxWidth, int bidiFlags, float[] measuredWidth) -
nBreakText
public static int nBreakText(long nObject, long typefacePtr, String text, boolean measureForwards, float maxWidth, int bidiFlags, float[] measuredWidth) -
nGetColor
public static int nGetColor(long paintPtr) -
nGetAlpha
public static int nGetAlpha(long paintPtr) -
nGetTextAdvances
public static float nGetTextAdvances(long paintPtr, long typefacePtr, char[] text, int index, int count, int contextIndex, int contextCount, int bidiFlags, float[] advances, int advancesIndex) -
nGetTextAdvances
public static float nGetTextAdvances(long paintPtr, long typefacePtr, String text, int start, int end, int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex) -
nGetTextAdvances
public static float nGetTextAdvances(long paintPtr, char[] text, int index, int count, int contextIndex, int contextCount, int bidiFlags, float[] advances, int advancesIndex) -
nGetTextAdvances
public static float nGetTextAdvances(long paintPtr, String text, int start, int end, int contextStart, int contextEnd, int bidiFlags, float[] advances, int advancesIndex) -
nGetTextRunCursor
public int nGetTextRunCursor(long paintPtr, char[] text, int contextStart, int contextLength, int dir, int offset, int cursorOpt) -
nGetTextRunCursor
public int nGetTextRunCursor(long paintPtr, String text, int contextStart, int contextEnd, int dir, int offset, int cursorOpt) -
nGetTextRunCursor
public int nGetTextRunCursor(long paintPtr, long typefacePtr, char[] text, int contextStart, int contextLength, int dir, int offset, int cursorOpt) -
nGetTextRunCursor
public int nGetTextRunCursor(long paintPtr, long typefacePtr, String text, int contextStart, int contextEnd, int dir, int offset, int cursorOpt) -
nGetTextPath
public static void nGetTextPath(long paintPtr, int bidiFlags, char[] text, int index, int count, float x, float y, long path) -
nGetTextPath
public static void nGetTextPath(long paintPtr, int bidiFlags, String text, int start, int end, float x, float y, long path) -
nGetTextPath
public static void nGetTextPath(long paintPtr, long typefacePtr, int bidiFlags, char[] text, int index, int count, float x, float y, long path) -
nGetTextPath
public static void nGetTextPath(long paintPtr, long typefacePtr, int bidiFlags, String text, int start, int end, float x, float y, long path) -
nGetStringBounds
-
nGetStringBounds
-
nGetCharArrayBounds
public static void nGetCharArrayBounds(long nativePaint, char[] text, int index, int count, int bidiFlags, Rect bounds) -
nGetCharArrayBounds
public static void nGetCharArrayBounds(long nativePaint, long typefacePtr, char[] text, int index, int count, int bidiFlags, Rect bounds) -
nHasGlyph
-
nHasGlyph
-
nGetRunAdvance
public static float nGetRunAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) -
nGetRunAdvance
public static float nGetRunAdvance(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset) -
nGetOffsetForAdvance
public static int nGetOffsetForAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance) -
nGetOffsetForAdvance
public static int nGetOffsetForAdvance(long paintPtr, long typefacePtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, float advance) -
nSetTextLocales
-
nSetFontFeatureSettings
-
nGetFontMetrics
-
nGetFontMetrics
-
nGetFontMetricsInt
-
nGetFontMetricsInt
-
nReset
public static void nReset(long paintPtr) -
nSet
public static void nSet(long paintPtrDest, long paintPtrSrc) -
nGetStyle
public static int nGetStyle(long paintPtr) -
nSetStyle
public static void nSetStyle(long paintPtr, int style) -
nGetStrokeCap
public static int nGetStrokeCap(long paintPtr) -
nSetStrokeCap
public static void nSetStrokeCap(long paintPtr, int cap) -
nGetStrokeJoin
public static int nGetStrokeJoin(long paintPtr) -
nSetStrokeJoin
public static void nSetStrokeJoin(long paintPtr, int join) -
nGetFillPath
public static boolean nGetFillPath(long paintPtr, long src, long dst) -
nSetShader
public static long nSetShader(long paintPtr, long shader) -
nSetColorFilter
public static long nSetColorFilter(long paintPtr, long filter) -
nSetXfermode
public static void nSetXfermode(long paintPtr, int xfermode) -
nSetPathEffect
public static long nSetPathEffect(long paintPtr, long effect) -
nSetMaskFilter
public static long nSetMaskFilter(long paintPtr, long maskfilter) -
nSetTypeface
public static void nSetTypeface(long paintPtr, long typeface) -
nGetTextAlign
public static int nGetTextAlign(long paintPtr) -
nSetTextAlign
public static void nSetTextAlign(long paintPtr, int align) -
nSetTextLocalesByMinikinLocaleListId
public static void nSetTextLocalesByMinikinLocaleListId(long paintPtr, int mMinikinLocaleListId) -
nSetShadowLayer
public static void nSetShadowLayer(long paintPtr, float radius, float dx, float dy, long colorSpaceHandle, long shadowColor) -
nSetShadowLayer
public static void nSetShadowLayer(long paintPtr, float radius, float dx, float dy, int shadowColor) -
nHasShadowLayer
public static boolean nHasShadowLayer(long paintPtr) -
nGetLetterSpacing
public static float nGetLetterSpacing(long paintPtr) -
nSetLetterSpacing
public static void nSetLetterSpacing(long paintPtr, float letterSpacing) -
nGetWordSpacing
public static float nGetWordSpacing(long paintPtr) -
nSetWordSpacing
public static void nSetWordSpacing(long paintPtr, float wordSpacing) -
nGetStartHyphenEdit
public static int nGetStartHyphenEdit(long paintPtr) -
nGetEndHyphenEdit
public static int nGetEndHyphenEdit(long paintPtr) -
nSetStartHyphenEdit
public static void nSetStartHyphenEdit(long paintPtr, int hyphen) -
nSetEndHyphenEdit
public static void nSetEndHyphenEdit(long paintPtr, int hyphen) -
nSetStrokeMiter
public static void nSetStrokeMiter(long paintPtr, float miter) -
nGetStrokeMiter
public static float nGetStrokeMiter(long paintPtr) -
nSetStrokeWidth
public static void nSetStrokeWidth(long paintPtr, float width) -
nGetStrokeWidth
public static float nGetStrokeWidth(long paintPtr) -
nSetAlpha
public static void nSetAlpha(long paintPtr, int a) -
nSetDither
public static void nSetDither(long paintPtr, boolean dither) -
nGetFlags
public static int nGetFlags(long paintPtr) -
nSetFlags
public static void nSetFlags(long paintPtr, int flags) -
nGetHinting
public static int nGetHinting(long paintPtr) -
nSetHinting
public static void nSetHinting(long paintPtr, int mode) -
nSetAntiAlias
public static void nSetAntiAlias(long paintPtr, boolean aa) -
nSetLinearText
public static void nSetLinearText(long paintPtr, boolean linearText) -
nSetSubpixelText
public static void nSetSubpixelText(long paintPtr, boolean subpixelText) -
nSetUnderlineText
public static void nSetUnderlineText(long paintPtr, boolean underlineText) -
nSetFakeBoldText
public static void nSetFakeBoldText(long paintPtr, boolean fakeBoldText) -
nSetFilterBitmap
public static void nSetFilterBitmap(long paintPtr, boolean filter) -
nSetColor
public static void nSetColor(long paintPtr, long colorSpaceHandle, long color) -
nSetColor
public static void nSetColor(long paintPtr, int color) -
nSetStrikeThruText
public static void nSetStrikeThruText(long paintPtr, boolean strikeThruText) -
nIsElegantTextHeight
public static boolean nIsElegantTextHeight(long paintPtr) -
nGetElegantTextHeight
public static int nGetElegantTextHeight(long paintPtr) -
nSetElegantTextHeight
public static void nSetElegantTextHeight(long paintPtr, int value) -
nGetTextSize
public static float nGetTextSize(long paintPtr) -
nGetTextScaleX
public static float nGetTextScaleX(long paintPtr) -
nSetTextScaleX
public static void nSetTextScaleX(long paintPtr, float scaleX) -
nGetTextSkewX
public static float nGetTextSkewX(long paintPtr) -
nSetTextSkewX
public static void nSetTextSkewX(long paintPtr, float skewX) -
nAscent
public static float nAscent(long paintPtr) -
nAscent
public static float nAscent(long paintPtr, long typefacePtr) -
nDescent
public static float nDescent(long paintPtr) -
nDescent
public static float nDescent(long paintPtr, long typefacePtr) -
nGetUnderlinePosition
public static float nGetUnderlinePosition(long paintPtr) -
nGetUnderlineThickness
public static float nGetUnderlineThickness(long paintPtr) -
nGetStrikeThruPosition
public static float nGetStrikeThruPosition(long paintPtr) -
nGetStrikeThruThickness
public static float nGetStrikeThruThickness(long paintPtr) -
nSetTextSize
public static void nSetTextSize(long paintPtr, float textSize) -
nEqualsForTextMeasurement
public static boolean nEqualsForTextMeasurement(long leftPaintPtr, long rightPaintPtr) -
nGetFontMetricsIntForText
public static void nGetFontMetricsIntForText(long paintPtr, char[] text, int start, int count, int ctxStart, int ctxCount, boolean isRtl, Paint.FontMetricsInt outMetrics) -
nGetFontMetricsIntForText
public static void nGetFontMetricsIntForText(long paintPtr, String text, int start, int count, int ctxStart, int ctxCount, boolean isRtl, Paint.FontMetricsInt outMetrics) -
nGetRunCharacterAdvance
public static float nGetRunCharacterAdvance(long paintPtr, char[] text, int start, int end, int contextStart, int contextEnd, boolean isRtl, int offset, float[] advances, int advancesIndex)
-