# OpenCanvas [RCBasic Doc]

## Function OpenCanvas( w, h, viewport_x, viewport_y, viewport_w, viewport_h, mode)

Returns a canvas for 2D drawing and text rendering

- w, h - The full size of the canvas
- viewport_x, viewport_y - Where to show the canvas in the window
- viewport_w, viewport_h - The size of the viewport. For example, a 100 x 100 viewport means that no matter how big the canvas is, only an area of 100 x 100 pixels is displayed.
- mode - Set this to 0 for a solid canvas and 1 for a color keyed canvas.

Related: OpenCanvas3D OpenCanvasSpriteLayer