# {py:mod}`simvx.graphics.draw2d` ```{py:module} simvx.graphics.draw2d ``` ```{autodoc2-docstring} simvx.graphics.draw2d :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Draw2D ` - ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`__all__ ` - ```{autodoc2-docstring} simvx.graphics.draw2d.__all__ :summary: ``` * - {py:obj}`log ` - ```{autodoc2-docstring} simvx.graphics.draw2d.log :summary: ``` * - {py:obj}`UI_VERTEX_DTYPE ` - ```{autodoc2-docstring} simvx.graphics.draw2d.UI_VERTEX_DTYPE :summary: ``` ```` ### API ````{py:data} __all__ :canonical: simvx.graphics.draw2d.__all__ :value: > ['Draw2D', 'UI_VERTEX_DTYPE'] ```{autodoc2-docstring} simvx.graphics.draw2d.__all__ ``` ```` ````{py:data} log :canonical: simvx.graphics.draw2d.log :value: > 'getLogger(...)' ```{autodoc2-docstring} simvx.graphics.draw2d.log ``` ```` ````{py:data} UI_VERTEX_DTYPE :canonical: simvx.graphics.draw2d.UI_VERTEX_DTYPE :value: > 'dtype(...)' ```{autodoc2-docstring} simvx.graphics.draw2d.UI_VERTEX_DTYPE ``` ```` `````{py:class} Draw2D :canonical: simvx.graphics.draw2d.Draw2D ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D ``` ````{py:method} push_transform(a, b, c, d, tx, ty) :canonical: simvx.graphics.draw2d.Draw2D.push_transform :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.push_transform ``` ```` ````{py:method} pop_transform() :canonical: simvx.graphics.draw2d.Draw2D.pop_transform :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.pop_transform ``` ```` ````{py:method} push_identity() :canonical: simvx.graphics.draw2d.Draw2D.push_identity :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.push_identity ``` ```` ````{py:method} set_font(path: str | None = None, size: int = 64) -> None :canonical: simvx.graphics.draw2d.Draw2D.set_font :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.set_font ``` ```` ````{py:method} set_color(r=255, g=255, b=255, a=255) :canonical: simvx.graphics.draw2d.Draw2D.set_color :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.set_color ``` ```` ````{py:method} fill_rect(pos, size_or_y=None, w=None, h=None) :canonical: simvx.graphics.draw2d.Draw2D.fill_rect :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.fill_rect ``` ```` ````{py:method} draw_rect(pos, size_or_y=None, w=None, h=None) :canonical: simvx.graphics.draw2d.Draw2D.draw_rect :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_rect ``` ```` ````{py:method} draw_line(a, b_or_y=None, x2=None, y2=None) :canonical: simvx.graphics.draw2d.Draw2D.draw_line :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_line ``` ```` ````{py:method} draw_lines(points, closed=True, color=None) :canonical: simvx.graphics.draw2d.Draw2D.draw_lines :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_lines ``` ```` ````{py:method} draw_circle(center, radius_or_y=None, radius=None, segments=24) :canonical: simvx.graphics.draw2d.Draw2D.draw_circle :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_circle ``` ```` ````{py:method} draw_text(text, pos, scale=1, color=None) :canonical: simvx.graphics.draw2d.Draw2D.draw_text :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_text ``` ```` ````{py:method} text_width(text, scale=1) :canonical: simvx.graphics.draw2d.Draw2D.text_width :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.text_width ``` ```` ````{py:method} clear(r=0, g=0, b=0) :canonical: simvx.graphics.draw2d.Draw2D.clear :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.clear ``` ```` ````{py:method} present() :canonical: simvx.graphics.draw2d.Draw2D.present :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.present ``` ```` ````{py:method} push_clip(x: int, y: int, w: int, h: int) :canonical: simvx.graphics.draw2d.Draw2D.push_clip :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.push_clip ``` ```` ````{py:method} pop_clip() :canonical: simvx.graphics.draw2d.Draw2D.pop_clip :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.pop_clip ``` ```` ````{py:method} new_layer() :canonical: simvx.graphics.draw2d.Draw2D.new_layer :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.new_layer ``` ```` ````{py:method} fill_triangle(x1, y1, x2, y2, x3, y3) :canonical: simvx.graphics.draw2d.Draw2D.fill_triangle :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.fill_triangle ``` ```` ````{py:method} fill_quad(x1, y1, x2, y2, x3, y3, x4, y4) :canonical: simvx.graphics.draw2d.Draw2D.fill_quad :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.fill_quad ``` ```` ````{py:method} draw_thick_line(x1, y1, x2, y2, width=2.0) :canonical: simvx.graphics.draw2d.Draw2D.draw_thick_line :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_thick_line ``` ```` ````{py:method} fill_circle(cx, cy, radius, segments=24) :canonical: simvx.graphics.draw2d.Draw2D.fill_circle :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.fill_circle ``` ```` ````{py:method} draw_thick_line_colored(x1, y1, x2, y2, width, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_thick_line_colored :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_thick_line_colored ``` ```` ````{py:method} draw_filled_circle(cx, cy, radius, color, segments=24) :canonical: simvx.graphics.draw2d.Draw2D.draw_filled_circle :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_filled_circle ``` ```` ````{py:method} draw_filled_triangle(x1, y1, x2, y2, x3, y3, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_filled_triangle :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_filled_triangle ``` ```` ````{py:method} draw_filled_quad(x1, y1, x2, y2, x3, y3, x4, y4, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_filled_quad :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_filled_quad ``` ```` ````{py:method} draw_filled_rect(x, y, w, h, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_filled_rect :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_filled_rect ``` ```` ````{py:method} draw_rect_colored(x, y, w, h, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_rect_colored :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_rect_colored ``` ```` ````{py:method} draw_line_colored(x1, y1, x2, y2, color) :canonical: simvx.graphics.draw2d.Draw2D.draw_line_colored :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_line_colored ``` ```` ````{py:method} draw_text_colored(text, x, y, scale=1, color=None) :canonical: simvx.graphics.draw2d.Draw2D.draw_text_colored :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_text_colored ``` ```` ````{py:method} draw_texture(texture_id: int, x: float, y: float, w: float, h: float, color: tuple[float, ...] | None = None, rotation: float = 0.0) :canonical: simvx.graphics.draw2d.Draw2D.draw_texture :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_texture ``` ```` ````{py:method} draw_texture_region(texture_id: int, x: float, y: float, w: float, h: float, u0: float = 0.0, v0: float = 0.0, u1: float = 1.0, v1: float = 1.0, color: tuple[float, ...] | None = None, rotation: float = 0.0) :canonical: simvx.graphics.draw2d.Draw2D.draw_texture_region :classmethod: ```{autodoc2-docstring} simvx.graphics.draw2d.Draw2D.draw_texture_region ``` ```` `````