Previous: XYPlot Object, Up: Part III Other Objects [Contents][Index]

### 21.3 Canvas Object

A canvas is a managed plain X (sub)window. It it different from the free object in that a canvas is guaranteed to be associated with a window that is not shared with any other object, thus an application program has more freedom in utilizing a canvas, such as using its own colormap or rendering double-buffered OpenGL in it etc. A canvas is also different from a raw application window because a canvas is decorated differently and its geometry is managed, e.g., you can use `fl_set_object_resize()` to control its position and size after its parent form is resized.

You also should be aware that when using a canvas you’ll probably mostly program directly using basic Xlib functions, XForms doesn’t supply much more than a few helper functions. You’ll rather likely draw to it with Xlib functions and will be dealing with `XEvent`s yourself (instead having them taken care of by XForms and cenverted to some simpler to use events that then just return the object from `fl_do_forms()` or invoke an associated callback function. Thus you will typically need a basic knowledge of how to program via the X11 Xlib.