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.
Point is the fundamental rendering primitive in Fazen2d. It draws exactly one character cell at position (x, y) in the ConsoleHandler back-buffer using a caller-supplied ConsoleColor and Unicode character code. All other shapes — Line, Box, and Circle — are built internally from individual Point draws, making it the foundation of the entire graphics system.
Header
Constructor
Horizontal position in console columns. Truncated to
int on each draw() call. Valid range: 1 < x < ConsoleHandler::GetConsoleWidth() - 1.Vertical position in console rows. Truncated to
int on each draw() call. Valid range: 1 < y < ConsoleHandler::GetConsoleHeight() - 1.A
ConsoleColor enum value (e.g. greenF, redF, whiteF) that sets the Windows console foreground attribute for the cell.Unicode code point written into the cell’s
Char.UnicodeChar field. The default 0x2588 (█) produces a solid filled block. Pass any valid wchar_t-range code point for custom characters (e.g. 0x2605 for ★).Methods
| Method | Returns | Description |
|---|---|---|
draw() | void | Writes character and color into the back-buffer cell at (int(x), int(y)). Silently skips the draw if x or y falls outside the safe margin (> 1 and < dimension - 1). |
translate(float dx, float dy) | void | Computes nx = x + dx, ny = y + dy and applies the offset only if the new position is fully within [0, consoleWidth) × [0, consoleHeight). No-ops on out-of-bounds moves. |
setPosX(float x) | void | Sets the X position directly, bypassing bounds checking. |
getPosX() | float | Returns the current X position. |
setPosY(float y) | void | Sets the Y position directly, bypassing bounds checking. |
getPosY() | float | Returns the current Y position. |
setColor(short color) | void | Replaces the color attribute used on the next draw() call. |
getColor() | float | Returns the current color attribute as a float. |
setCharacter(short character) | void | Replaces the Unicode character written on the next draw() call. |
getCharacter() | float | Returns the current character code as a float. |