Subversion Repositories wimsdev

Rev

Rev 18533 | 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
 
16344 bpr 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.
10 reyssat 13
:arc x,y,w,h,a1,a2,[color]
14
 
18352 bpr 15
 Arc segment of an ellipse of width w and hight h centered at (x,y), from angle a1 to angle a2 (in degrees) counterclockwise. It is recommended to take x to ensure compatibility with canvasdraw.
10 reyssat 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.
18048 bpr 22
:arrows [color],l,x1,y1,x2,y2,x3,y3,x4,y4,...
23
 
18463 bpr 24
 Arrow (x1,y1)--->(x2,y2), (x3;y3)--->(x4;y4) where l is the length (in pixels) of arrowhead.
18048 bpr 25
:arrows2 [color],l,x1,y1,x2,y2,x3,y3,x4,y4,...
26
 
18463 bpr 27
 Two sided arrow (x1,y1)<--->(x2,y2), (x3;y3)<--->(x4;y4) where l is the length (in pixels) of arrowhead.
18253 czzmrn 28
:circle x,y,r,[color]
10 reyssat 29
 
18253 czzmrn 30
 Circle of center (x,y) and radius r (in pixels).
18251 bpr 31
:circles [color],x1,y1,r1,x2,y2,r2 ...
17658 bpr 32
 
18463 bpr 33
 Circles of center (x1;y1) and radius r1 (according to xrange) ...
10 reyssat 34
:comment
8414 bpr 35
 
10 reyssat 36
 Does nothing.
37
:copy x,y,x1,y1,x2,y2,[filename]
38
 insert
4411 bpr 39
 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 40
:copyresized x1,y1,x2,y2,dx1,dy1,dx2,dy2,[filename]
41
 
42
 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 43
:crosshair x1,y1,[color]
44
 
45
 draw a crosshair point at (x1,y1)
46
:crosshairs [color], x1,y1,x2,y2,...
47
 
48
 draw multiple crosshair points at given coordinates (x1,y1), (x2,y2), ...
49
:crosshairsize w
50
 
51
 Set crosshair size to w (in pixels).
18161 bpr 52
:dashed
8414 bpr 53
 
18463 bpr 54
 Keyword: Indique que la commande suivante est en pointillés si cette possibilité existe pour cette commande.
18076 bpr 55
:dashhalfline x1,y1,x2,y2,[color]
56
 
18463 bpr 57
 Dashed halfline from (x1;y1) through (x2; y2).
10 reyssat 58
:darrow x1,y1,x2,y2,l,[color]
59
 dasharrow dashedarrow
60
 Dashed arrow (x1,y1)- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
1024 bpr 61
:darrow2 x1,y1,x2,y2,l,[color]
16344 bpr 62
dasharrow2 dashedarrow2
1024 bpr 63
 Two sided dashed arrow (x1,y1)<- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
18063 bpr 64
:darrows [color],l,x1,y1,x2,y2,x3,y3,x4,y4,...
65
 
18463 bpr 66
 Dashed arrow from (x1;y1) to (x2;y2), from(x3;y3 ) to (x4;y4) where l is the length (in pixels) of arrowhead.
18063 bpr 67
:darrows2 [color],l,x1,y1,x2,y2,x3,y3,x4,y4,...
68
 
18463 bpr 69
 Dashed arrow from (x1;y1) to (x2;y2), from(x3;y3 ) to (x4;y4) where l is the length (in pixels) of the two arrowheads.
18161 bpr 70
:dashhalfline x1,y1,x2,y2,[color]
71
 
18463 bpr 72
 Halfline from (x1; y1) through (x2; y2).
10 reyssat 73
:dhline x,y,[color]
1502 bpr 74
dashedhorizontalline dashhorizontalline hdline horizontaldashedline
18524 bpr 75
 Dashed horizontal line through (x,y).
10 reyssat 76
:diamondfill x,y,nx,ny,[color]
77
 diafill
78
 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).
18352 bpr 79
:dline x1,y1,x2,y2,[color]
80
 dashedline dashline
18463 bpr 81
 Dashed line through (x1; y1) et (x2; y2).
18352 bpr 82
:dlines [color],x1,y1,x2,y2,x3,y3...
83
 dashedlines dashlines
18524 bpr 84
 Dashed line through (x1;y1) and (x2;y2), (x3;y3) and (x4;y4) etc.
18063 bpr 85
:dpolyline [color],x1,y1,x2,y2,x3,y3...
86
 
10 reyssat 87
 n dashed line segments (x1,y1)---(x2,y2)---(x3,y3)...
88
:dotfill x,y,nx,ny,[color]
89
 pointfill diskfill
90
 Flood fill the region containing (x,y) with the same original color by (fat) dots at each (nx,ny) pixels.
16344 bpr 91
:dsegment x1,y1,x2,y2,[color]
92
 dashsegment
93
 Dashed line segment (x1,y1)---(x2,y2).
10 reyssat 94
:dvline x,y,[color]
16344 bpr 95
dashedverticaline dashverticalline vdline verticaldashedline
10 reyssat 96
 Dashed vertical line through (x,y).
97
:ellipse x,y,w,h,[color]
98
 
18161 bpr 99
Ellipse with center (x,y), width w and height h.
17658 bpr 100
:ellipses [color],x1,y1,w1,h1,x2,y2,w2,h2,...
101
 
102
Ellipse with center (x1,y1), width w1 and height h1 etc.
10 reyssat 103
:fcircle x,y,d,[color]
104
 ball disk filledcircle
105
 Filled circle of center (x,y) and diameter d (in pixels).
18257 bpr 106
:fcircles [color],x1,y1,r1,x2,y2,r2 ...
18118 bpr 107
 
18463 bpr 108
 Filled circles of center (x1;y1) and radius r1 (according to xrange) ...
10 reyssat 109
:fellipse x,y,w,h,[color]
16344 bpr 110
filledellipse
10 reyssat 111
 Filled ellipse with center (x,y), width w and height h.
18524 bpr 112
:fhypcircles [color],x1,y1,r2,x2,y2,r2,...
113
 
114
Filled hyperbolic circles of hyperbolic center (x1;y1) and hyperbolic radius r1 (according to xrange) ...
18463 bpr 115
:fhyppolygon [color],x1,y1,x2,y2,x3,y3,...
116
 
18524 bpr 117
Filled hyperbolic polygon in Poincaré disk with vertices (x1; y1), (x2; y2), (x3; y3),... (géométrie hyperbolique) et rempli avec la couleur color.
18352 bpr 118
:fhyptriangle x1,y1,x2,y2,x3,y3,[color]
119
 
18524 bpr 120
 Filled hyperbolic triangle in Poincaré disk with vertices (x1; y1), (x2; y2), (x3; y3)
10 reyssat 121
:fill x,y,[color]
16344 bpr 122
flood floodfill
10 reyssat 123
 Flood fill the region containing (x,y) with the same original color, by color.
18161 bpr 124
:filled
125
 
18463 bpr 126
Keyword: means that the following object will be filled with color, if it makes sense
10 reyssat 127
:filltoborder x,y,[color1],[color2]
128
 
129
 Flood fill by color2 the region containing (x,y) and bounded by color1.
130
:fpoly [color],x1,y1,x2,y2,x3,y3...
131
 filledpoly filledpolygon fpolygon
18063 bpr 132
 Filled polygon (x1,y1)--(x2,y2)--(x3,y3)...
10 reyssat 133
:frect x1,y1,x2,y2,[color]
134
 filledrect fillecrectangle frectangle
135
 Filled rectangle with corners (x1,y1) and (x2,y2).
136
:fsquare x,y,s,[color]
16344 bpr 137
filledsquare
10 reyssat 138
 Filled square with sides s (in pixels) and first corner at (x,y).
139
:ftriangle x1,y1,x2,y2,x3,y3,[color]
18063 bpr 140
filledtriangle
10 reyssat 141
 Filled triangle with vertices (x1,y1),(x2,y2),(x3,y3).
142
:gridfill x,y,nx,ny,[color]
143
 
144
 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).
18075 bpr 145
:halfline x1,y1,x2,y2,[color]
146
 
147
Halfline from (x1; y1) through (x2; y2).
10 reyssat 148
:hatchfill x,y,nx,ny,[color]
149
 
150
 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).
151
:hline x,y,[color]
16344 bpr 152
horizontalline
10 reyssat 153
 Horizontal line through (x,y).
18668 bpr 154
:hlines [color],x1,y1,x2,y2,...
155
 
156
 Horizontal lines through (x1,y1), (x2,y2), ...
157
 
18524 bpr 158
:hypcircles [color],x1,y1,r2,x2,y2,r2,...
159
 
160
Hyperbolic circles of hyperbolic center (x1;y1) and hyperbolic radius r1 (according to xrange) ...
161
 
18352 bpr 162
:hyplines [color],x1,y1,x2,y2,x3,y3,x4,y4, ...
163
 
18463 bpr 164
Hyperbolic lines in Poincaré disk through (x1; y1) and (x2; y2), (x3; y3) and (x4; y4), ...
165
:hyppolygon [color],x1,y1,x2,y2,x3,y3,...
166
 
167
Hyperbolic polygon in Poincaré disk (x1,y1)-(x2,y2)-(x3,y3)... in Poincaré disk
18533 bpr 168
:hyprays [color],x0,y0,x1,y1,x2,y2,x3,y3,x4,y4, ...
169
 
170
hyperbolic segments (x0,y0)---(x1,y1), (x0,y0)---(x2,y2), ...
18352 bpr 171
:hypsegments [color],x1,y1,x2,y2,x3,y3,x4,y4, ...
172
 
18463 bpr 173
Hyperbolic segments in Poincaré disk between (x1; y1) and (x2; y2), (x3; y3) and (x4; y4), etc
18352 bpr 174
:hyptriangle x1,y1,x2,y2,x3,y3,[color]
175
 
18463 bpr 176
Hyperbolic triangle with vertices (x1; y1), (x2; y2), (x3; y3)
10 reyssat 177
:interlace
178
 
16344 bpr 179
Set interlaced image
10 reyssat 180
:killaffine
181
 
182
 Reset affine transformation to identity.
183
:killbrush
184
 
18063 bpr 185
Turns off brush selection for line drawing.
10 reyssat 186
:killlinear
16344 bpr 187
killrotation killrotate
10 reyssat 188
 Reset linear transformation to identity.
189
:killtile
190
 
191
 Turns off tile selection for filling.
192
:killtranslation
16344 bpr 193
killtranslate
10 reyssat 194
 Reset translation to identity.
195
:lattice x0,y0,x1,y1,x2,y2,n1,n2,[color]
196
 
197
 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).
18161 bpr 198
:levelcurve [color],[expression],l1,l2,...
10 reyssat 199
 
200
 Draws level curves for expression, with levels l1, l2,...
201
:levelstep n
202
 
18668 bpr 203
 Set the number of pixel steps in levelcurve plotting. Between 1 and 16, default to 4.
18352 bpr 204
:lines [color],x1,y1,x2,y2,x3,y3,x4,y4, ...
205
 
18463 bpr 206
 Lines through  the points (x1; y1) and (x2; y2), (x3; y3) and (x4; y4), etc
10 reyssat 207
:linear a,b,c,d
208
 
277 reyssat 209
 Make a linear transformation for the subsequent objects: (x;y) -> [a,b;c,d](x;y).
10 reyssat 210
:linewidth w
211
 
212
 Set line width to w (in pixels) for line drawing.
213
:multicopy n1,n2,...,nk, [filename]
214
 
215
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.
216
:new x,y
217
 
218
 Set a new image of size x,y.
18161 bpr 219
:noreset
220
 
18463 bpr 221
 keyword: if it is followed by dashed or filled, the following commands are dashed or filled, up to the command reset
10 reyssat 222
:output [filename]
223
 
224
 Output the current image to [filename].
225
:parallel x1,y1,x2,y2,xv,yv,n,[color]
226
 
18063 bpr 227
 n parallel segments starting from (x1,y1)---(x2,y2), with displacement (xv,yv).
10 reyssat 228
:pixels [color],x1,y1,x2,y2,...
229
 
230
 Points (all of diameter 1) at (x1,y1), (x2,y2), ...
231
:plot [color],[formula]
16344 bpr 232
curve
10 reyssat 233
 Plot a curve according to [formula] which can be either an explicit function of x, or a pair of parametric functions in t.
234
:plotjump j
235
 
236 reyssat 236
 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 237
:plotstep n
16344 bpr 238
plotsteps tstep tsteps
10 reyssat 239
 Set the number of point computations in curve plot. Defaults to 100.
240
:point x,y,[color]
241
 
242
 A (fat) point at (x,y), whose diameter is equal to linewidth.
243
:points [color],x1,y1,x2,y2,...
244
 
245
 (Fat) points at (x1,y1), (x2,y2), ..., whose diameters are equal to linewidth.
7353 bpr 246
:polygon [color],x1,y1,x2,y2,x3,y3...
16344 bpr 247
poly
10 reyssat 248
 Polygon (x1,y1)-(x2,y2)-(x3,y3)...
16344 bpr 249
:polyline [color],x1,y1,x2,y2,x3,y3...
18063 bpr 250
brokenline
16344 bpr 251
 n line segments (x1,y1)---(x2,y2)---(x3,y3)...
10 reyssat 252
:range x1,x2,y1,y2
253
 
254
 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].
255
:rays [color],x0,y0,x1,y1,x2,y2...
256
 
257
 Line segments (x0,y0)---(x1,y1), (x0,y0)---(x2,y2), ...
258
:rect x1,y1,x2,y2,[color]
259
 rectangle
260
 Rectangle with corners (x1,y1) and (x2,y2).
18161 bpr 261
:reset
262
 
263
Keyword: reset the command "noreset"
10 reyssat 264
:resetmatrix n
265
 
266
Reset n-th linear or affine transformation to identity.
267
:resetparallelogram
268
 
269
kill setparallelogram
270
:resetvector n
271
 
272
Reset n-th translation to identity.
273
:resettransform n
274
 
275
Reset n-th linear, affine transformation and n-th translation to initial values (identity or null vector).
276
:rotation d
277
 rotate
277 reyssat 278
 Make a rotation of degree d counter-clockwise (centered at (0,0)), for the subsequent objects.
8414 bpr 279
:segment x1,y1,x2,y2,[color]
18063 bpr 280
 seg
8414 bpr 281
 Line segment (x1,y1)---(x2,y2).
16344 bpr 282
:segments [color],x1,y1,x2,y2,x3,y3,x4,y4, ...
8414 bpr 283
 
16344 bpr 284
Line segments (x1; y1)---(x2; y2), (x3; y3)---(x4; y4), ...
10 reyssat 285
:setbrush [filename]
286
 
287
 Use the image [filename] as a brush for all line draws.
1502 bpr 288
:setmatrix n,a,b,c,d
289
 
290
Make the n-th linear transformation for multicopy objects: (x;y) -> [a,b;c,d](x;y).
4103 bpr 291
:setparallelogram xs,ys,xu,yu,xv,yv
1502 bpr 292
 
293
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 294
:setpixel x,y,[color]
295
 
296
 A point (of diameter 1 pixel) at (x,y).
297
:setstyle [color1],[color2],...
298
 
299
 Set the line style to color1,color2,...
300
:settile [filename]
301
 
302
 Use the image [filename] as a tile for all filling commands.
303
:settransform n,a,b,c,d,tx,ty
304
 
305
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).
306
:setvector n,tx,ty
307
 
308
Make the n-th translation for multicopy objects: (x;y) -> (tx,ty).
309
:size x,y
310
 
311
 Set the image size to x pixels horizontally and y pixels vertically.
312
:square x,y,s,[color]
313
 
314
 Square with sides s (in pixels) and first corner at (x,y).
315
:text [color],x,y,[font],[string]
16344 bpr 316
print string write
10 reyssat 317
 Write the string at (x,y), with font=small,medium,large or giant.
318
:textup [color],x,y,[font],[string]
16344 bpr 319
stringup writeup
10 reyssat 320
 Write upwards the string at (x,y), with font=small,medium,large or giant.
321
:trange t1,t2
322
 ranget
323
 Set the t range to [t1,t2] for parametric curve plotting. Defaults to [0,1].
324
:translation tx,ty
16344 bpr 325
translate
277 reyssat 326
 Make a translation for the subsequent objects: (x;y) -> (x;y)+(tx;ty).
10 reyssat 327
:transparent [color]
328
 
329
 Makes [color] a transparent color.
330
:triangle x1,y1,x2,y2,x3,y3,[color]
331
 
332
 Triangle with vertices (x1,y1),(x2,y2),(x3,y3).
1024 bpr 333
:vimg n
334
 
335
 Enable (1) or disable (0) vector graphics output.
336
:vimgfile [filename]
337
 
338
 Direct vector graphics output (currently DXF only) to [filename].
10 reyssat 339
:vline x,y,[color]
16344 bpr 340
verticalline
10 reyssat 341
 Vertical line through (x,y).
18668 bpr 342
:vlines [color],x1,y1,x2,y2,...
343
 
344
 Vertical line through (x1;y1), (x2;y2), ...
10 reyssat 345
:xrange x1,x2
346
 rangex
347
 Set the horizontal drawing range to [x1,x2]. Defaults to [0,xsize-1].
348
:yrange y1,y2
349
 rangey
350
 Set the horizontal drawing range to [y1,y2]. Defaults to [ysize-1,0].