Jump to content

Canvas (GUI): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
→‎Library support: Added Tk canvas
→‎Library support: Added TkZinc
Line 18: Line 18:
* in [[Java (programming language)|Java]], the [[Java FX]] scene graph with 2D and 3D functionality
* in [[Java (programming language)|Java]], the [[Java FX]] scene graph with 2D and 3D functionality
* in [[Tcl]] and other languages such as [[Perl]], [[Python (programming language)|Python]] ([[Tkinter]]), and [[Ruby (programming language)|Ruby]], the [[Tk (software)|Tk toolkit]] provides a <code>canvas</code> widget for 2D graphics <ref>http://www.tkdocs.com/tutorial/canvas.html</ref> <ref>http://tcl.tk/man/tcl8.6/TkCmd/canvas.htm</ref>
* in [[Tcl]] and other languages such as [[Perl]], [[Python (programming language)|Python]] ([[Tkinter]]), and [[Ruby (programming language)|Ruby]], the [[Tk (software)|Tk toolkit]] provides a <code>canvas</code> widget for 2D graphics <ref>http://www.tkdocs.com/tutorial/canvas.html</ref> <ref>http://tcl.tk/man/tcl8.6/TkCmd/canvas.htm</ref>
* in [[Tcl]]<ref>http://wiki.tcl.tk/2798</ref> and other languages such as [[Perl]]<ref>http://search.cpan.org/~zincdev/tk-zinc-3.303/</ref> and [[Python (programming language)|Python]]<ref>https://wiki.python.org/moin/TkZinc</ref>, [https://bitbucket.org/plecoanet/tkzinc 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:
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:

Revision as of 16:55, 4 March 2016

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 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:

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:

Proprietary canvas libraries include, for example:

References