Canvas

constructor(bitmap: Bitmap, surfaceProps: SurfaceProps = SurfaceProps())

Constructs a canvas that draws into bitmap. Sets default pixel geometry in constructed Surface.

Bitmap is copied so that subsequently editing bitmap will not affect constructed Canvas.

May be deprecated in the future.

Parameters

bitmap

width, height, ColorType, ColorAlphaType, and pixel storage of raster surface

See also