Subversion Repositories wimsdev

Rev

Rev 8540 | Rev 16344 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 reyssat 1
:affine a,b,c,d,tx,ty
2
 
277 reyssat 3
 Make an affine transformation for the subsequent objects: (x;y) -> [a,b;c,d](x;y)+(tx;ty).
16272 bpr 4
:alt texte
5
 
6
This command is only available for WIMS OEF and doc and MUST appear on the first line. It gives the attribut alt="text" to the image.
8414 bpr 7
:animate fra,del,rep
10 reyssat 8
 
16272 bpr 9
 This command is only available for WIMS OEF and doc, and MUST appear on the first line or after the command alt. Set up animation for fra frames, with del seconds between frames, and rep repetitions (rep=0 means infinite repetition).<br> Frame control is done via two variables: <tt>animstep</tt> (integer) going from 1 to frame count, and <tt>s</tt> going from 0 to 1.
10 reyssat 10
:animstep n
11
 
12
 Set up an integer which can be called in any evaluation. Used for animation. Direct use of this command must be avoided under WIMS.
13
:arc x,y,w,h,a1,a2,[color]
14
 
15
 Arc segment of an ellipse of width w and hight h centered at (x,y), from angle a1 to angle a2 (in degrees).
16
:arrow x1,y1,x2,y2,l,[color]
17
 
18
 Arrow (x1,y1)--->(x2,y2), where l is the length (in pixels) of arrowhead.
1024 bpr 19
:arrow2 x1,y1,x2,y2,l,[color]
20
 
21
 Two sided arrow (x1,y1)<--->(x2,y2), where l is the length (in pixels) of arrowhead.
10 reyssat 22
:circle x,y,d,[color]
23
 
24
 Circle of center (x,y) and diameter d (in pixels).
25
:comment
8414 bpr 26
 
10 reyssat 27
 Does nothing.
28
:copy x,y,x1,y1,x2,y2,[filename]
29
 insert
4411 bpr 30
 Insert the region from (x1,y1) to (x2,y2) (in pixels) of [filename] to (x,y). If x1=y1=x2=y2=-1, the whole [filename] is copied. [filename] is the address of the file from the directory wims/public_html/gifs or from the directory common_images for OEF modules.
10 reyssat 31
:copyresized x1,y1,x2,y2,dx1,dy1,dx2,dy2,[filename]
32
 
33
 Insert the region from (x1,y1) to (x2,y2) (in pixels) of [filename], possibly resized, to the region of (dx1,dy1) to (dx2,dy2). If x1=y1=x2=y2=-1, the whole [filename] is copied and resized.
8414 bpr 34
:crosshair x1,y1,[color]
35
 
36
 draw a crosshair point at (x1,y1)
37
:crosshairs [color], x1,y1,x2,y2,...
38
 
39
 draw multiple crosshair points at given coordinates (x1,y1), (x2,y2), ...
40
:crosshairsize w
41
 
42
 Set crosshair size to w (in pixels).
43
 
10 reyssat 44
:darrow x1,y1,x2,y2,l,[color]
45
 dasharrow dashedarrow
46
 Dashed arrow (x1,y1)- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
1024 bpr 47
:darrow2 x1,y1,x2,y2,l,[color]
48
 dasharrow2 dashedarrow2
49
 Two sided dashed arrow (x1,y1)<- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
10 reyssat 50
:dhline x,y,[color]
1502 bpr 51
dashedhorizontalline dashhorizontalline hdline horizontaldashedline
52
  Dashed horizontal line through (x,y).
10 reyssat 53
:diamondfill x,y,nx,ny,[color]
54
 diafill
55
 Flood fill the region containing (x,y) with the same original color by double hatching (parallel lines), (nx,ny) being the horizontal and vertical distance between adjacent lines (in pixels).
8414 bpr 56
:dsegment x1,y1,x2,y2,[color]
57
 dashsegment
10 reyssat 58
 Dashed line segment (x1,y1)---(x2,y2).
59
:dlines [color],x1,y1,x2,y2,x3,y3...
60
 dashedlines dashlines
61
 n dashed line segments (x1,y1)---(x2,y2)---(x3,y3)...
62
:dotfill x,y,nx,ny,[color]
63
 pointfill diskfill
64
 Flood fill the region containing (x,y) with the same original color by (fat) dots at each (nx,ny) pixels.
65
:dvline x,y,[color]
66
 dashedverticaline dashverticalline vdline verticaldashedline
67
 Dashed vertical line through (x,y).
68
:ellipse x,y,w,h,[color]
69
 
70
 Ellipse with center (x,y), width w and height h.
71
:fcircle x,y,d,[color]
72
 ball disk filledcircle
73
 Filled circle of center (x,y) and diameter d (in pixels).
74
:fellipse x,y,w,h,[color]
75
 filledellipse
76
 Filled ellipse with center (x,y), width w and height h.
77
:fill x,y,[color]
78
 flood floodfill
79
 Flood fill the region containing (x,y) with the same original color, by color.
80
:filltoborder x,y,[color1],[color2]
81
 
82
 Flood fill by color2 the region containing (x,y) and bounded by color1.
83
:fpoly [color],x1,y1,x2,y2,x3,y3...
84
 filledpoly filledpolygon fpolygon
85
 Filled polygon (x1,y1)-(x2,y2)-(x3,y3)...
86
:frect x1,y1,x2,y2,[color]
87
 filledrect fillecrectangle frectangle
88
 Filled rectangle with corners (x1,y1) and (x2,y2).
89
:fsquare x,y,s,[color]
90
 filledsquare
91
 Filled square with sides s (in pixels) and first corner at (x,y).
92
:ftriangle x1,y1,x2,y2,x3,y3,[color]
93
 filledtriangle
94
 Filled triangle with vertices (x1,y1),(x2,y2),(x3,y3).
95
:gridfill x,y,nx,ny,[color]
96
 
97
 Flood fill the region containing (x,y) with the same original color by a grid of horizontal and vertical lines with distance (nx,ny) (in pixels).
98
:hatchfill x,y,nx,ny,[color]
99
 
100
 Flood fill the region containing (x,y) with the same original color by hatching (parallel lines), (nx,ny) being the horizontal and vertical displacement of adjacent lines (in pixels).
101
:hline x,y,[color]
102
 horizontalline
103
 Horizontal line through (x,y).
104
:interlace
105
 
106
 Set interlaced image
107
:killaffine
108
 
109
 Reset affine transformation to identity.
110
:killbrush
111
 
112
 Turns off brush selection for line drawing.
113
:killlinear
4879 bpr 114
 killrotation killrotate
10 reyssat 115
 Reset linear transformation to identity.
116
:killtile
117
 
118
 Turns off tile selection for filling.
119
:killtranslation
120
 killtranslate
121
 Reset translation to identity.
122
:lattice x0,y0,x1,y1,x2,y2,n1,n2,[color]
123
 
124
 A lattice of n1xn2 points starting with (x0,y0), with n1 rows in direction of (x1,y1) and n2 rows in direction of (x2,y2).
125
:levelcurve [color],expression,l1,l2,...
126
 
127
 Draws level curves for expression, with levels l1, l2,...
128
:levelstep n
129
 
130
 Set the number of pixel steps in levelcurve plotting. Between 1 and 16, defaults to 4.
131
:linear a,b,c,d
132
 
277 reyssat 133
 Make a linear transformation for the subsequent objects: (x;y) -> [a,b;c,d](x;y).
8520 bpr 134
:polyline [color],x1,y1,x2,y2,x3,y3...
135
 lines (deprecated)
10 reyssat 136
 n line segments (x1,y1)---(x2,y2)---(x3,y3)...
137
:linewidth w
138
 
139
 Set line width to w (in pixels) for line drawing.
140
:multicopy n1,n2,...,nk, [filename]
141
 
142
Copy the image [filename] in the parallelogram given by parallelogram command (with deformation) and apply to it the transformations n_1, ..., n_k (up to 19). If no n1 ... are given, all the transformations are applied. So setparallelogram and some setvector or setmatrix or settransform must be previously defined.
143
:new x,y
144
 
145
 Set a new image of size x,y.
146
:output [filename]
147
 
148
 Output the current image to [filename].
149
:parallel x1,y1,x2,y2,xv,yv,n,[color]
150
 
151
 n parallel lines starting from (x1,y1)---(x2,y2), with displacement (xv,yv).
152
:pixels [color],x1,y1,x2,y2,...
153
 
154
 Points (all of diameter 1) at (x1,y1), (x2,y2), ...
155
:plot [color],[formula]
156
 curve
157
 Plot a curve according to [formula] which can be either an explicit function of x, or a pair of parametric functions in t.
158
:plotjump j
159
 
236 reyssat 160
 Plotted curve will jump if two consecutive points have distance more than j pixels. Useful to avoid plotting discontinuous functions as continuous. Default value: 200.
10 reyssat 161
:plotstep n
162
 plotsteps tstep tsteps
163
 Set the number of point computations in curve plot. Defaults to 100.
164
:point x,y,[color]
165
 
166
 A (fat) point at (x,y), whose diameter is equal to linewidth.
167
:points [color],x1,y1,x2,y2,...
168
 
169
 (Fat) points at (x1,y1), (x2,y2), ..., whose diameters are equal to linewidth.
7353 bpr 170
:polygon [color],x1,y1,x2,y2,x3,y3...
171
 poly
10 reyssat 172
 Polygon (x1,y1)-(x2,y2)-(x3,y3)...
173
:range x1,x2,y1,y2
174
 
175
 Set the drawing range to [x1,x2] horizontally and [y1,y2] vertically. Note that by default, horizontal range is [0,xsize-1] and vertical range is [ysize-1,0].
176
:rays [color],x0,y0,x1,y1,x2,y2...
177
 
178
 Line segments (x0,y0)---(x1,y1), (x0,y0)---(x2,y2), ...
179
:rect x1,y1,x2,y2,[color]
180
 rectangle
181
 Rectangle with corners (x1,y1) and (x2,y2).
182
:resetmatrix n
183
 
184
Reset n-th linear or affine transformation to identity.
185
:resetparallelogram
186
 
187
kill setparallelogram
188
:resetvector n
189
 
190
Reset n-th translation to identity.
191
:resettransform n
192
 
193
Reset n-th linear, affine transformation and n-th translation to initial values (identity or null vector).
194
:rotation d
195
 rotate
277 reyssat 196
 Make a rotation of degree d counter-clockwise (centered at (0,0)), for the subsequent objects.
8414 bpr 197
:segment x1,y1,x2,y2,[color]
8540 bpr 198
 seg line (deprecated)
8414 bpr 199
 Line segment (x1,y1)---(x2,y2).
200
 
10 reyssat 201
:setbrush [filename]
202
 
203
 Use the image [filename] as a brush for all line draws.
1502 bpr 204
:setmatrix n,a,b,c,d
205
 
206
Make the n-th linear transformation for multicopy objects: (x;y) -> [a,b;c,d](x;y).
4103 bpr 207
:setparallelogram xs,ys,xu,yu,xv,yv
1502 bpr 208
 
209
Prepare the place where the image will be copied by multicopy (mathematical coordinates) : xs,ys mathematical coordinates of the origin point, xu,yu mathematical coordinates of the "horizontal line of the image" to copy, xv,yv mathematical coordinates of the "verticale line of the image" to copy.
10 reyssat 210
:setpixel x,y,[color]
211
 
212
 A point (of diameter 1 pixel) at (x,y).
213
:setstyle [color1],[color2],...
214
 
215
 Set the line style to color1,color2,...
216
:settile [filename]
217
 
218
 Use the image [filename] as a tile for all filling commands.
219
:settransform n,a,b,c,d,tx,ty
220
 
221
Make the n-th linear transformation for multicopy objects: (x;y) -> [a,b;c,d](x;y) + (tx;ty). (settransform n,a,b,c,d,tx,ty is equivalent to setmatrix n,a,b,c,d and setvector n,tx,ty, so it kills a previous definition setmatrix n,a,b,c,d with the  same number n).
222
:setvector n,tx,ty
223
 
224
Make the n-th translation for multicopy objects: (x;y) -> (tx,ty).
225
:size x,y
226
 
227
 Set the image size to x pixels horizontally and y pixels vertically.
228
:square x,y,s,[color]
229
 
230
 Square with sides s (in pixels) and first corner at (x,y).
231
:text [color],x,y,[font],[string]
232
 print string write
233
 Write the string at (x,y), with font=small,medium,large or giant.
234
:textup [color],x,y,[font],[string]
235
 stringup writeup
236
 Write upwards the string at (x,y), with font=small,medium,large or giant.
237
:trange t1,t2
238
 ranget
239
 Set the t range to [t1,t2] for parametric curve plotting. Defaults to [0,1].
240
:translation tx,ty
241
 translate
277 reyssat 242
 Make a translation for the subsequent objects: (x;y) -> (x;y)+(tx;ty).
10 reyssat 243
:transparent [color]
244
 
245
 Makes [color] a transparent color.
246
:triangle x1,y1,x2,y2,x3,y3,[color]
247
 
248
 Triangle with vertices (x1,y1),(x2,y2),(x3,y3).
1024 bpr 249
:vimg n
250
 
251
 Enable (1) or disable (0) vector graphics output.
252
:vimgfile [filename]
253
 
254
 Direct vector graphics output (currently DXF only) to [filename].
10 reyssat 255
:vline x,y,[color]
256
 verticalline
257
 Vertical line through (x,y).
258
:xrange x1,x2
259
 rangex
260
 Set the horizontal drawing range to [x1,x2]. Defaults to [0,xsize-1].
261
:yrange y1,y2
262
 rangey
263
 Set the horizontal drawing range to [y1,y2]. Defaults to [ysize-1,0].