draw
Let's you draw things to the screen.
Methods
draw.text(content, pos, color, fontSize, fontName)
draw.text(content, pos, color, fontSize, fontName)content- The text you wish to drawpos- The screen position where to draw the text as a Vec2color- The color of the text as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for red with 100% alphafontSize- The size of the text in pixelsfontName- The name of the font
Available Font sizes:
12, 14, 16, 18, 24, 32, 36, 48, 60
Available Fonts:
Verdana
VerdanaBold
Impact
Beyblade
Dameron
RobotoMono-Light
Draws text at a position.
Example:

draw.line(start, end, color, thickness)
draw.line(start, end, color, thickness)start- Start position of the line as a Vec2end- End Position of the line as a Vec2color- The color of the line as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for red with 100% alphathickness- The thickness of the line in pixels
Draws a line from point A to B.
Example:

draw.rectangle(topLeft, botRight, color, rounding)
draw.rectangle(topLeft, botRight, color, rounding)topLeft- Top left corner as a Vec2botRight- Bottom right corner as a Vec2color- The color of the rect as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpharounding- Edge rounding in pixels
Draws a rectangle spanning from topLeft to botRight.
Example:

draw.rectangleFilled(start, end, color, thickness)
draw.rectangleFilled(start, end, color, thickness)topLeft- Top left corner as a Vec2botRight- Bottom right corner as a Vec2color- The color of the rect as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpharounding- Edge rounding in pixels
Draws a filled rectangle spanning from topLeft to botRight.
Example:

draw.circle(center, radius, color, segments)
draw.circle(center, radius, color, segments)center- The center of the circle as a Vec2radius- The radius of the circle in pixelscolor- The color of the circle as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for redsegments- The circle is made up of lines, the more segments the smoother
Draws a circle.
Example:

draw.circleFilled(center, radius, color, segments)
draw.circleFilled(center, radius, color, segments)center- The center of the circle as a Vec2radius- The radius of the circle in pixelscolor- The color of the circle as a Vec4, e.g. Vec4:new(255, 0, 0, 255) for redsegments- The circle is made up of lines, the more segments the smoother
Draws a filled circle.
Example:

Last updated