Skip to main content

netget/display/
mod.rs

1//! Display module - Protocol-agnostic image generation for NetGet
2//!
3//! This module provides LLM-controlled image rendering capabilities that can be used
4//! by any protocol requiring visual output (VNC, HTTP image serving, IPP print previews, etc.).
5//!
6//! ## Architecture
7//!
8//! - `types` - Core types (Color, Point, Rect, DisplayCommand)
9//! - `canvas` - Drawing operations using tiny-skia
10//! - `text` - Text rendering using cosmic-text
11//! - `ascii` - ASCII art rendering
12//!
13//! ## Usage Example
14//!
15//! ```rust,ignore
16//! use netget::display::{DisplayCanvas, DisplayCommand, Color};
17//!
18//! let mut canvas = DisplayCanvas::new(800, 600);
19//! canvas.add_command(DisplayCommand::SetBackground {
20//!     color: Color::rgb(50, 50, 50)
21//! });
22//! canvas.add_command(DisplayCommand::DrawText {
23//!     x: 100,
24//!     y: 100,
25//!     text: "Hello, World!".to_string(),
26//!     font_size: 24,
27//!     color: Color::rgb(255, 255, 255),
28//! });
29//!
30//! let image_buffer = canvas.render();
31//! ```
32
33pub mod ascii;
34pub mod canvas;
35pub mod text;
36pub mod types;
37
38pub use ascii::AsciiRenderer;
39pub use canvas::DisplayCanvas;
40pub use text::TextRenderer;
41pub use types::{Color, DisplayCommand, Point, Rect};