Subversion Repositories wimsdev

Rev

Rev 17658 | Rev 18048 | 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
 
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
 
17915 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.
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.
10 reyssat 22
:circle x,y,d,[color]
23
 
24
 Circle of center (x,y) and diameter d (in pixels).
17658 bpr 25
:circles [color],x1,y1,d1,x2,y2,d2 ...
26
 
27
Circles of center (x1;y1) and diameter d1 (according to xrange) ...
10 reyssat 28
:comment
8414 bpr 29
 
10 reyssat 30
 Does nothing.
31
:copy x,y,x1,y1,x2,y2,[filename]
32
 insert
4411 bpr 33
 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 34
:copyresized x1,y1,x2,y2,dx1,dy1,dx2,dy2,[filename]
35
 
36
 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 37
:crosshair x1,y1,[color]
38
 
39
 draw a crosshair point at (x1,y1)
40
:crosshairs [color], x1,y1,x2,y2,...
41
 
42
 draw multiple crosshair points at given coordinates (x1,y1), (x2,y2), ...
43
:crosshairsize w
44
 
45
 Set crosshair size to w (in pixels).
46
 
10 reyssat 47
:darrow x1,y1,x2,y2,l,[color]
48
 dasharrow dashedarrow
49
 Dashed arrow (x1,y1)- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
1024 bpr 50
:darrow2 x1,y1,x2,y2,l,[color]
16344 bpr 51
dasharrow2 dashedarrow2
1024 bpr 52
 Two sided dashed arrow (x1,y1)<- - ->(x2,y2), where l is the length (in pixels) of arrowhead.
10 reyssat 53
:dhline x,y,[color]
1502 bpr 54
dashedhorizontalline dashhorizontalline hdline horizontaldashedline
55
  Dashed horizontal line through (x,y).
10 reyssat 56
:diamondfill x,y,nx,ny,[color]
57
 diafill
58
 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).
16344 bpr 59
:dline x1,y1,x2,y2,[color]
60
 dashedline dashline
61
Segment en pointillés entre les points de coordonnées (x1; y1) et (x2; y2).
10 reyssat 62
:dlines [color],x1,y1,x2,y2,x3,y3...
63
 dashedlines dashlines
64
 n dashed line segments (x1,y1)---(x2,y2)---(x3,y3)...
65
:dotfill x,y,nx,ny,[color]
66
 pointfill diskfill
67
 Flood fill the region containing (x,y) with the same original color by (fat) dots at each (nx,ny) pixels.
16344 bpr 68
:dsegment x1,y1,x2,y2,[color]
69
 dashsegment
70
 Dashed line segment (x1,y1)---(x2,y2).
10 reyssat 71
:dvline x,y,[color]
16344 bpr 72
dashedverticaline dashverticalline vdline verticaldashedline
10 reyssat 73
 Dashed vertical line through (x,y).
74
:ellipse x,y,w,h,[color]
75
 
76
 Ellipse with center (x,y), width w and height h.
17658 bpr 77
:ellipses [color],x1,y1,w1,h1,x2,y2,w2,h2,...
78
 
79
Ellipse with center (x1,y1), width w1 and height h1 etc.
10 reyssat 80
:fcircle x,y,d,[color]
81
 ball disk filledcircle
82
 Filled circle of center (x,y) and diameter d (in pixels).
83
:fellipse x,y,w,h,[color]
16344 bpr 84
filledellipse
10 reyssat 85
 Filled ellipse with center (x,y), width w and height h.
86
:fill x,y,[color]
16344 bpr 87
flood floodfill
10 reyssat 88
 Flood fill the region containing (x,y) with the same original color, by color.
89
:filltoborder x,y,[color1],[color2]
90
 
91
 Flood fill by color2 the region containing (x,y) and bounded by color1.
92
:fpoly [color],x1,y1,x2,y2,x3,y3...
93
 filledpoly filledpolygon fpolygon
94
 Filled polygon (x1,y1)-(x2,y2)-(x3,y3)...
95
:frect x1,y1,x2,y2,[color]
96
 filledrect fillecrectangle frectangle
97
 Filled rectangle with corners (x1,y1) and (x2,y2).
98
:fsquare x,y,s,[color]
16344 bpr 99
filledsquare
10 reyssat 100
 Filled square with sides s (in pixels) and first corner at (x,y).
101
:ftriangle x1,y1,x2,y2,x3,y3,[color]
102
 filledtriangle
103
 Filled triangle with vertices (x1,y1),(x2,y2),(x3,y3).
104
:gridfill x,y,nx,ny,[color]
105
 
106
 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).
107
:hatchfill x,y,nx,ny,[color]
108
 
109
 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).
110
:hline x,y,[color]
16344 bpr 111
horizontalline
10 reyssat 112
 Horizontal line through (x,y).
113
:interlace
114
 
16344 bpr 115
Set interlaced image
10 reyssat 116
:killaffine
117
 
118
 Reset affine transformation to identity.
119
:killbrush
120
 
121
 Turns off brush selection for line drawing.
122
:killlinear
16344 bpr 123
killrotation killrotate
10 reyssat 124
 Reset linear transformation to identity.
125
:killtile
126
 
127
 Turns off tile selection for filling.
128
:killtranslation
16344 bpr 129
killtranslate
10 reyssat 130
 Reset translation to identity.
131
:lattice x0,y0,x1,y1,x2,y2,n1,n2,[color]
132
 
133
 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).
134
:levelcurve [color],expression,l1,l2,...
135
 
136
 Draws level curves for expression, with levels l1, l2,...
137
:levelstep n
138
 
139
 Set the number of pixel steps in levelcurve plotting. Between 1 and 16, defaults to 4.
140
:linear a,b,c,d
141
 
277 reyssat 142
 Make a linear transformation for the subsequent objects: (x;y) -> [a,b;c,d](x;y).
10 reyssat 143
:linewidth w
144
 
145
 Set line width to w (in pixels) for line drawing.
146
:multicopy n1,n2,...,nk, [filename]
147
 
148
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.
149
:new x,y
150
 
151
 Set a new image of size x,y.
152
:output [filename]
153
 
154
 Output the current image to [filename].
155
:parallel x1,y1,x2,y2,xv,yv,n,[color]
156
 
157
 n parallel lines starting from (x1,y1)---(x2,y2), with displacement (xv,yv).
158
:pixels [color],x1,y1,x2,y2,...
159
 
160
 Points (all of diameter 1) at (x1,y1), (x2,y2), ...
161
:plot [color],[formula]
16344 bpr 162
curve
10 reyssat 163
 Plot a curve according to [formula] which can be either an explicit function of x, or a pair of parametric functions in t.
164
:plotjump j
165
 
236 reyssat 166
 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 167
:plotstep n
16344 bpr 168
plotsteps tstep tsteps
10 reyssat 169
 Set the number of point computations in curve plot. Defaults to 100.
170
:point x,y,[color]
171
 
172
 A (fat) point at (x,y), whose diameter is equal to linewidth.
173
:points [color],x1,y1,x2,y2,...
174
 
175
 (Fat) points at (x1,y1), (x2,y2), ..., whose diameters are equal to linewidth.
7353 bpr 176
:polygon [color],x1,y1,x2,y2,x3,y3...
16344 bpr 177
poly
10 reyssat 178
 Polygon (x1,y1)-(x2,y2)-(x3,y3)...
16344 bpr 179
:polyline [color],x1,y1,x2,y2,x3,y3...
17570 bpr 180
brokenline lines:deprecated
16344 bpr 181
 n line segments (x1,y1)---(x2,y2)---(x3,y3)...
10 reyssat 182
:range x1,x2,y1,y2
183
 
184
 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].
185
:rays [color],x0,y0,x1,y1,x2,y2...
186
 
187
 Line segments (x0,y0)---(x1,y1), (x0,y0)---(x2,y2), ...
188
:rect x1,y1,x2,y2,[color]
189
 rectangle
190
 Rectangle with corners (x1,y1) and (x2,y2).
191
:resetmatrix n
192
 
193
Reset n-th linear or affine transformation to identity.
194
:resetparallelogram
195
 
196
kill setparallelogram
197
:resetvector n
198
 
199
Reset n-th translation to identity.
200
:resettransform n
201
 
202
Reset n-th linear, affine transformation and n-th translation to initial values (identity or null vector).
203
:rotation d
204
 rotate
277 reyssat 205
 Make a rotation of degree d counter-clockwise (centered at (0,0)), for the subsequent objects.
8414 bpr 206
:segment x1,y1,x2,y2,[color]
17570 bpr 207
 seg line:deprecated
8414 bpr 208
 Line segment (x1,y1)---(x2,y2).
16344 bpr 209
:segments [color],x1,y1,x2,y2,x3,y3,x4,y4, ...
8414 bpr 210
 
16344 bpr 211
Line segments (x1; y1)---(x2; y2), (x3; y3)---(x4; y4), ...
10 reyssat 212
:setbrush [filename]
213
 
214
 Use the image [filename] as a brush for all line draws.
1502 bpr 215
:setmatrix n,a,b,c,d
216
 
217
Make the n-th linear transformation for multicopy objects: (x;y) -> [a,b;c,d](x;y).
4103 bpr 218
:setparallelogram xs,ys,xu,yu,xv,yv
1502 bpr 219
 
220
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 221
:setpixel x,y,[color]
222
 
223
 A point (of diameter 1 pixel) at (x,y).
224
:setstyle [color1],[color2],...
225
 
226
 Set the line style to color1,color2,...
227
:settile [filename]
228
 
229
 Use the image [filename] as a tile for all filling commands.
230
:settransform n,a,b,c,d,tx,ty
231
 
232
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).
233
:setvector n,tx,ty
234
 
235
Make the n-th translation for multicopy objects: (x;y) -> (tx,ty).
236
:size x,y
237
 
238
 Set the image size to x pixels horizontally and y pixels vertically.
239
:square x,y,s,[color]
240
 
241
 Square with sides s (in pixels) and first corner at (x,y).
242
:text [color],x,y,[font],[string]
16344 bpr 243
print string write
10 reyssat 244
 Write the string at (x,y), with font=small,medium,large or giant.
245
:textup [color],x,y,[font],[string]
16344 bpr 246
stringup writeup
10 reyssat 247
 Write upwards the string at (x,y), with font=small,medium,large or giant.
248
:trange t1,t2
249
 ranget
250
 Set the t range to [t1,t2] for parametric curve plotting. Defaults to [0,1].
251
:translation tx,ty
16344 bpr 252
translate
277 reyssat 253
 Make a translation for the subsequent objects: (x;y) -> (x;y)+(tx;ty).
10 reyssat 254
:transparent [color]
255
 
256
 Makes [color] a transparent color.
257
:triangle x1,y1,x2,y2,x3,y3,[color]
258
 
259
 Triangle with vertices (x1,y1),(x2,y2),(x3,y3).
1024 bpr 260
:vimg n
261
 
262
 Enable (1) or disable (0) vector graphics output.
263
:vimgfile [filename]
264
 
265
 Direct vector graphics output (currently DXF only) to [filename].
10 reyssat 266
:vline x,y,[color]
16344 bpr 267
verticalline
10 reyssat 268
 Vertical line through (x,y).
269
:xrange x1,x2
270
 rangex
271
 Set the horizontal drawing range to [x1,x2]. Defaults to [0,xsize-1].
272
:yrange y1,y2
273
 rangey
274
 Set the horizontal drawing range to [y1,y2]. Defaults to [ysize-1,0].