|
About
How To Use
How To Develop
edit SideBar
|
ShoeBot functions
This is a "cheat sheet" of Shoebot's functions.
These are usually compatible with NodeBox and DrawBot syntax, so you may wish to check the Nodebox Reference webpages for more details descriptions of each function and the options/arguments they can have.
Shape
- rect(x, y, width, height, roundness=0.0)
- oval(x, y, width, height)
- line(x1, y1, x2, y2)
- arrow(x, y, width, type=NORMAL)
- star(x, y, points=20, outer=100, inner=50)
- rectmode()
Path
- beginpath(x, y)
- moveto(x, y)
- lineto(x, y)
- curveto(h1x, h1y, h2x, h2y, x, y)
- endpath()
- drawpath(path) - Useful for calling stored path instances that were set with draw=false
- beginclip()
- endclip()
Transform
- translate(x, y) - A good metaphor for this is "shifting the origin point" (from Nodebox reference).
- rotate(degrees=0, radians=0)
- scale(x, y=None)
- skew(x, y=None)
- reset()
Color
- fill(r, g, b, a)
- nofill()
- stroke(r, g, b, a)
- nostroke()
- strokewidth(width)
- background(r, g, b, a)
- colormode()
- color()
Text
Utility
- size()
- grid()
- random()
- choice()
- files()
Nodebox functions not yet available in Shoebox
Path
- findpath(list, curvature=1.0) - Builds a path from a list of point coordinates. Curvature: 0=straight lines 1=smooth curves
Transform
- transform(mode=CENTER) - Mode can be CENTER or CORNER
- push()
- pop()
Color
Typography
- font(fontname, fontsize=None)
- fontsize()
- textwidth()
- textheight()
- textmetrics()
- lineheight()
- align()
Image
Utility
|