From 1030dc837b10a03a02a85d5504cbeec168ce49e2 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Mon, 03 May 2010 21:53:47 +0000 Subject: Import XaoS r489 (trunk after version 3.5) --- (limited to 'help/rest/linemenu.txt') 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 `" 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 ` 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 -- cgit v0.9.1