Render API

Drawing

  • render.text(x, y, text, r?, g?, b?, a?)

  • render.rect(x, y, w, h, r, g, b, a, rounding?)

  • render.rect_filled(x, y, w, h, r, g, b, a, rounding?)

  • render.circle(x, y, radius, r, g, b, a)

  • render.line(x1, y1, x2, y2, r, g, b, a, thickness?)

  • render.rect_filled_gradient(x, y, w, h, r1, g1, b1, a1, r2, g2, b2, a2, horizontal)

Screen/Math Helpers

  • render.world_to_screen(x, y, z[, matrix]) -> sx, sy

  • render.get_screen_size() -> w, h

  • render.get_text_size(text) -> w, h

Fonts

  • render.load_font(path, size) -> font_id

  • render.push_font(font_id)

  • render.pop_font()

Images

  • render.load_image(path_or_url) -> image_id

  • render.draw_image(id, x, y, w, h, r?, g?, b?, a?)

Última actualización

¿Te fue útil?