
aura.draw2d is the core immediate-mode 2D rendering namespace.
Primitives:
clear(colorOrR, g?, b?, a?)rect(x, y, width, height, color)rectFill(x, y, width, height, color)circle(x, y, radius, color)circleFill(x, y, radius, color)line(x1, y1, x2, y2, color, width?)polygon(points, color)polygonFill(points, color)polyline(points, color, width?)bezier(...)quadratic(...)arc(...)arcFill(...)triangle(...)triangleFill(...)ellipse(...)ellipseFill(...)roundedRect(...)roundedRectFill(...)State helpers:
setBlendMode(mode)setFill(fillSpec)clearFill()Primary sprite method:
sprite(source, x, y, options?)Legacy alias still available:
image(source, x, y, options?)Common sprite options:
width, heightframeX, frameY, frameW, frameHscaleX, scaleYrotationoriginX, originYtintalphaflipX, flipYUse cases:
Text methods:
text(content, x, y, optionsOrColor?)styledText(segments, x, y, options?)measureText(content, options?)Common text options:
sizealigncolorfontshadowoutlinestyledText(...) supports segment-level styling using the same general option shape.
Transform helpers:
pushTransform()popTransform()translate(x, y)rotate(radians)scale(x, y?)Legacy aliases:
push()pop()Use cases:
Typical aura.draw() flow:
The drawing APIs accept the canonical color helpers documented in 06 Math, Colors, Vectors, Timers, Collision, and ECS:
aura.rgb(...)aura.rgba(...)aura.Color.*Legacy color aliases also exist for compatibility, but new code should stick to the canonical forms above.