Class ShadowNativeCanvas

Direct Known Subclasses:
ShadowNativeBaseRecordingCanvas

Shadow for Canvas that is backed by native code
  • Constructor Details

    • ShadowNativeCanvas

      public ShadowNativeCanvas()
  • Method Details

    • nFreeCaches

      @Implementation(minSdk=26) protected static void nFreeCaches()
    • nFreeTextLayoutCaches

      @Implementation(minSdk=26) protected static void nFreeTextLayoutCaches()
    • nGetNativeFinalizer

      @Implementation(minSdk=26) protected static long nGetNativeFinalizer()
    • nSetCompatibilityVersion

      @Implementation(minSdk=28) protected static void nSetCompatibilityVersion(int apiLevel)
    • nInitRaster

      @Implementation(minSdk=26, maxSdk=28) protected static long nInitRaster(Bitmap bitmap)
    • nInitRaster

      @Implementation(minSdk=29) protected static long nInitRaster(long bitmapHandle)
    • nSetBitmap

      @Implementation(minSdk=26, maxSdk=28) protected static void nSetBitmap(long canvasHandle, Bitmap bitmap)
    • nSetBitmap

      @Implementation(minSdk=29) protected static void nSetBitmap(long canvasHandle, long bitmapHandle)
    • nGetClipBounds

      @Implementation(minSdk=26) protected static boolean nGetClipBounds(long nativeCanvas, Rect bounds)
    • nIsOpaque

      @Implementation(minSdk=26) protected static boolean nIsOpaque(long canvasHandle)
    • nGetWidth

      @Implementation(minSdk=26) protected static int nGetWidth(long canvasHandle)
    • nGetHeight

      @Implementation(minSdk=26) protected static int nGetHeight(long canvasHandle)
    • nSave

      @Implementation(minSdk=26) protected static int nSave(long canvasHandle, int saveFlags)
    • nSaveLayer

      @Implementation(minSdk=31) protected static int nSaveLayer(long nativeCanvas, float l, float t, float r, float b, long nativePaint)
    • nSaveLayer

      @Implementation(minSdk=26, maxSdk=30) protected static int nSaveLayer(long nativeCanvas, float l, float t, float r, float b, long nativePaint, int layerFlags)
    • nSaveLayerAlpha

      @Implementation(minSdk=31) protected static int nSaveLayerAlpha(long nativeCanvas, float l, float t, float r, float b, int alpha)
    • nSaveLayerAlpha

      @Implementation(minSdk=26, maxSdk=30) protected static int nSaveLayerAlpha(long nativeCanvas, float l, float t, float r, float b, int alpha, int layerFlags)
    • nSaveUnclippedLayer

      @Implementation(minSdk=29) protected static int nSaveUnclippedLayer(long nativeCanvas, int l, int t, int r, int b)
    • nRestoreUnclippedLayer

      @Implementation(minSdk=29) protected static void nRestoreUnclippedLayer(long nativeCanvas, int saveCount, long nativePaint)
    • nRestore

      @Implementation(minSdk=26) protected static boolean nRestore(long canvasHandle)
    • nRestoreToCount

      @Implementation(minSdk=26) protected static void nRestoreToCount(long canvasHandle, int saveCount)
    • nGetSaveCount

      @Implementation(minSdk=26) protected static int nGetSaveCount(long canvasHandle)
    • nTranslate

      @Implementation(minSdk=26) protected static void nTranslate(long canvasHandle, float dx, float dy)
    • nScale

      @Implementation(minSdk=26) protected static void nScale(long canvasHandle, float sx, float sy)
    • nRotate

      @Implementation(minSdk=26) protected static void nRotate(long canvasHandle, float degrees)
    • nSkew

      @Implementation(minSdk=26) protected static void nSkew(long canvasHandle, float sx, float sy)
    • nConcat

      @Implementation(minSdk=26) protected static void nConcat(long nativeCanvas, long nativeMatrix)
    • nSetMatrix

      @Implementation(minSdk=26) protected static void nSetMatrix(long nativeCanvas, long nativeMatrix)
    • nClipRect

      @Implementation(minSdk=26) protected static boolean nClipRect(long nativeCanvas, float left, float top, float right, float bottom, int regionOp)
    • nClipPath

      @Implementation(minSdk=26) protected static boolean nClipPath(long nativeCanvas, long nativePath, int regionOp)
    • nSetDrawFilter

      @Implementation(minSdk=26) protected static void nSetDrawFilter(long nativeCanvas, long nativeFilter)
    • nGetMatrix

      @Implementation(minSdk=26) protected static void nGetMatrix(long nativeCanvas, long nativeMatrix)
    • nQuickReject

      @Implementation(minSdk=26) protected static boolean nQuickReject(long nativeCanvas, long nativePath)
    • nQuickReject

      @Implementation(minSdk=26) protected static boolean nQuickReject(long nativeCanvas, float left, float top, float right, float bottom)
    • saveUnclippedLayer

      @Implementation(minSdk=28, maxSdk=28) protected int saveUnclippedLayer(int left, int top, int right, int bottom)
      In Android P and below, Canvas.saveUnclippedLayer called nSaveLayer(long, float, float, float, float, long).

      However, in Android Q, a new native method was added specifically to save unclipped layers. Use this new method to fix things like ScrollView fade effects in P and below.