Class PathNatives

java.lang.Object
org.robolectric.nativeruntime.PathNatives

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

  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    nAddArc(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle)
     
    static void
    nAddCircle(long nPath, float x, float y, float radius, int dir)
     
    static void
    nAddOval(long nPath, float left, float top, float right, float bottom, int dir)
     
    static void
    nAddPath(long nPath, long src)
     
    static void
    nAddPath(long nPath, long src, float dx, float dy)
     
    static void
    nAddPath(long nPath, long src, long matrix)
     
    static void
    nAddRect(long nPath, float left, float top, float right, float bottom, int dir)
     
    static void
    nAddRoundRect(long nPath, float left, float top, float right, float bottom, float[] radii, int dir)
     
    static void
    nAddRoundRect(long nPath, float left, float top, float right, float bottom, float rx, float ry, int dir)
     
    static float[]
    nApproximate(long nPath, float error)
     
    static void
    nArcTo(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo)
     
    static void
    nClose(long nPath)
     
    static void
    nComputeBounds(long nPath, RectF bounds)
     
    static void
    nCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3)
     
    static int
    nGetFillType(long nPath)
     
    static long
     
    static void
    nIncReserve(long nPath, int extraPtCount)
     
    static long
     
    static long
    nInit(long nPath)
     
    static boolean
    nIsConvex(long nPath)
     
    static boolean
    nIsEmpty(long nPath)
     
    static boolean
    nIsRect(long nPath, RectF rect)
     
    static void
    nLineTo(long nPath, float x, float y)
     
    static void
    nMoveTo(long nPath, float x, float y)
     
    static void
    nOffset(long nPath, float dx, float dy)
     
    static boolean
    nOp(long path1, long path2, int op, long result)
     
    static void
    nQuadTo(long nPath, float x1, float y1, float x2, float y2)
     
    static void
    nRCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3)
     
    static void
    nReset(long nPath)
     
    static void
    nRewind(long nPath)
     
    static void
    nRLineTo(long nPath, float dx, float dy)
     
    static void
    nRMoveTo(long nPath, float dx, float dy)
     
    static void
    nRQuadTo(long nPath, float dx1, float dy1, float dx2, float dy2)
     
    static void
    nSet(long nativeDst, long nSrc)
     
    static void
    nSetFillType(long nPath, int ft)
     
    static void
    nSetLastPoint(long nPath, float dx, float dy)
     
    static void
    nTransform(long nPath, long matrix)
     
    static void
    nTransform(long nPath, long matrix, long dstPath)
     

    Methods inherited from class java.lang.Object

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

    • nInit

      public static long nInit()
    • nInit

      public static long nInit(long nPath)
    • nGetFinalizer

      public static long nGetFinalizer()
    • nSet

      public static void nSet(long nativeDst, long nSrc)
    • nComputeBounds

      public static void nComputeBounds(long nPath, RectF bounds)
    • nIncReserve

      public static void nIncReserve(long nPath, int extraPtCount)
    • nMoveTo

      public static void nMoveTo(long nPath, float x, float y)
    • nRMoveTo

      public static void nRMoveTo(long nPath, float dx, float dy)
    • nLineTo

      public static void nLineTo(long nPath, float x, float y)
    • nRLineTo

      public static void nRLineTo(long nPath, float dx, float dy)
    • nQuadTo

      public static void nQuadTo(long nPath, float x1, float y1, float x2, float y2)
    • nRQuadTo

      public static void nRQuadTo(long nPath, float dx1, float dy1, float dx2, float dy2)
    • nCubicTo

      public static void nCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3)
    • nRCubicTo

      public static void nRCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3)
    • nArcTo

      public static void nArcTo(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo)
    • nClose

      public static void nClose(long nPath)
    • nAddRect

      public static void nAddRect(long nPath, float left, float top, float right, float bottom, int dir)
    • nAddOval

      public static void nAddOval(long nPath, float left, float top, float right, float bottom, int dir)
    • nAddCircle

      public static void nAddCircle(long nPath, float x, float y, float radius, int dir)
    • nAddArc

      public static void nAddArc(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle)
    • nAddRoundRect

      public static void nAddRoundRect(long nPath, float left, float top, float right, float bottom, float rx, float ry, int dir)
    • nAddRoundRect

      public static void nAddRoundRect(long nPath, float left, float top, float right, float bottom, float[] radii, int dir)
    • nAddPath

      public static void nAddPath(long nPath, long src, float dx, float dy)
    • nAddPath

      public static void nAddPath(long nPath, long src)
    • nAddPath

      public static void nAddPath(long nPath, long src, long matrix)
    • nOffset

      public static void nOffset(long nPath, float dx, float dy)
    • nSetLastPoint

      public static void nSetLastPoint(long nPath, float dx, float dy)
    • nTransform

      public static void nTransform(long nPath, long matrix, long dstPath)
    • nTransform

      public static void nTransform(long nPath, long matrix)
    • nOp

      public static boolean nOp(long path1, long path2, int op, long result)
    • nIsRect

      public static boolean nIsRect(long nPath, RectF rect)
    • nReset

      public static void nReset(long nPath)
    • nRewind

      public static void nRewind(long nPath)
    • nIsEmpty

      public static boolean nIsEmpty(long nPath)
    • nIsConvex

      public static boolean nIsConvex(long nPath)
    • nGetFillType

      public static int nGetFillType(long nPath)
    • nSetFillType

      public static void nSetFillType(long nPath, int ft)
    • nApproximate

      public static float[] nApproximate(long nPath, float error)