Canvas (GUI)
In computer science and visualization, a canvas is a container that holds various drawing elements (lines, shapes, text, frames containing other elements, etc.). It takes its name from the canvas used in visual arts. It is sometimes called a scene graph because it arranges the logical representation of a user interface or graphical scene. Some implementations also define the spatial representation and allow the user to interact with the elements via a graphical user interface.
See this article for an overview (2010-08-15) of a small handful of canvas implementations.
Library support
Various free and open-source canvas or scene graph libraries are available for developers to use to create a user interface and/ or user interface elements for their computer programs.
Example free and open-source scene-graph canvas options include:
- In C, Evas from the Enlightenment project.
- In C, Clutter associated with the GNOME project.
- In C, GTK+ Scene Graph Kit (GSK)
- In C, Pigment
- In C++ or optionally their own markup QML, Qt Quick, provides a scenegraph associated with the Qt project.
- In C++, OpenSceneGraph, a 3D graphics API using OpenGL.
- In C++, the OGRE scene graph based engine supports multiple scene managers.
- In C++, OpenSG, a scene graph system for real-time graphics, with clustering support and multi-thread safety.
- In C++, the FlightGear Flight Simulator uses a custom Canvas system (LGPL'ed via SimGear[1]) that is hardware-accelerated using OpenSceneGraph/OpenGL, OpenVG/ShivaVG:[2] The FlightGear Canvas system
- In Java, the Java FX scene graph with 2D and 3D functionality.
There are canvas modules within various libraries which do not provide the power of a full scene-graph. That is, they operate at a lower level which requires the programmer to provide code such as mapping mouse-clicks to objects in the canvas. Examples libraries which include such a canvas module include:
- In C++, KDE Plasma Workspaces Corona canvas
- The Canvas element in HTML5
- For Java, the AWT library Canvas
- For Java, the Java FX library Canvas
- For Java, the Swing library Canvas
- For Java, the SWT library Canvas, associated with Eclipse
- For Java-like JavaScript, the GWT library Canvas
- For Tcl/Tk, the canvas widget
- For Python, the Tkinter library canvas
- In C++, the papyrus Canvas library which renders using the Cairo (graphics) library
- In C, crcanvas, a GTK+ canvas widget which renders using the Cairo (graphics) library
- In C, GooCanvas, a GTK+ canvas widget which renders using the Cairo (graphics) library
There are proprietary canvas libraries as well, for example:
References
- ↑ gitorious.org/fg/simgear
- ↑ http://wiki.flightgear.org/Canvas_Development