"Fossies" - the Fresh Open Source Software Archive 
Member "fly-2.0.1/examples/jpeg/test.fly" (25 Nov 2001, 4885 Bytes) of package /linux/www/old/fly-2.0.1.tar.gz:
As a special service "Fossies" has tried to format the requested text file into HTML format (style:
standard) with prefixed line numbers.
Alternatively you can here
view or
download the uninterpreted source code file.
1 new
2 #
3 size 256,256
4 type jpeg
5 name temp.jpeg
6
7 # background fill, all white
8 fill 1,1,255,255,255
9
10 # line from top to bottom, 50 pixels from left edge, colour black
11 line 50,0,50,255,0,0,0
12
13 # fill in the left region a revolting pastel green
14 filltoborder 20,20,0,0,0,0,255,127
15
16 # a simple dashed line, 100 from the left edge
17 dline 100,0,100,255,0,0,0
18
19 # a rectangle and a filled one, near the middle
20 rect 25,105,75,145,255,69,0
21 frect 125,105,175,145,105,139,105
22
23 # a big red square
24 square 25,25,75,255,69,0
25
26 # a small red square, filled this time
27 fsquare 25,165,50,255,69,0
28
29 # fill the right hand side of the small rectangle with white
30 fill 70,140,255,255,255
31
32 # fill the background of the right side of the image with a mid blue
33 fill 250,250,178,192,220
34
35 # a couple of polygons - one filled, one not
36 fpoly 255,69,0,210,5,220,5,230,20,230,50,225,45,215,40,210,5
37 poly 105,139,105,110,5,120,5,130,20,130,50,125,45,115,40,110,5
38
39 # concentric circles creating a thick-bordered circle
40 circle 100,125,30,255,165,0
41 circle 100,125,31,255,165,0
42 circle 100,125,32,255,165,0
43 circle 100,125,33,255,165,0
44 circle 100,125,34,255,165,0
45 circle 100,125,35,255,165,0
46
47 # a filled circle
48 fcircle 200,125,30,72,61,139
49
50 # fill the first circle with an offensive blue
51 fill 105,125,151,255,255
52
53 # just a loopy arc
54 arc 125,180,145,90,320,120,0,0,0
55
56 # Some writing: across the bottom
57 string 0,0,0,15,240,medium,Now is the time for all good folk
58 # and up the right side
59 stringup 0,0,0,240,235,medium,to come to the aid of the party.
60
61 # set a couple of pixels in the green rectangle to black
62 setpixel 130,130,0,0,0
63 setpixel 130,131,0,0,0
64 setpixel 131,130,0,0,0
65 setpixel 131,131,0,0,0
66
67 #get the colour indexes of a couple of pixels
68 getpixel 130,130
69 getpixel 131,132
70
71 # make black the transparent colour
72 transparent 0,0,0
73
74 #make the image interlaceD
75 interlace
76
77 # an example of using a style with the line command
78 setstyle 0,0,0,255,255,255,255,165,0,255,69,0,0,0,0,255,255,255
79 line 150,30,150,79,0,0,0
80 line 151,30,151,79,0,0,0
81 line 152,30,152,79,0,0,0
82 line 153,30,153,79,0,0,0
83 line 154,30,154,79,0,0,0
84 line 155,30,155,79,0,0,0
85 line 156,30,156,79,0,0,0
86 line 157,30,157,79,0,0,0
87 line 158,30,158,79,0,0,0
88 line 159,30,158,79,0,0,0
89 line 160,30,160,79,0,0,0
90 line 162,30,162,79,0,0,0
91 line 164,30,164,79,0,0,0
92 line 166,30,166,79,0,0,0
93 line 168,30,168,79,0,0,0
94 line 170,30,170,79,0,0,0
95 line 173,30,173,79,0,0,0
96 line 176,30,176,79,0,0,0
97 line 179,30,179,79,0,0,0
98 line 182,30,182,79,0,0,0
99 line 186,30,186,79,0,0,0
100 line 190,30,190,79,0,0,0
101 line 194,30,194,79,0,0,0
102 line 200,30,200,79,0,0,0
103 killstyle
104
105 # get the x and y size of the image
106 sizex
107 sizey
108
109 # That's all folks
110 end
111 #########################
112
113 # new image
114 new
115 size 128,128
116 # set the output filename
117 name foo.jpeg
118 type jpeg
119 # a black background
120 fill 1,1,0,0,0
121 # a diagonal white line top left to bottom right
122 line 0,0,127,127,255,255,255
123 end
124 #########################
125
126 # And another!!
127 new
128 size 256,256
129 # set the output filename
130 name bar.jpeg
131 type jpeg
132 # a black background
133 fill 1,1,0,0,0
134 # copy in the previous jpeg
135 copy 127,127,-1,-1,-1,-1,foo.jpeg
136 # a diagonal white line bottom left to top right
137 line 0,127,127,0,255,255,255
138 end
139
140 # And yet another!!
141 existing bar.jpeg
142 # set the output filename
143 name bar2.jpeg
144 # copy in a previous jpeg
145 copy 127,0,-1,-1,-1,-1,bar.jpeg
146 # a diagonal white line top left to bottom right
147 line 127,0,0,127,255,255,255
148 end
149
150 # And yet another!!
151 existing temp.jpeg
152 # set the output filename
153 name bar3.jpeg
154 type jpeg
155 # copy in a previous jpeg
156 copyresized -1,-1,-1,-1,20,30,30,40,`../../fly -i small-end.fly -q`
157 # a diagonal white line top left to bottom right
158 line 127,0,0,127,255,255,255
159 end
160
161 # new image
162 new
163 size 400,400
164 # set the output filename
165 name foo3.jpeg
166 type jpeg
167 # a black background
168 fill 1,1,0,0,0
169 # a diagonal white line top left to bottom right
170 line 0,0,399,399,255,255,255
171 line 399,0,399,399,255,255,255
172 ellipse 125,180,245,90,255,0,0
173 end
174 #########################
175
176 # new image
177 new
178 size 400,400
179 # set the output filename
180 name foo4.jpeg
181 type jpeg
182 # a black background
183 fill 1,1,0,0,0
184 # a diagonal white line top left to bottom right
185 line 0,0,399,399,255,255,255
186 line 399,0,399,399,255,255,255
187 ellipse 125,180,245,90,255,0,0
188 rotate 90
189
190 end
191 #########################
192
193 # new image
194 new
195 size 400,400
196 # set the output filename
197 name foo5.jpeg
198 type jpeg
199 # a black background
200 fill 1,1,0,0,0
201 # a diagonal white line top left to bottom right
202 line 0,0,399,399,255,255,255
203 line 399,0,399,399,255,255,255
204 ellipse 125,180,245,90,255,0,0
205 rotate 180
206 end
207 #########################
208
209 # new image
210 new
211 size 400,400
212 # set the output filename
213 name foo6.jpeg
214 type jpeg
215 # a black background
216 fill 1,1,0,0,0
217 # a diagonal white line top left to bottom right
218 line 0,0,399,399,255,255,255
219 line 399,0,399,399,255,255,255
220 ellipse 125,180,245,90,255,0,0
221 colourchange 255,0,0,0,255,127
222 rotate 270
223 #########################
224