com.aliyun.svideosdk.editor

## Interface AliyunICanvasController

-     public interface AliyunICanvasController

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `applyPaintCanvas()` Adds doodles to video.
    `void` | `cancel()` Undoes all strokes.
    `void` | `clear()` Clears the canvas.
    `void` | `confirm()` Confirms all strokes.
    `View` | `getCanvas()` Gets the view that is used as a canvas to create doodles on.
    `boolean` | `hasCanvasPath()` Returns whether doodles exist on the canvas.
    `void` | `release()` Releases resources.
    `void` | `removeCanvas()` Deletes doodles in the video.
    `int` | `resetPaintCanvas()` Resets the canvas to the state when `applyPaintCanvas()` was last invoked.
    `void` | `setCurrentColor(int color)` Sets the color of the paint.
    `void` | `setCurrentSize(float size)` Sets the size of the paint brush.
    `void` | `setPaint(Paint paint)` Sets a custom paint.
    `void` | `undo()` Undoes the last stroke.

- - ### Method Detail

    - #### applyPaintCanvas

          int applyPaintCanvas()

      Adds doodles to video.
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### getCanvas

          View getCanvas()

      Gets the view that is used as a canvas to create doodles on.
      Returns:
        The view that is used as a canvas.

    - #### hasCanvasPath

          boolean hasCanvasPath()

      Returns whether doodles exist on the canvas.

    - #### removeCanvas

          void removeCanvas()

      Deletes doodles in the video.

    - #### undo

          void undo()

      Undoes the last stroke.

    - #### cancel

          void cancel()

      Undoes all strokes.

    - #### confirm

          void confirm()

      Confirms all strokes.

    - #### clear

          void clear()

      Clears the canvas.

    - #### setPaint

          void setPaint(Paint paint)

      Sets a custom paint.

    - #### setCurrentColor

          void setCurrentColor(int color)

      Sets the color of the paint.

    - #### setCurrentSize

          void setCurrentSize(float size)

      Sets the size of the paint brush.

    - #### resetPaintCanvas

          int resetPaintCanvas()

      Resets the canvas to the state when `applyPaintCanvas()` was last invoked.
      Returns:
        0 if the invocation is successful or an error code if the invocation fails.

    - #### release

          void release()

      Releases resources.