Package org.robolectric.nativeruntime
Class PathNatives
java.lang.Object
org.robolectric.nativeruntime.PathNatives
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 TypeMethodDescriptionstatic voidnAddArc(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle) static voidnAddCircle(long nPath, float x, float y, float radius, int dir) static voidnAddOval(long nPath, float left, float top, float right, float bottom, int dir) static voidnAddPath(long nPath, long src) static voidnAddPath(long nPath, long src, float dx, float dy) static voidnAddPath(long nPath, long src, long matrix) static voidnAddRect(long nPath, float left, float top, float right, float bottom, int dir) static voidnAddRoundRect(long nPath, float left, float top, float right, float bottom, float[] radii, int dir) static voidnAddRoundRect(long nPath, float left, float top, float right, float bottom, float rx, float ry, int dir) static float[]nApproximate(long nPath, float error) static voidnArcTo(long nPath, float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean forceMoveTo) static voidnClose(long nPath) static voidnComputeBounds(long nPath, RectF bounds) static voidnCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3) static intnGetFillType(long nPath) static longstatic voidnIncReserve(long nPath, int extraPtCount) static longnInit()static longnInit(long nPath) static booleannIsConvex(long nPath) static booleannIsEmpty(long nPath) static booleanstatic voidnLineTo(long nPath, float x, float y) static voidnMoveTo(long nPath, float x, float y) static voidnOffset(long nPath, float dx, float dy) static booleannOp(long path1, long path2, int op, long result) static voidnQuadTo(long nPath, float x1, float y1, float x2, float y2) static voidnRCubicTo(long nPath, float x1, float y1, float x2, float y2, float x3, float y3) static voidnReset(long nPath) static voidnRewind(long nPath) static voidnRLineTo(long nPath, float dx, float dy) static voidnRMoveTo(long nPath, float dx, float dy) static voidnRQuadTo(long nPath, float dx1, float dy1, float dx2, float dy2) static voidnSet(long nativeDst, long nSrc) static voidnSetFillType(long nPath, int ft) static voidnSetLastPoint(long nPath, float dx, float dy) static voidnTransform(long nPath, long matrix) static voidnTransform(long nPath, long matrix, long dstPath)
-
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
-
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
-
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)
-