Documentation Index
Fetch the complete documentation index at: https://mintlify.com/adi3120/Fazen2d/llms.txt
Use this file to discover all available pages before exploring further.
GraphicsRenderer orchestrates every frame’s rendering pipeline. It reads from ConsoleHandler’s static buffer, dispatches draw calls to shapes, and flushes the completed frame to the visible console in a single WriteConsoleOutputW call. Access it through the graphics public member of your Fazen instance.
Header
Fazen.h — you do not need to add it separately in most projects.
Methods
background(short col)
Clears the entire back-buffer to space characters with the given Windows console color attribute. Call this at the start of every frame to erase the output from the previous frame before drawing new shapes.
A
ConsoleColor enum value or a raw Windows console attribute short that sets
the background fill color. Use whiteB for a white background or 0 for
black. Color constants are defined in include/headers/Colors.h and are
available automatically through Fazen.h.draw(Shape& s)
Delegates rendering to a shape by calling s.draw(). The shape is responsible for writing its character(s) and color attributes into the correct cells of the ConsoleHandler back-buffer. Any type derived from Shape can be passed here.
A reference to any object that derives from
Shape — for example Box,
Circle, Line, Point, or Text. The renderer calls s.draw() and the
shape writes itself into the shared back-buffer.display()
Flushes the entire back-buffer to the visible console in a single WriteConsoleOutputW call. Call this once at the end of every frame, after all draw() calls have finished.