The DrawBot Graphics API
Features implemented in Mac DrawBot 1.1 are marked with (1.1).
Features implemented in the current Windows version are shown in boldface.
The Rect Object
- Rect(x, y, w, h)
- Creates a rectangle object, covering the given area.
- setlinewidth(w)
- stroke()
- fill()
The Oval Object
- Oval(x, y, w, h)
- Creates an ellipse object, covering the given area.
- setlinewidth(w)
- stroke()
- fill()
The BezierPath Object
- BezierPath()
- Creates an empty path object.
- moveto(x, y)
- lineto(x, y)
- curveto(x1, y1, x2, y2, x3, y3)
- closepath()
- stroke()
- fill()
The Color and Gray Objects
- Color(r, g, b)
- Creates an opaque color object.
- Color(r, g, b, a)
- Creates a transparent color object.
- Gray(v)
- Gray(v, a)
- set()
- copy() (1.1)
- hue (1.1)
- saturation (1.1)
- brightness (1.1)
- hsba (1.1)
- red (1.1)
- green (1.1)
- blue (1.1)
- alpha (1.1)
- rgba (1.1)
- blend(color, factor) (1.1)
The Image Object (version 1.1)
- Image(path) (1.1)
- Creates an image object, using data from a file.
- getSize() (1.1)
- draw(x,y) (1.1)
- draw(x,y,alpha=1.0,srcRect=r) (1.1)
The Transform Object (version 1.1)
- Transform() (1.1)
- Creates a transformation.
- Transform(t) (1.1)
- set() (1.1)
- concat() (1.1)
- copy() (1.1)
- rotate(d) (1.1)
- rotate(degrees=d) (1.1)
- rotate(radians=r) (1.1)
- translate(x) (1.1)
- translate(x, y) (1.1)
- scale(s) (1.1)
- scale(x, y) (1.1)
- invert() (1.1)
- append(t) (1.1)
- prepend(t) (1.1)
- transformPoint(p) (1.1)
- transformBezierPath(p) (1.1)
The random Function
- random()
- Returns a random number.