GScript

 
 

GScript is a JavaScript library for Apple IIGS programmers to do web programming easily.


The programs can run on Safari, Firefox, Google Chrome, iPhone or iPod touch.


GScript allows programmer to use the Apple IIGS Super Hires color palette (0-15), or the RGB color value as an array.

Graphics

Start Graphics

Clear Screen

Set Color


Set Gradient

Set Radial Gradient

Set Pen Size

Plot Dot

Draw Line

Draw Rectangle


Draw Oval


Draw Circle


Draw Polygon





Draw Image


graphics(width, height)

clearScreen(color)

setColor(color)

setColor(color, alpha)

setGradient(x1, y1, x2, y2, color1, color2)

setRadialGradient(x, y, r1, r2, color1, color2)

setPenSize(size)

plot(x, y)

line(x1, y1, x2, y2)

frameRect(x, y, width, height)

paintRect(x, y, width, height)

frameOval(x, y, width, height)

paintOval(x, y, width, height)

frameCircle(x, y, radius)

paintCircle(x, y, radius)

openPoly()

moveTo(x, y)

lineTo(x, y)

paintPoly()

framePoly()

loadImage(file)

drawImage(image, x, y)

Simple Paint has been ported to iPhone using GScript, and is now featured in Apple web site.

Miscellaneous

Get Mouse Position


Get Random Number

Play Sound


getMouseX()

getMouseY()

random(number)

play(file)