/* Button Create a button using the GD graphical library. Tested with Scriptol PHP. */ include "phpgd.h" include "image.sol" ` Drawing a button using the "Image" class print "Program Button - Testing GD" Image button button.create(88,31) int black = button.createColor(0, 0, 0) int white = button.createColor(255,255,255) int green = button.createColor(0, 192, 0) ` filling background and drawing borders button.fill(green) button.line(0,0,87,0, white) button.line(0,0,0,30, white) button.line(0,30,87,30, black) button.line(87,0,87,30, black) ` now, writing a label button.setFontSize(5) ` select a font among 1-5 button.write(26, 8, "Label", black) ` put the label text bname = "button.jpg" button.saveJpeg(bname, 100) print bname,"created"