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