Canvas (HTML element)
A canvas element (from the English canvas for " canvas " or " painting ") is an area - in the HTML language - described with height and width specifications, in which JavaScript can be used to draw. Originally developed by Apple as part of the WebKit , it was later standardized by the WHATWG working group as part of the HTML5 markup language .
Skills
In addition to normal line and rectangle drawing functions, Canvas allows you to draw:
- Circular arcs
- Bézier curves (square and cubic)
- Color gradients
- Graphics (formats: PNG, GIF, JPEG) that can be scaled , positioned and cropped
- Transparency (with several levels)
- text
Objects and groups of objects can be moved , rotated and scaled.
As with OpenGL and DirectX , objects can be stored in a stack , which enables the targeted manipulation of object groups. Animations are possible using JavaScript time functions.
The output of vector graphics is not supported.
support
Canvas is natively supported by current browsers.
Microsoft's Internet Explorer supports Canvas from version 9. However, old versions can be expanded to include the canvas function with plugins provided by Mozilla and Google.
See also
Web links
- Official Canvas description (English)
- Introduction to Canvas
- Detailed Canvas tutorial at Mozilla.org (English)
- canvas.quaese.de - Documentation, introductions with examples, further links
Individual evidence
- ↑ Block fingerprinting with HTML5 canvas elements. In: Privacy manual. Retrieved January 18, 2019 .
- ↑ Support tables for HTML5, CSS3, etc . Retrieved April 26, 2018.
- ^ "Mozilla drags IE into the future with Canvas element plugin" . Ars Technica. Retrieved July 27, 2011.
- ^ "ExplorerCanvas" . Sourceforge. Retrieved November 29, 2011.