tsvg

Difference between version 1 and 2 - Previous - Next
<<toc>>

----

**Name**

''tsvg'' - Thingy SVG writer - package to create svg image files with a syntax close to Tcl and to SVG.

**Description**
[DDG] 2021-08-30: The package provides one command *''tsvg*'' which can hold currently just a single svg code collection. All commands will be evaluated within the tsvg namespace, all unknown methods which are all will be forwarded to the standard tsvg::tag method and produce svg code out of them. So *`tsvg dummy x="20" hello*` will produce: `<dummy x="20">hello</dummy>` as output. 

**Links**

    * Homepage: https://github.com/mittelmark/DGTcl
    * Download: (Gitdown) https://downgit.github.io/#/home?url=https://github.com/mittelmark/DGTcl/tree/master/pandoc-tcl-filter/lib/tsvg
    * Manual: https://htmlpreview.github.io/?https://github.com/mittelmark/DGTcl/blob/master/pandoc-tcl-filter/lib/tsvg/tsvg.html
    * Version: 0.1 - 2021-08-28
    * License: MIT

**Example**

Below a simple example to create a "Hello World!" figure:

======
package require tsvg
tsvg circle cx 50 cy 50 r 45 stroke black stroke-width 2 fill salmon
tsvg text x 29 y 45 Hello
tsvg text x 27 y 65 World!
tsvg write hello-world.svg
======

[tsvg-image]

For more examples see the https://htmlpreview.github.io/?https://github.com/mittelmark/DGTcl/blob/master/pandoc-tcl-filter/lib/tsvg/tsvg.html%|%manual page%|%.

----

**See also**

   * [Thingy: a one-liner OO system] - the toy OO behind *tsvg*
   * [tclcairo] - an other graphics library

----

**Discussion**

Please discuss here ...



<<categories>> Package | Graphics | SVG