In order to have more flexibly in making drawings I have coded a few more drawing primitives. An example you find here
http://crazyed.posterous.com/drawing-primitives
@Simeon: will we get in one of the next updates some more drawing primitives like arc, quad, …? I thought that this has been discussed already in one of the forum, but I can’t find the right info anymore. So please excuse if asking same things twice …
-- Those functions represent some more graphic primitives than standard Codea provides.
-- in particular those are
--
-- rrect(x,y,w,h,r,fillcolor,framecolor): rounded rectangle (most simplest one)
-- x,y define the left bottom corner
-- w,h degine width and height
-- r defines the radius of the rounded corners
-- fillcolor is the color the rectangle is filled with
-- framecolor is the color of the boundary
--
-- quad(x1,y1,x2,y2,x3,y3,x4,y4,framecolor,fillcolor): defines a polygon made of 4 points
-- the four points define the quad. Note that the sequence plays a role. Usually either
-- clockwise or counterclockwise makes sense. Any other sequence creates probably
-- interesting resuls ...
-- framecolor is color of the boundary; default yellow
-- fillcolor is the color the polygon is filled with; default nil
--
-- triangle(x1,y1,x2,y2,x3,y3,framecolor,fillcolor): defines a polygon made of 3 points
-- same comments as for quad
--
-- polygon(x,y,framecolor,fillcolor): polygon with n points can be drawn
-- x is vector having n points defining x-coordinate of point
-- y is vector having n points defining y-coordinate of point
-- framecolor is color of the boundary; default yellow
-- fillcolor is the color the polygon is filled with; default nil
--
-- bezier(x1,y1,cx1,cy1,cx2,cy2,x2,y2,steps,thickness,linecolor,fillcolor)
-- x1 and y1 define the startpoint
-- x2 and y2 define the endpoint
-- cx1, cy1, cx2, cy2 define the control points which define the shape of the cubic bezier
-- steps determines the resolution. If distance between start and stop point is small
-- it is better to reduce steps to see a curve.
-- thickness determines the thickness of the line (default: 6)
-- linecolor defines the color of the line (default: yellow)
-- fillcolor defines the color the curve is filled with (default: nil)
--
-- arc