From 240d724adc9655770c2152902b7d1a9bef28e497 Mon Sep 17 00:00:00 2001 From: László Németh Date: Mon, 24 Mar 2014 12:43:43 +0100 Subject: librelogo: help for gradients, log10, fixed interface Change-Id: I0d930e83a54f7321074c5376b540a48ea9dfafd1 --- source/text/swriter/librelogo/LibreLogo.xhp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/source/text/swriter/librelogo/LibreLogo.xhp b/source/text/swriter/librelogo/LibreLogo.xhp index 1aed424c3b..3be664dc17 100644 --- a/source/text/swriter/librelogo/LibreLogo.xhp +++ b/source/text/swriter/librelogo/LibreLogo.xhp @@ -27,27 +27,27 @@ LibreLogo LibreLogo is a simple, localized, Logo-like programming environment with turtle vector graphics for teaching of computing (programming and word processing), DTP and graphic design. See http://www.numbertext.org/logo/librelogo.pdf. LibreLogo toolbar -The LibreLogo toolbar (View » Toolbars » Logo) contains turtle moving, program run and stop, home and clear screen and syntax highlighting/translating icons and an input bar (command line). +The LibreLogo toolbar (View » Toolbars » Logo) contains turtle moving, program start, stop, home, clear screen, program editor/syntax highlighting/translating icons and an input bar (command line). Turtle moving icons They are equivalents of the Logo commands “FORWARD 10”, “BACK 10”, “LEFT 15”, “RIGHT 15”. Clicking on one of the icons will also focus the turtle shape scrolling the page to its position. -Program run and start -Click on the icon “run” to execute the text (or only the selected) text of the Writer document as a LibreLogo program. -Click on the icon “stop” to stop the program execution. +Start Logo program +Click on the icon “Start Logo program” to execute the text (or only the selected) text of the Writer document as a LibreLogo program. In an empty document an example program will be inserted and executed. +Click on the icon “Stop” to stop the program execution. Home -Click on the icon “home” to reset the position and settings of the turtle. +Click on the icon “Home” to reset the position and settings of the turtle. Clear screen -Click on the icon “clear screen” to remove the drawing objects of the document. +Click on the icon “Clear screen” to remove the drawing objects of the document. +Program editor/Syntax highlighting/Translating +The “magic wand” icon sets 2-page layout for program editing, expands and converts to uppercase the abbreviated, lowercase Logo commands in the Writer document. Change the language of the document (Tools » Options » Language Settings » Languages » Western) and click on this icon to translate the Logo program to the selected language. Command line -Hit Enter in the command line to execute its content. To stop the program use the icon “stop”. +Hit Enter in the command line to execute its content. To stop the program use the icon “Stop”. Hold down the Enter to repeat the command line, for example, on the following command sequence: FORWARD 200 LEFT 89
To reset the command line click triple in it or press Ctrl-A to select the previous commands, and type the new commands. -Syntax highlighting/Translating -It expands and upper case Logo commands in the Writer document. Change the language of the document (Tools » Options » Language Settings » Languages » Western) and click on this icon to translate the Logo program to the selected language. Graphical user interface of basic turtle settings Turtle shape of LibreLogo is a normal fixed size drawing object. You can positionate and rotate it on standard way, too, using the mouse and the Rotate icon of the Drawing Object Properties toolbar. Modify Line Width, Line Color and Area Color settings of the turtle shape to set PENSIZE, PENCOLOR and FILLCOLOR attributes of LibreLogo. Program editing -LibreLogo drawings and programs use the same Writer document. The LibreLogo canvas is on the first page of the Writer document. You can insert a page break before the LibreLogo programs and set the zoom/font size for a comfortable two page layout for LibreLogo programming: left (first) page is the canvas, right (second) page is for the LibreLogo programs. +LibreLogo drawings and programs use the same Writer document. The LibreLogo canvas is on the first page of the Writer document. You can insert a page break before the LibreLogo programs and set page zoom using the “magic wand” icon of the Logo toolbar, also change the font size for a comfortable 2-page layout for LibreLogo programming: left (first) page is the canvas, right (second) page is the LibreLogo program editor. LibreLogo programming language LibreLogo is an easily localizable, Logo-like programming language, localized in several languages by LibreOffice native language communities. It is back-compatible with the older Logo systems in the case of the simple Logo programs used in education, eg. TO triangle :size
REPEAT 3 [
FORWARD :size
LEFT 120
]
END

triangle 10 triangle 100 triangle 200
@@ -152,6 +152,8 @@ PENSIZE 100 ; line width is 100 points
PENSIZE ANY ; equivalent of PENSIZE RANDOM 10
PENCOLOR/PENCOLOUR (pc) PENCOLOR “red” ; set red pen color (by color name, see color constants)
PENCOLOR [255, 255, 0] ; set yellow color (RGB list)
PENCOLOR 0xffff00 ; set yellow color (hexa code)
PENCOLOR 0 ; set black color (0x000000)
PENCOLOR ANY ; random color
PENCOLOR [5] ; set red color (by color identifier, see color constants)
PENCOLOR “invisible” ; invisible pen color for shapes without visible outline
PENCOLOR “~red” ; set random red color
+PENTRANSPARENCY + PENTRANSPARENCY 80 ; set the transparency of the actual pen color to 80%
PENCAP/LINECAP PENCAP “none” ; without extra line end (default)
PENCAP “round” ; rounded line end
PENCAP “square” ; square line end
PENJOINT/LINEJOINT @@ -160,7 +162,9 @@ PENSTYLE “solid” ; solid line (default)
PENSTYLE “dotted” ; dotted line
PENSTYLE “dashed” ; dashed line

; custom dot–dash pattern specified by a list with the following arguments:
; – number of the neighbouring dots
; – length of a dot
; – number of the neighbouring dashes
; – length of a dash
; – distance of the dots/dashes
; – type (optional):
; 0 = dots are rectangles (default)
; 2 = dots are squares (lengths and distances are relative to the pensize)

PENSTYLE [3, 1mm, 2, 4mm, 2mm, 2] ; ...––...––...––
Fill settings FILLCOLOR/FILLCOLOUR (fc) - FILLCOLOR “blue” ; fill with blue color, see also PENCOLOR
FILLCOLOR “invisible” CIRCLE 10 ; unfilled circle
+ FILLCOLOR “blue” ; fill with blue color, see also PENCOLOR
FILLCOLOR “invisible” CIRCLE 10 ; unfilled circle
FILLCOLOR [“blue”, “red”] ; gradient between red and blue
FILLCOLOR [[255, 255, 255], [255, 128, 0]] ; between white and orange
FILLCOLOR [“blue”, “red”, 1, 0, 0] ; set axial gradient (with the required rotation and border settings), possible values: 0-5 = linear, axial, radial, elliptical, square and rectangle gradients
FILLCOLOR [“red”, “blue”, 0, 90, 20] ; linear with 20% border, rotated with 90 degrees from the actual heading of the turtle
FILLCOLOR [“red”, 'blue”, 0, 90, 20, 0, 0, 200, 50] ; from 200% to 50% intensity
FILLCOLOR [ANY, ANY, 2, 0, 0, 50, 50] ; radial gradient with random colors and 50-50% horizontal and vertical positions of the center
+FILLTRANSPARENCY + FILLTRANSPARENCY 80 ; set the transparency of the actual fill color to 80%
FILLTRANSPARENCY [80] ; set linear transparency gradient from 80% to 0%
FILLTRANSPARENCY [80, 20] ; set linear transparency gradient from 80% to 20%
FILLTRANSPARENCY [80, 20, 1, 90] ; set axial transparency gradient rotated with 90 degrees from the actual heading of the turtle
FILLTRANSPARENCY [80, 20, 2, 0, 20, 50, 50] ; set radial transparency gradient from outer 80% to inner 20% transparency with 20% border and with 50-50% horizontal and vertical positions of the center
FILLSTYLE FILLSTYLE 0 ; fill without hatches (default)
FILLSTYLE 1 ; black single hatches (horizontal)
FILLSTYLE 2 ; black single hatches (45 degrees)
FILLSTYLE 3 ; black single hatches (-45 degrees)
FILLSTYLE 4 ; black single hatches (vertical)
FILLSTYLE 5 ; red crossed hatches (45 degrees)
FILLSTYLE 6 ; red crossed hatches (0 degrees)
FILLSTYLE 7 ; blue crossed hatches (45 degrees)
FILLSTYLE 8 ; blue crossed hatches (0 degrees)
FILLSTYLE 9 ; blue triple crossed
FILLSTYLE 10 ; black wide single hatches (45 degrees)

; custom hatches specified by a list with the following arguments:
; – style (1 = single, 2 = double, 3 = triple hatching)
; – color
; – distance
; – degree

FILLSTYLE [2, “green”, 3pt, 15°] ; green crossed hatches (15 degrees)
Drawing objects @@ -293,6 +297,8 @@ PRINT SIN 90 * PI/180 ; print 1.0 (sinus of 90° in radians)
COS PRINT COS 0 * PI/180 ; print 1.0 (cosinus of 0° in radians)
+LOG10 + PRINT LOG10 100 ; print 2.0 (common logarithm of 100)
ROUND PRINT ROUND 3.8 ; print 4 (rounding 3.8)
PRINT ROUND RANDOM 100 ; random integer number (0 <= x <= 100)
ABS -- cgit