Class PaintNatives

java.lang.Object
org.robolectric.nativeruntime.PaintNatives

public final class PaintNatives extends Object
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 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

      public static void nGetStringBounds(long nativePaint, String text, int start, int end, int bidiFlags, Rect bounds)
    • nGetStringBounds

      public static void nGetStringBounds(long nativePaint, long typefacePtr, String text, int start, int end, int bidiFlags, Rect bounds)
    • 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

      public static boolean nHasGlyph(long paintPtr, int bidiFlags, String string)
    • nHasGlyph

      public static boolean nHasGlyph(long paintPtr, long typefacePtr, int bidiFlags, String string)
    • 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

      public static int nSetTextLocales(long paintPtr, String locales)
    • nSetFontFeatureSettings

      public static void nSetFontFeatureSettings(long paintPtr, String settings)
    • nGetFontMetrics

      public static float nGetFontMetrics(long paintPtr, Paint.FontMetrics metrics)
    • nGetFontMetrics

      public static float nGetFontMetrics(long paintPtr, long typefacePtr, Paint.FontMetrics metrics)
    • nGetFontMetricsInt

      public static int nGetFontMetricsInt(long paintPtr, Paint.FontMetricsInt fmi)
    • nGetFontMetricsInt

      public static int nGetFontMetricsInt(long paintPtr, long typefacePtr, Paint.FontMetricsInt fmi)
    • 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)