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
posPositionPosition to draw the text
textstringText content to draw
fgColorForeground color
bgColor?Optional background color
DrawTile(Position, TileVisual)
Draws a tile visual at the specified position
void DrawTile(Position pos, TileVisual v)
Parameters
posPositionPosition to draw the tile
vTileVisualTile visual data to render
EndDraw()
Ends the drawing frame and presents the rendered content
void EndDraw()