shapes

v0.0.2
circle(x, y, d);

Draw a circle to the opengl context

Arguments

xThe x position of the circle
yThe y position of the circle
dThe diameter of the circle

See circle in shapes.h
rect(x, y, w, h);

Draw a rectangle to the opengl context

Arguments

xThe x position of the reactangle
yThe y position of the reactangle
wThe width
hThe height

See rect in shapes.h
square(x, y, s);

Draw a square to the opengl context

Arguments

xThe x position of the square
yThe y position of the square
sThe size of the square

See square in shapes.h
line(x1, y1, x2, y2);

Draw a line to the opengl context

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point

See line in shapes.h
quad(x1, y1, x2, y2, x3, y3, x4, y4);

Draw a quad on the screen

Arguments

x1The x position of the first point
y1The y position of the first point
x2The x position of the second point
y2The y position of the second point
x3The x position of the third point
y3The y position of the third point
x4The x position of the fourth point
y4The y position of the fourth point

See quad in shapes.h
text(str, x, y);

Draw text on the screen

Arguments

strString to render
xThe x position of the start of the text
yThe y position of the top of the text

Fonts are not yet implemented

fill(150, 50, 255);
text('Hello lu5!', 40, 60);
See text in shapes.h
point();

Draw a point on the screen

See point in shapes.h
arc();

Draw an arc on the screen

See arc in shapes.h
ellipse();

Draw an ellipse on the screen

See ellipse in shapes.h
triangle();

Draw a triangle on the screen

See triangle in shapes.h