"Fossies" - the Fresh Open Source Software Archive

Member "fly-2.0.1/examples/png/2.fly" (25 Nov 2001, 2921 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 png
    5 name temp.png
    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.png
  118 type png
  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 #########################