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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! # Graphicility
//!
//! A minimal, immediate-mode 2D drawing library designed for simplicity and ease of use.
//!
//! Graphicility provides a higher-level interface around `pixels` and `winit`, offering a
//! logical pixel buffer that automatically handles scaling and DPI. <br>
//! Allowing you to create simple graphical applications.
//!
//! ## Core Concepts
//!
//! - **[FrameContext]**: The primary interface provided to your draw loop. It contains
//! access to [Graphics], [Input], and timing data.
//! - **Logical Resolution**: You define a fixed "Virtual resolution" (e.g., 320x240).
//! The library scales this to fit the physical window.
//! - **[Vec2]**: A flexible coordinate type. Most methods accept `impl Into<Vec2>`,
//! allowing you to pass `(x, y)` tuples directly.
//! - **Immediate Mode** : You define the graphics and you see it _immediately_
//! ## Some Examples
pub use Graphics;
pub use FrameContext;
pub use Color;
pub use Config;
pub use Input;
pub use ;
// Re-Exports from winit events
pub use KeyCode;
pub use MouseButton;
use Runtime;
use EventLoop;
/// Run the application with default configuration
///```rust
/// run(|ctx|{
/// // your drawing code here
/// });
/// ```
/// Run the application with custom configuration
/// Example:
/// ```rust
/// let config = Config::builder()
/// .with_title("My App")
/// .set_window_size((1024, 768))
/// .set_logical_size((800, 600))
/// .set_resizeable(true)
/// .build();
/// run_with(config, |g|{
/// // your drawing code here
/// });
/// ```