Render API

📐 Constants

const uint8 RR_TOP_LEFT
const uint8 RR_TOP_RIGHT
const uint8 RR_BOTTOM_LEFT
const uint8 RR_BOTTOM_RIGHT

Rectangle-corner rounding flags (bitmask).

const int TE_NONE
const int TE_OUTLINE
const int TE_SHADOW
const int TE_GLOW

Text rendering effects.


🎨 Viewport

void get_view(float &out w, float &out h)
float get_view_scale()
double get_fps()
  • get_view — Returns the current viewport width/height in pixels.

  • get_view_scale — Returns the viewport reference scale (for DPI scaling, etc).

  • get_fps()


📏 Basic Shapes

Rectangle

Draws an outlined rectangle.

Filled Rectangle

Draws a filled rectangle.

Line

Draws a line between (x1,y1) and (x2,y2).

Arc

Draws an arc or pie-slice centered at (cx, cy).

Circle

Triangle

Polygon

  • xy_pairs[x0, y0, x1, y1, …]

  • count_pairs — optional; set 0 to use full array length.

Four Corner Gradient

Draws a gradient rectangle with individual RGBA colors for each corner.


🖼️ Bitmaps

  • create_bitmap — Creates a bitmap from raw RGBA or compressed bytes. Returns an encrypted handle (uint64) used for drawing.

  • draw_bitmap — Draws the bitmap tinted with color (r,g,b,a).


🔤 Fonts & Text

Text Drawing

  • effect — One of TE_NONE, TE_OUTLINE, TE_SHADOW, TE_GLOW.

  • effect_color(er,eg,eb,ea).

  • effect_amount — Intensity scalar.

Text Metrics

Measure text dimensions or a single character’s advance width.


✂️ Clipping


Example

Last updated