1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Image handling and rendering module for AppCUI.
//!
//! This module provides types and functions for creating, manipulating,
//! and rendering images within the AppCUI framework. The primary components are:
//!
//! - [`Image`]: A structure representing a raster image with RGBA pixels
//! - [`Pixel`]: Represents an RGBA pixel with 8-bit color channels
//! - [`Scale`]: Enumeration of scaling methods for image rendering
//! - [`RendererType`]: Different rendering methods for displaying images in a terminal
//!
//! # Examples
//!
//! Creating an image from a string representation:
//!
//! ```rust
//! use appcui::prelude::*;
//! use std::str::FromStr;
//!
//! // Create a 3x2 image with specific colors
//! let image_str = "|RGB| |YWr|";
//! let img = Image::from_str(image_str).unwrap();
//! ```
//!
//! Creating an empty image and manipulating pixels:
//!
//! ```rust
//! use appcui::prelude::*;
//!
//! // Create a 100x100 image
//! let mut img = Image::new(100, 100).unwrap();
//!
//! // Set a red pixel at position (10, 20)
//! img.set_pixel(10, 20, Pixel::with_rgb(255, 0, 0));
//!
//! // Get the pixel at position (10, 20)
//! if let Some(pixel) = img.pixel(10, 20) {
//! assert_eq!(pixel.red, 255);
//! assert_eq!(pixel.green, 0);
//! assert_eq!(pixel.blue, 0);
//! }
//! ```
pub use Scale;
pub use Pixel;
pub use Image;
pub use CharacterSet;
pub use ColorSchema;
pub use ;
pub use BitTile;
pub use BitTileU16;
pub use BitTileU32;
pub use BitTileU64;
pub use BitTileU128;
pub use BitTileRenderMethod;
pub use Glyph;
pub use StringFormatError;
use StringFormatParser;