Table of Contents

Interface IRenderer

Namespace
Gloam.Core.Interfaces
Assembly
Gloam.Core.dll

Interface for rendering graphics to a surface, supporting both text and tile-based rendering

public interface IRenderer

Properties

Surface

Gets the render surface this renderer draws to

IRenderSurface Surface { get; }

Property Value

IRenderSurface

Methods

BeginDraw()

Begins a drawing frame

void BeginDraw()

DrawText(Position, string, Color, Color?)

Draws text at the specified position with foreground and optional background color

void DrawText(Position pos, string text, Color fg, Color? bg = null)

Parameters

pos Position

Position to draw the text

text string

Text content to draw

fg Color

Foreground color

bg Color?

Optional background color

DrawTile(Position, TileVisual)

Draws a tile visual at the specified position

void DrawTile(Position pos, TileVisual v)

Parameters

pos Position

Position to draw the tile

v TileVisual

Tile visual data to render

EndDraw()

Ends the drawing frame and presents the rendered content

void EndDraw()