DrawingGeneral statementA dataware type block can also be used to draw freely. draw d 0 0 100 50 The four numerical values \u200b\u200bprovided correspond respectively to the coordinates in millimeters of the left, top, right and bottom edges. Note that in the case of a drawing, the data contained in the dataware block, saved via the instructions 'dw_bin' 'dw_category' 'dw_value' and 'dw_add' are not used for the graphic representation. We will now explain the graphic instructions that can be used, which are 'rectangle', 'fill', 'line', 'stroke', 'text', and 'virtual_button' FillingFill a rectangle: rectangle 10 10 30 20 color (color hsl 0 50 50) The four numerical values \u200b\u200bprovided correspond respectively to the coordinates in millimeters of the left, top, right and bottom edges. Version with rounded corners: rectangle 10 10 30 20 color (color hsl 0 50 50) rounded 2 Fill a complex curve: fill color (color hsl 0 50 50) You can specify more than one 'outline' for a single 'fill'. The options for the 'fill' statement are:
The options of the 'point' statement are:
LinesDraw a simple line: line 10 10 30 20 color (color hsl 0 50 50) The first two values \u200b\u200bcorrespond to the horizontal and vertical coordinates of the first point, the last two to those of the second point. Draw a complex curve: stroke color (color hsl 0 50 50) For a complex curve, you can also use several 'curve' or 'outline' instructions. The options for the 'stroke' statement are:
The default value of the line thickness in millimeters, i.e. the thickness when the 'stroke' instruction does not specify the 'width' option, can be adjusted for a whole subset of the drawing: style set "draw/stroke/width" 0.75 TextDraw text: text "Hello" translate 30 15 The following options can be used at the level of the 'text' instruction:
The alignment of the text depends on the style, which can be adjusted: style set "draw/text/align/horizontal" 0 # le texte sera centré horizontalement style set "draw/text/align/vertical" 0 # le texte sera centré verticalement style set "draw/text/align/horizontal" 0 set "draw/text/align/vertical" 0 # le texte sera centré horizontalement et verticalement style set "draw/text/align/horizontal" 1 # le texte sera aligné à droite ... Définir une zone cliquableIn the following example, 'feedback' is the value of 'button_name' which will be activated if you click in the specified rectangular area, and 'Foo' is the message displayed when you pass over this area: virtual_button 10 10 30 20 "feedback" help "Foo" Spatial distortionApply a spatial transformation to a subset of the drawing: transform translate 30 15 The following options can be used at the level of the 'transform' instruction:
|