Subversion Repositories wimsdev

Rev

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