Canvas2d
Renders a Canvas using the "2d" rendering context.
Parameters
The width (in pixels) of this canvas. If the user adds a different value for the width in the modifier parameter, the canvas will be resized to fit.
The height (in pixels) of this canvas. Same additional details as width.
If set, ensures that draw won't be called more than once per this period. If not set, render will be called as frequently as possible. The constant ONE_FRAME_MS_60_FPS could be useful to set here.
Ensured that the delta passed into RenderScope will be capped. This is useful to make sure that render behavior doesn't explode after sitting on a breakpoint for a while or get stuck on some edge case long calculation. By default, it is capped to half a second.
If present, provides a handle that lets callers trigger a repaint manually. You should declare the CanvasRepainter instance inside a remember block.
A callback which handles rendering a single frame.