Files
Terminal.Gui/docfx/apispec/namespace-drawing.md
Tig 38c1182a6f Adds namespace docs & adds new multitasking.md deep dive (#4114)
* Added namespace docs

* Claned up FileServices

* rewrote mainloop.md to be focused on multitasking

* rewrote mainloop.md to be focused on multitasking2

* rewrote mainloop.md to be focused on multitasking3
2025-05-31 21:42:22 -06:00

29 lines
1.3 KiB
Markdown

---
uid: Terminal.Gui.Drawing
summary: The `Drawing` namespace provides comprehensive text rendering, color management, and visual styling for Terminal.Gui applications.
---
@Terminal.Gui.Drawing contains the core drawing primitives and visual styling system for Terminal.Gui. This namespace handles everything from basic color and attribute management to complex line drawing and text formatting capabilities.
The drawing system supports both simple and advanced scenarios, including Unicode text rendering, automatic line joining for complex shapes, thickness-based adornments, and comprehensive color schemes with semantic visual roles.
## Key Components
- **Attribute**: Defines visual styling (foreground, background, text style)
- **Color**: Terminal color support including TrueColor and named colors
- **Scheme**: Maps semantic visual roles to concrete attributes
- **LineCanvas**: Advanced line drawing with automatic glyph joining
- **Thickness**: Framework for defining border and adornment widths
- **Glyphs**: Standard set of drawing characters for UI elements
## Example Usage
```csharp
// Get the attribute for a Focused view
Attribute? focusedAttribute = GetAttributeForRole(VisualRole.Focused);
// Move to 5,5 and output a string with the focused attribute
Move (5,5);
AddStr("Hello");
```