Class PaintFilterCanvas

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    public abstract class PaintFilterCanvas
    extends Canvas
    A utility proxy base class for implementing draw/paint filters.
    • Constructor Detail

      • PaintFilterCanvas

        public PaintFilterCanvas​(@NotNull
                                 @NotNull Canvas canvas,
                                 boolean unrollDrawable)
        Parameters:
        unrollDrawable - if needed to filter nested drawable content using this canvas (for drawables there is no paint to filter)
    • Method Detail

      • onFilter

        public abstract boolean onFilter​(@NotNull
                                         @NotNull Paint paint)
        Called with the paint that will be used to draw the specified type. The implementation may modify the paint as they wish. The result boolean is used to determine whether the draw op is to be executed (true) or skipped (false). Note: The base implementation calls onFilter() for top-level/explicit paints only.
      • onFilter

        public final boolean onFilter​(long paintPtr)
      • _nAttachToJava

        public void _nAttachToJava​(long canvasPtr)
      • _nMake

        public static long _nMake​(long canvasPtr,
                                  boolean unrollDrawable)