Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
SVG
Last updated at 3:24 pm UTC on 14 November 2020
SVG = Scalable Vector Graphics is for graphics what HTML is for text.


SVG is a widely-deployed royalty-free graphics format developed and maintained by the W3C SVG Working Group
http://www.w3.org/Graphics/SVG/

Like HTML, SVG has a document model (DOM) and events, and is accessible from JavaScript.

Though the SVG Specification primarily focuses on vector graphics markup language, its design includes the basic capabilities of a page description language like Adobe's PDF. It contains provisions for rich graphics, and is compatible with CSS for styling purposes. SVG has the information needed to place each glyph and image in a chosen location on a printed page.
https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
http://www.svgopen.org/2002/papers/danilo_fujisawa__svg_as_page_description_language/index.html

Reference

https://developer.mozilla.org/en-US/docs/Web/SVG

Tutorials

An SVG Primer for Today's Browsers, 2010 (link)
https://www.w3schools.com/graphics/svg_intro.asp
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Introduction
http://tutorials.jenkov.com/svg/index.html

Squeak implementation

An SVG output of a Morph hierarchy is not implemented yet but there are provisions already done by Marcel Weiher (2002) for implementing this: See Postscript support, NullEncoder, PostscriptCanvas.

Examples









Create a simple SVG document
SVG construction example 1
SVG construction example 2 - rect (rectangle) and text (XMLElement)
SVG construction example 4 - rect, circle and text
SVG construction example 5 - clock or ornament
SVG construction example 6 - path

See also



More

Notes about SVG commands