GFX Primitives

Sub Circle(x, y, radius)

Draws a circle on the current canvas.


Sub CircleFill(x, y, radius)

Draws a filled circle on the current canvas.


Sub Ellipse(x, y, rx, ry)

Draws an ellipse on the current canvas.


Sub EllipseFill(x, y, rx, ry)

Draws a filled ellipse on the current canvas.


Sub FloodFill(x, y)

Fills a closed shape in with the current draw color.

NOTE: It is not recommended to floodfill the full screen since its prone to stack overload


Function GetPixel(x, y)

Returns the color of a pixel.


Sub SetColor(c) Sets the

Sets the current draw color.


Sub Line(x1, y1, x2, y2)

Draws a line.


Sub Poly(n, byref x, byref y)

Draws a polygon.

  • n - Number of points in the polygon.
  • x, y - Array where the points are stored.
Dim x[3], y[3] 
x[0] = 50 : y[0] = 50
x[1] = 90 : y[1] = 90
x[2] = 10 : y[1] = 90

Poly(3, x, y) 'Draws a triangle

Sub Rect(x, y, w, h)

Draws a rectangle to the current canvas.


Sub RectFill(x, y, w, h)

Draws a filled rectangle on the current canvas.


Sub RGB(r, g, b)

Returns a 32-bit color value.


Sub RGBA(r, g, b, a)

Returns a 32-bit color value.


Sub Pset(x, y)

Draws a pixel.


Sub Triangle(x1, y1, x2, y2, x3, y3)

Draws a filled Triangle.


Sub Line3D(x1, y1, z1, x2, y2, z2)

Draws a line in 3D space.


Sub Box3D(min_x, min_y, min_z, max_x, max_y, max_z)

Draws a box in 3D space.


Sub Triangle3D(x1, y1, z1, x2, y2, z2, x3, y3, z3)

Draws a triangle in 3D space.


Sub SetRenderCirclePoints(num_points)

Sets the number of points used to draw circles with Circle, CircleFill, Ellipse, and EllipseFill.