# HG changeset patch # User Matthew Wild # Date 1257299685 0 # Node ID 8724d7c9318eded54dd0f682b42b1d709c8994c2 # Parent c75ae749adf5fcf3eaa54d92725afaf5cb902e75 Add test diff -r c75ae749adf5 -r 8724d7c9318e test.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test.lua Wed Nov 04 01:54:45 2009 +0000 @@ -0,0 +1,16 @@ +local xpm = require "xpm" + +image = xpm.new(100, 100); + +for i=1,100 do + local colour = "#"..tostring(i, 16):rep(3); + for x=i,image.width-i+1 do + image:setpixel(x, i, colour); + image:setpixel(x, image.height-i+1, colour); + end + for y=i,image.height-i+1 do + image:setpixel(i, y, colour); + image:setpixel(image.width-i+1, y, colour); + end +end +image:render(io.stdout);