A Boolean that indicates whether the canvas is fully opaque. You might be able to improve performance by setting this value to true, but then drawing a non-opaque image into the context produces undefined results. The default is false.
A Boolean that indicates whether the canvas can present its contents to its parent view asynchronously. The default is false.
renderer
A closure in which you conduct immediate mode drawing. The closure takes two inputs: a context that you use to issue drawing commands and a size — representing the current size of the canvas — that you can use to customize the content. The canvas calls the renderer any time it needs to redraw the content.
Discussion
議論
Use this initializer to create a new canvas that you can draw into. For example, you can draw a path: