In computer science and visualization, a canvas is a
container
A container is any receptacle or enclosure for holding a product used in storage, packaging, and transportation, including shipping.
Things kept inside of a container are protected on several sides by being inside of its structure. The term ...
that holds various drawing elements (lines, shapes, text, frames containing others elements, etc.). It takes its name from the
canvas
Canvas is an extremely durable plain-woven fabric used for making sails, tents, marquees, backpacks, shelters, as a support for oil painting and for other items for which sturdiness is required, as well as in such fashion objects as handbags, ...
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.
Library support
Various
free and open-source
Free and open-source software (FOSS) is a term used to refer to groups of software consisting of both free software and open-source software where anyone is freely licensed to use, copy, study, and change the software in any way, and the source ...
canvas or scene-graph
libraries allow developers to construct a user interface and/or user-interface elements for their computer programs.
Examples of free and open-source scene-graph canvas options include:
* in
CEvas (in EFL)from the
Enlightenment project
* in
C,
Clutter, associated with the
GNOME project
* in
C,
GTK Scene Graph Kit (GSK)
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
or optionally in
Qt's own markup language
QML
QML (Qt Modeling Language) is a user interface markup language. It is a declarative language (similar to CSS and JSON) for designing user interface–centric applications. Inline JavaScript code handles imperative aspects. It is associated wi ...
:
Qt Quick, provides
scenegraphassociated with the Qt project
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
,
OpenSceneGraph, a 3D graphics API using
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
, the
OGRE engine, based on a scene graph, supports multiple scene managers
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
,
OpenSG, a scene-graph system for real-time graphics, with clustering support and multi-thread safety
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
, the
FlightGear Flight Simulator uses a custom Canvas system (
LGPL
The GNU Lesser General Public License (LGPL) is a free-software license published by the Free Software Foundation (FSF). The license allows developers and companies to use and integrate a software component released under the LGPL into their ow ...
'ed via SimGear) that is hardware-accelerated using
OpenSceneGraph/
OpenGL
OpenGL (Open Graphics Library) is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardwa ...
, OpenVG/ShivaVG
The FlightGear Canvas system* in
Java, the
Java FX scene graph with 2D and 3D functionality
* in
Tcl
TCL or Tcl or TCLs may refer to:
Business
* TCL Technology, a Chinese consumer electronics and appliance company
** TCL Electronics, a subsidiary of TCL Technology
* Texas Collegiate League, a collegiate baseball league
* Trade Centre Limited, ...
and other languages such as
Perl,
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pr ...
(
Tkinter
Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's ''de facto'' standard GUI. Tkinter is included with standard Linux, Microsoft Windows and macOS installs of Python.
Th ...
), and
Ruby, the
Tk toolkit provides a
canvas
widget for 2D graphics
* in
Tcl
TCL or Tcl or TCLs may refer to:
Business
* TCL Technology, a Chinese consumer electronics and appliance company
** TCL Electronics, a subsidiary of TCL Technology
* Texas Collegiate League, a collegiate baseball league
* Trade Centre Limited, ...
and other languages such as
Perl and
Python
Python may refer to:
Snakes
* Pythonidae, a family of nonvenomous snakes found in Africa, Asia, and Australia
** ''Python'' (genus), a genus of Pythonidae found in Africa and Asia
* Python (mythology), a mythical serpent
Computing
* Python (pr ...
,
TkZinc is an extended replacement for the Tk canvas, which adds support for hierarchical grouping, clipping, affine transformations, anti-aliasing, and specific items for air traffic control.
Some canvas modules within various libraries do not provide the power of a full scene-graph - they operate at a lower level which requires programmers to provide code such as mapping mouse-clicks to objects in the canvas. Examples of libraries which include such a canvas module include:
* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
,
KDE Plasma Workspaces
KDE Plasma 5 is the fifth and current generation of the graphical workspaces environment created by KDE primarily for Linux systems. KDE Plasma 5 is the successor of KDE Plasma 4 and was first released on 15 July 2014.
It includes a new default ...
br>
Coronacanvas
* the
Canvas element
The canvas element is part of HTML5 and allows for dynamic, scriptable rendering of 2D shapes and bitmap images. It is a low level, procedural model that updates a bitmap. HTML5 Canvas also helps in making 2D games.
While the HTML5 canvas off ...
in
HTML5
* for
Java, the
AWT librar
Canvas* for
Java, the
Java FX librar
Canvas* for
Java, the
Swing
Swing or swinging may refer to:
Apparatus
* Swing (seat), a hanging seat that swings back and forth
* Pendulum, an object that swings
* Russian swing, a swing-like circus apparatus
* Sex swing, a type of harness for sexual intercourse
* Swing ri ...
librar
Canvas* for
Java, the
SWT librar
Canvas associated with
Eclipse
* for
Java-like
JavaScript, the
GWT librar
Canvas* in
C++
C, or c, is the third letter in the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is ''cee'' (pronounced ), plural ''cees''.
History
"C" ...
, th
papyrus Canvas librarywhich renders using the
Cairo (graphics)
Cairo (stylized as cairo) is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cair ...
library
* in
Ccrcanvas a
GTK canvas
widget which renders using the
Cairo (graphics)
Cairo (stylized as cairo) is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cair ...
library
* in
CGooCanvas a
GTK canvas
widget which renders using the
Cairo (graphics)
Cairo (stylized as cairo) is an open-source graphics library that provides a vector graphics-based, device-independent API for software developers. It provides primitives for two-dimensional drawing across a number of different back ends. Cair ...
library
Proprietary canvas libraries include, for example:
* the
Microsoft Windows Win32br>
Canvas
References
{{Reflist
Graphical user interface elements