diff options
author | Bernie Innocenti <bernie@codewiz.org> | 2010-05-03 21:53:47 (GMT) |
---|---|---|
committer | Bernie Innocenti <bernie@codewiz.org> | 2010-05-03 21:53:47 (GMT) |
commit | 1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch) | |
tree | 698eefa87ac437deaf36a4141b326f8ce7986692 /help/rest/linemenu.txt |
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'help/rest/linemenu.txt')
-rw-r--r-- | help/rest/linemenu.txt | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/help/rest/linemenu.txt b/help/rest/linemenu.txt new file mode 100644 index 0000000..32c630a --- /dev/null +++ b/help/rest/linemenu.txt @@ -0,0 +1,49 @@ +.. _linemenu: +.. _line: + +.. index:: + pair: functions; Line drawing + pair: command; line + +Line drawing functions +====================== + +XaoS has support for drawing lines. These functions are available only in +animations and could be used to show some parts of fractals or draw simple +diagrams. See the tutorial ":tutor:`Introduction to fractals <intro.xaf>`" for examples of this feature. + +Lines can be drawn in **screen** coordinates, where 0,0 is the top left corner +and 1,1 is bottom right, **scaled** coordinates, which are similar, but scaled +to keep 0,0--1,1 rectangular, or **Fractal** coordinates, to draw a line at an +exact position on the screen. + +The color of the line should be specified by the :ref:`color <color>` command. +You might draw an arbitrary number of lines and, later, morph them. Each line +is identified by a unique numeric key; the current key can be set using +linekey. Commands for changing lines operate on the line with the current key. +(Lines drawn in sequence have consecutive numbers.) + +For example:: + + (color 'red) + (line 'scaled 0.3 0.5 0.7 0.5) + (line 'scaled 0.3 0.5 0.7 0.5) + (line 'scaled 0.3 0.5 0.3 0.5) + (line 'scaled 0.7 0.5 0.7 0.5) + (linekey 0) + (morphline 'scaled 0.3 0.3 0.7 0.3) + (morphline 'scaled 0.3 0.7 0.7 0.7) + (morphline 'scaled 0.3 0.3 0.3 0.7) + (morphline 'scaled 0.7 0.3 0.7 0.7) + (usleep 1000000) + +Creates line morphing to rectangle. + +.. toctree:: + + line + morphline + morphlastline + linekey + clearline + clearlines |