Difference between revisions of "Legacy:Functions/Primitives"
From Spherical
(created) |
(No difference)
|
Latest revision as of 23:00, 30 May 2013
NOTE: Be sure to use FlipScreen() when you are done drawing.
- Point(x, y, color): Plot a point with color.
- PointSeries(array, color'): Plot a series of points from an array of objects using color.
- Line(x1, y1, x2, y2, color): Draw a line with color.
- GradientLine(x1, y1, x2, y2, color1, color2): Draw a line that fades between colors.
- LineSeries(array, color [, type]): Draws a series of lines from an array of objects using color
- BezierCurve(color, step, Ax, Ay, Bx, By, Cx, Cy [, Dx, Dy]): Draws a series of points of the given color along a Bezier curve from A to C, controlled by B (A's control point) and D (optional, C's control point).
- step (0, 1] controls how many points are plotted (smaller step == more points).
- Polygon(array, color [, invert]): Draws a color-filled polygon using the array of objects (each object must have a 'x' and 'y' property).
- If invert is true, all points in the bounding box of the polygon, but not in the polygon will be colored.
- Triangle(x1, y1, x2, y2, x3, y3, color): Draw a triangle with color.
- GradientTriangle(x1, y1, x2, y2, x3, y3, color1, color2, color3): Draw a filled triangle that smoothly changes colors between the vertices.
- Rectangle(x, y, width, height, color): Draw a rectangle filled with color.
- OutlinedRectangle(x, y, width, height, color [, size]): Draws the outline of a rectangle.
- GradientRectangle(x, y, width, height, color_ul, color_ur, color_lr, color_ll): Draw a rectangle filled with gradient colors.
- FilledCircle(x, y, radius, color [, antialias]): Draws a circle filled with color.
- OutlinedCircle(x, y, radius, color [, antialias]): Draws the outline of a circle with color.
- GradientCircle(x, y, radius, color1, color2 [, antialias]): Draws a circle filled with gradient colors.
- FilledEllipse(x, y, rx, ry, color): Draws an ellipse filled with color.
- OutlinedEllipse(x, y, rx, ry, color): Draws the outline of an ellipse with color.
- FilledComplex(rx, ry, rw, rh, cx, cy, cr, ca, cf, fill_empty, color1, color2): Draws a filled rectangle at (rx, ry) with rw width and rh height colored with 'color1', with a circle with the radius cr and the color 'color2' drawn onto it.
- Part of the circle can be filled in by specifying the angular offset 'ca' and angular size 'cf'.
- If fill_empty is true, any part of the rectangle not filled by the arc will be filled with 'color1' instead of being left transparent.
- OutlinedComplex(rx, ry, rw, rh, cx, cy, cr, color [, antialias]): Draws a filled rectangle at (rx, ry) with rw width and rh height colored with color, with a circle with the radius cr cut out at (cx, cy) onto the video buffer.
- GradientComplex(rx, ry, rw, rh, cx, cy, cr, ca, cf, fill_empty, color1, color2, color3): Similar to FilledComplex, but fills the circle/arc with a gradient from color2 (center) to color3 (edge). All other arguments are identical.