Class BaseCanvasNatives

java.lang.Object
org.robolectric.nativeruntime.BaseCanvasNatives

public final class BaseCanvasNatives extends Object
Native methods for BaseCanvas 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/BaseCanvas.java

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    nDrawArc(long nativeCanvas, float left, float top, float right, float bottom, float startAngle, float sweep, boolean useCenter, long nativePaint)
     
    static void
    nDrawBitmap(long nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, long nativePaintOrZero)
     
    static void
    nDrawBitmap(long nativeCanvas, long bitmapHandle, float srcLeft, float srcTop, float srcRight, float srcBottom, float dstLeft, float dstTop, float dstRight, float dstBottom, long nativePaintOrZero, int screenDensity, int bitmapDensity)
     
    static void
    nDrawBitmap(long nativeCanvas, long bitmapHandle, float left, float top, long nativePaintOrZero, int canvasDensity, int screenDensity, int bitmapDensity)
     
    static void
    nDrawBitmapMatrix(long nativeCanvas, long bitmapHandle, long nativeMatrix, long nativePaint)
     
    static void
    nDrawBitmapMesh(long nativeCanvas, long bitmapHandle, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long nativePaint)
     
    static void
    nDrawCircle(long nativeCanvas, float cx, float cy, float radius, long nativePaint)
     
    static void
    nDrawColor(long nativeCanvas, int color, int mode)
     
    static void
    nDrawColor(long nativeCanvas, long nativeColorSpace, long color, int mode)
     
    static void
    nDrawDoubleRoundRect(long nativeCanvas, float outerLeft, float outerTop, float outerRight, float outerBottom, float[] outerRadii, float innerLeft, float innerTop, float innerRight, float innerBottom, float[] innerRadii, long nativePaint)
     
    static void
    nDrawDoubleRoundRect(long nativeCanvas, float outerLeft, float outerTop, float outerRight, float outerBottom, float outerRx, float outerRy, float innerLeft, float innerTop, float innerRight, float innerBottom, float innerRx, float innerRy, long nativePaint)
     
    static void
    nDrawGlyphs(long nativeCanvas, int[] glyphIds, float[] positions, int glyphIdStart, int positionStart, int glyphCount, long nativeFont, long nativePaint)
     
    static void
    nDrawLine(long nativeCanvas, float startX, float startY, float stopX, float stopY, long nativePaint)
     
    static void
    nDrawLines(long canvasHandle, float[] pts, int offset, int count, long paintHandle)
     
    static void
    nDrawNinePatch(long nativeCanvas, long nativeBitmap, long ninePatch, float dstLeft, float dstTop, float dstRight, float dstBottom, long nativePaintOrZero, int screenDensity, int bitmapDensity)
     
    static void
    nDrawOval(long nativeCanvas, float left, float top, float right, float bottom, long nativePaint)
     
    static void
    nDrawPaint(long nativeCanvas, long nativePaint)
     
    static void
    nDrawPath(long nativeCanvas, long nativePath, long nativePaint)
     
    static void
    nDrawPoint(long canvasHandle, float x, float y, long paintHandle)
     
    static void
    nDrawPoints(long canvasHandle, float[] pts, int offset, int count, long paintHandle)
     
    static void
    nDrawRect(long nativeCanvas, float left, float top, float right, float bottom, long nativePaint)
     
    static void
    nDrawRegion(long nativeCanvas, long nativeRegion, long nativePaint)
     
    static void
    nDrawRoundRect(long nativeCanvas, float left, float top, float right, float bottom, float rx, float ry, long nativePaint)
     
    static void
    nDrawText(long nativeCanvas, char[] text, int index, int count, float x, float y, int flags, long nativePaint)
     
    static void
    nDrawText(long nativeCanvas, char[] text, int index, int count, float x, float y, int flags, long nativePaint, long nativeTypeface)
     
    static void
    nDrawText(long nativeCanvas, String text, int start, int end, float x, float y, int flags, long nativePaint)
     
    static void
    nDrawText(long nativeCanvas, String text, int start, int end, float x, float y, int flags, long nativePaint, long nativeTypeface)
     
    static void
    nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count, long nativePath, float hOffset, float vOffset, int bidiFlags, long nativePaint)
     
    static void
    nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count, long nativePath, float hOffset, float vOffset, int bidiFlags, long nativePaint, long nativeTypeface)
     
    static void
    nDrawTextOnPath(long nativeCanvas, String text, long nativePath, float hOffset, float vOffset, int flags, long nativePaint)
     
    static void
    nDrawTextOnPath(long nativeCanvas, String text, long nativePath, float hOffset, float vOffset, int flags, long nativePaint, long nativeTypeface)
     
    static void
    nDrawTextRun(long nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint, long nativPrecomputedText)
     
    static void
    nDrawTextRun(long nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint)
     
    static void
    nDrawTextRun(long nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
     
    static void
    nDrawTextRunTypeface(long nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
     
    static void
    nDrawVertices(long nativeCanvas, int mode, int n, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, long nativePaint)
     
    static void
    nPunchHole(long renderer, float left, float top, float right, float bottom, float rx, float ry)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • nDrawBitmap

      public static void nDrawBitmap(long nativeCanvas, long bitmapHandle, float left, float top, long nativePaintOrZero, int canvasDensity, int screenDensity, int bitmapDensity)
    • nDrawBitmap

      public static void nDrawBitmap(long nativeCanvas, long bitmapHandle, float srcLeft, float srcTop, float srcRight, float srcBottom, float dstLeft, float dstTop, float dstRight, float dstBottom, long nativePaintOrZero, int screenDensity, int bitmapDensity)
    • nDrawBitmap

      public static void nDrawBitmap(long nativeCanvas, int[] colors, int offset, int stride, float x, float y, int width, int height, boolean hasAlpha, long nativePaintOrZero)
    • nDrawColor

      public static void nDrawColor(long nativeCanvas, int color, int mode)
    • nDrawColor

      public static void nDrawColor(long nativeCanvas, long nativeColorSpace, long color, int mode)
    • nDrawPaint

      public static void nDrawPaint(long nativeCanvas, long nativePaint)
    • nDrawPoint

      public static void nDrawPoint(long canvasHandle, float x, float y, long paintHandle)
    • nDrawPoints

      public static void nDrawPoints(long canvasHandle, float[] pts, int offset, int count, long paintHandle)
    • nDrawLine

      public static void nDrawLine(long nativeCanvas, float startX, float startY, float stopX, float stopY, long nativePaint)
    • nDrawLines

      public static void nDrawLines(long canvasHandle, float[] pts, int offset, int count, long paintHandle)
    • nDrawRect

      public static void nDrawRect(long nativeCanvas, float left, float top, float right, float bottom, long nativePaint)
    • nDrawOval

      public static void nDrawOval(long nativeCanvas, float left, float top, float right, float bottom, long nativePaint)
    • nDrawCircle

      public static void nDrawCircle(long nativeCanvas, float cx, float cy, float radius, long nativePaint)
    • nDrawArc

      public static void nDrawArc(long nativeCanvas, float left, float top, float right, float bottom, float startAngle, float sweep, boolean useCenter, long nativePaint)
    • nDrawRoundRect

      public static void nDrawRoundRect(long nativeCanvas, float left, float top, float right, float bottom, float rx, float ry, long nativePaint)
    • nDrawDoubleRoundRect

      public static void nDrawDoubleRoundRect(long nativeCanvas, float outerLeft, float outerTop, float outerRight, float outerBottom, float outerRx, float outerRy, float innerLeft, float innerTop, float innerRight, float innerBottom, float innerRx, float innerRy, long nativePaint)
    • nDrawDoubleRoundRect

      public static void nDrawDoubleRoundRect(long nativeCanvas, float outerLeft, float outerTop, float outerRight, float outerBottom, float[] outerRadii, float innerLeft, float innerTop, float innerRight, float innerBottom, float[] innerRadii, long nativePaint)
    • nDrawPath

      public static void nDrawPath(long nativeCanvas, long nativePath, long nativePaint)
    • nDrawRegion

      public static void nDrawRegion(long nativeCanvas, long nativeRegion, long nativePaint)
    • nDrawNinePatch

      public static void nDrawNinePatch(long nativeCanvas, long nativeBitmap, long ninePatch, float dstLeft, float dstTop, float dstRight, float dstBottom, long nativePaintOrZero, int screenDensity, int bitmapDensity)
    • nDrawBitmapMatrix

      public static void nDrawBitmapMatrix(long nativeCanvas, long bitmapHandle, long nativeMatrix, long nativePaint)
    • nDrawBitmapMesh

      public static void nDrawBitmapMesh(long nativeCanvas, long bitmapHandle, int meshWidth, int meshHeight, float[] verts, int vertOffset, int[] colors, int colorOffset, long nativePaint)
    • nDrawVertices

      public static void nDrawVertices(long nativeCanvas, int mode, int n, float[] verts, int vertOffset, float[] texs, int texOffset, int[] colors, int colorOffset, short[] indices, int indexOffset, int indexCount, long nativePaint)
    • nDrawGlyphs

      public static void nDrawGlyphs(long nativeCanvas, int[] glyphIds, float[] positions, int glyphIdStart, int positionStart, int glyphCount, long nativeFont, long nativePaint)
    • nDrawText

      public static void nDrawText(long nativeCanvas, char[] text, int index, int count, float x, float y, int flags, long nativePaint)
    • nDrawText

      public static void nDrawText(long nativeCanvas, String text, int start, int end, float x, float y, int flags, long nativePaint)
    • nDrawText

      public static void nDrawText(long nativeCanvas, char[] text, int index, int count, float x, float y, int flags, long nativePaint, long nativeTypeface)
    • nDrawText

      public static void nDrawText(long nativeCanvas, String text, int start, int end, float x, float y, int flags, long nativePaint, long nativeTypeface)
    • nDrawTextRun

      public static void nDrawTextRun(long nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint)
    • nDrawTextRun

      public static void nDrawTextRun(long nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint, long nativPrecomputedText)
    • nDrawTextRun

      public static void nDrawTextRun(long nativeCanvas, String text, int start, int end, int contextStart, int contextEnd, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
    • nDrawTextRunTypeface

      public static void nDrawTextRunTypeface(long nativeCanvas, char[] text, int start, int count, int contextStart, int contextCount, float x, float y, boolean isRtl, long nativePaint, long nativeTypeface)
    • nDrawTextOnPath

      public static void nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count, long nativePath, float hOffset, float vOffset, int bidiFlags, long nativePaint)
    • nDrawTextOnPath

      public static void nDrawTextOnPath(long nativeCanvas, String text, long nativePath, float hOffset, float vOffset, int flags, long nativePaint)
    • nDrawTextOnPath

      public static void nDrawTextOnPath(long nativeCanvas, char[] text, int index, int count, long nativePath, float hOffset, float vOffset, int bidiFlags, long nativePaint, long nativeTypeface)
    • nDrawTextOnPath

      public static void nDrawTextOnPath(long nativeCanvas, String text, long nativePath, float hOffset, float vOffset, int flags, long nativePaint, long nativeTypeface)
    • nPunchHole

      public static void nPunchHole(long renderer, float left, float top, float right, float bottom, float rx, float ry)