Lysa  0.0
Lysa 3D Engine
Vector2DRenderer Class Referenceabstract

Detailed Description

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

Public Member Functions

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_filled_rect (rect: Rect)
 Draws a filled rectangle using the current pen color. More...
 
nil draw_filled_rect (rect: Rect, texture: integer)
 Draws a textured filled rectangle. More...
 
nil draw_filled_rect (x: number, y: number, w: number, h: number, texture: integer)
 Draws a textured filled rectangle from x, y, w, h. 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...
 

Properties

number aspect_ratio
 Constructor: Vector2DRenderer(rt)
 

Member Function Documentation

nil draw_line ( float2  start,
float2  end)

Draws a line between two 2-D screen-space points using the current pen color.

Parameters
startfloat2
endfloat2
nil draw_filled_rect ( Rect  rect)

Draws a filled rectangle using the current pen color.

Parameters
rectRect
nil draw_filled_rect ( Rect  rect,
integer  texture)

Draws a textured filled rectangle.

Parameters
rectRect
textureinteger
nil draw_filled_rect ( number  x,
number  y,
number  w,
number  h,
integer  texture)

Draws a textured filled rectangle from x, y, w, h.

Parameters
xnumber
ynumber
wnumber
hnumber
textureinteger
nil set_pen_color ( float4  color)

Sets the current pen color (RGBA) used by subsequent draw calls.

Parameters
colorfloat4
nil set_translate ( float2  t)

Sets a 2-D translation offset applied to all subsequent draw calls in this renderer.

Parameters
tfloat2
nil set_transparency ( number  a)

Sets the global alpha multiplier (0.0 = fully transparent, 1.0 = fully opaque) for subsequent draw calls.

Parameters
anumber

Property Documentation

number aspect_ratio

Constructor: Vector2DRenderer(rt)