class

PointClickEngine::Graphics::Core::RenderContext

Inherits Reference < Object

Rendering context passed to draw operations

Provides camera-aware drawing methods that automatically handle coordinate transformations and culling.

Constructors

new(renderer : Renderer, camera : Camera, viewport : Viewport)
Source

Instance methods

camera
Source
camera_position

Get camera position (for calculations)

Source
draw_circle(center : RL::Vector2, radius : Float32, color : RL::Color)

Draw circle

Source
draw_line(start_pos : RL::Vector2, end_pos : RL::Vector2, color : RL::Color)

Draw line

Source
draw_rectangle(x : Float32, y : Float32, width : Float32, height : Float32, color : RL::Color)

Draw rectangle

Source
draw_rectangle_lines(x : Float32, y : Float32, width : Float32, height : Float32, color : RL::Color)

Draw rectangle lines

Source
draw_screen_space

Draw in screen space (ignoring camera)

Source
draw_sprite(sprite : Sprite, position : RL::Vector2, tint : RL::Color = RL::WHITE)

Draw a sprite (convenience method)

Source
draw_text(text : String, x : Float32, y : Float32, font_size : Int32, color : RL::Color)

Draw text

Source
draw_texture(texture : RL::Texture2D, world_x : Float32, world_y : Float32, tint : RL::Color = RL::WHITE)

Draw texture at world position

Source
draw_texture_ex(texture : RL::Texture2D, position : RL::Vector2, rotation : Float32, scale : Float32, tint : RL::Color)

Draw texture with extended parameters

Source
draw_texture_pro(texture : RL::Texture2D, source : RL::Rectangle, dest : RL::Rectangle, origin : RL::Vector2, rotation : Float32, tint : RL::Color)

Draw texture with full transform options

Source
draw_texture_rect(texture : RL::Texture2D, source : RL::Rectangle, position : RL::Vector2, tint : RL::Color = RL::WHITE)

Draw texture region

Source
renderer
Source
viewport
Source
viewport_bounds

Get viewport info

Source
visible?(world_x : Float32, world_y : Float32, margin : Float32 = 0.0_f32) : Bool

Check if world position is visible

Source