A GPU renderer that draws 2-D shapes, images, and text in normalized screen space (0–VECTOR_2D_SCREEN_SIZE).
Inherits from: Vector3DRenderer
Lua full name: lysa.Vector2DRenderer
|
| nil | draw_line (start: float2, end: float2) |
| | Draws a line between two 2-D screen-space points using the current pen color. More...
|
| |
| nil | draw_rect (rect: Rect) |
| | Draws a filled rectangle using the current pen color. More...
|
| |
| nil | draw_rect (rect: Rect, texture: integer) |
| | Draws a textured filled rectangle. More...
|
| |
| nil | draw_rect (x: number, y: number, w: number, h: number, texture: integer) |
| | Draws a textured filled rectangle from x, y, w, h. More...
|
| |
| nil | draw_circle (center: float2, radius: number, borderWidth: number?) |
| | Draws a circle using the current pen color. borderWidth defaults to 0, which fills the disc, otherwise only a border of that width is drawn. Rasterized by the fragment shader with an antialiased edge, the horizontal radius being corrected by the aspect ratio so the shape stays circular. More...
|
| |
| nil | draw_circle (x: number, y: number, radius: number, borderWidth: number?) |
| | Draws a circle centered on x, y. More...
|
| |
| nil | draw_rounded_rect (rect: Rect, cornerRadius: number, borderWidth: number?) |
| | Draws a rectangle with rounded corners using the current pen color. cornerRadius and borderWidth are clamped to half of the smallest side; borderWidth defaults to 0, which fills the rectangle. The corners stay circular whatever the aspect ratio. More...
|
| |
| nil | draw_rounded_rect (rect: Rect, texture: integer, cornerRadius: number, borderWidth: number?) |
| | Draws a textured rectangle with rounded corners. More...
|
| |
| nil | draw_rounded_rect (x: number, y: number, w: number, h: number, cornerRadius: number, borderWidth: number?, texture: integer?) |
| | Draws a rectangle with rounded corners from x, y, w, h, optionally textured. More...
|
| |
| nil | set_pen_color (color: float4) |
| | Sets the current pen color (RGBA) used by subsequent draw calls. More...
|
| |
| nil | set_translate (t: float2) |
| | Sets a 2-D translation offset applied to all subsequent draw calls in this renderer. More...
|
| |
| nil | set_transparency (a: number) |
| | Sets the global alpha multiplier (0.0 = fully transparent, 1.0 = fully opaque) for subsequent draw calls. More...
|
| |
|
| number | aspect_ratio |
| | Constructor: Vector2DRenderer(rt)
|
| |