Subversion Repositories wimsdev

Rev

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