draw
Let's you draw things to the screen.
Last updated
Let's you draw things to the screen.
Last updated
draw.text(content, pos, color, fontSize, fontName)
content
- The text you wish to draw
pos
- The screen position where to draw the text as a
color
- The color of the text as a , e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpha
fontSize
- The size of the text in pixels
fontName
- 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)
thickness
- The thickness of the line in pixels
Draws a line from point A to B.
Example:
draw.rectangle(topLeft, botRight, color, rounding)
rounding
- Edge rounding in pixels
Draws a rectangle spanning from topLeft
to botRight
.
Example:
draw.rectangleFilled(start, end, color, thickness)
rounding
- Edge rounding in pixels
Draws a filled rectangle spanning from topLeft
to botRight
.
Example:
draw.circle(center, radius, color, segments)
radius
- The radius of the circle in pixels
segments
- The circle is made up of lines, the more segments the smoother
Draws a circle.
Example:
draw.circleFilled(center, radius, color, segments)
radius
- The radius of the circle in pixels
segments
- The circle is made up of lines, the more segments the smoother
Draws a filled circle.
Example:
start
- Start position of the line as a
end
- End Position of the line as a
color
- The color of the line as a , e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpha
topLeft
- Top left corner as a
botRight
- Bottom right corner as a
color
- The color of the rect as a , e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpha
topLeft
- Top left corner as a
botRight
- Bottom right corner as a
color
- The color of the rect as a , e.g. Vec4:new(255, 0, 0, 255) for red with 100% alpha
center
- The center of the circle as a
color
- The color of the circle as a , e.g. Vec4:new(255, 0, 0, 255) for red
center
- The center of the circle as a
color
- The color of the circle as a , e.g. Vec4:new(255, 0, 0, 255) for red