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
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
PositionPosition to draw the text
text
stringText content to draw
fg
ColorForeground 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
PositionPosition to draw the tile
v
TileVisualTile visual data to render
EndDraw()
Ends the drawing frame and presents the rendered content
void EndDraw()