Add user manual
This commit is contained in:
parent
44ef1b385d
commit
5a2f8ff719
48
doc/manual.md
Normal file
48
doc/manual.md
Normal file
|
@ -0,0 +1,48 @@
|
|||
# Genoa user manual
|
||||
|
||||
Genoa is a tool to drawings out of simple scripts and export them as SVG, or preview them inline for rapid turnaround. Genoa shapes and options only cover a subset of SVG. Note that the preview isn't always exact, especially at small sizes and/or when it contains text.
|
||||
|
||||
Genoa scripts are based on a safe subset of the Tcl programming language. A Tcl tutorial is outside the scope of this manual; see the examples to get started.
|
||||
|
||||
That said, certain procedures are specific to Genoa.
|
||||
|
||||
## Cheatsheet
|
||||
|
||||
Shapes:
|
||||
|
||||
```tcl
|
||||
line $x1 $y1 $x2 $y2
|
||||
box $x $y $width $height
|
||||
circle $cx $cy $r
|
||||
oval $cx $cy $rx $ry
|
||||
text $x $y
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
```tcl
|
||||
# Can be a named color, hex triplet or rgb(n, n, n) code.
|
||||
# Use an empty string for transparency.
|
||||
color $c
|
||||
fill $f
|
||||
# Width of lines / borders (default: 1).
|
||||
width $w
|
||||
# Font options
|
||||
font $f
|
||||
size $s
|
||||
```
|
||||
|
||||
Other:
|
||||
|
||||
```tcl
|
||||
# Defines what part of the drawing will be visible.
|
||||
# Can be placed anywhere in the script.
|
||||
viewport $x $y $width $height
|
||||
repeat $times {
|
||||
# Just what it looks like
|
||||
}
|
||||
# Useful for debugging
|
||||
alert $message
|
||||
```
|
||||
|
||||
This cheatsheet applies to Genoa version 0.3.2 alpha from September 2023.
|
Loading…
Reference in New Issue
Block a user