pronto_graphics/
lib.rs

1//! A Rust library for simple and straightforward drawing of graphics, similar to [Processing](https://processing.org/).
2//!
3//! All interaction with the library happens through an instance of [`Window`].
4//!
5//! Just like [Processing](https://processing.org/), Pronto Graphics uses a hidden persistent state for drawing settings
6//! like colors, line thickness and font, which can be set at any point and will affect all later draw calls,
7//! either until the end of the frame, or until changed (See the individual documentation for details).
8//!
9//! ## Prerequisites
10//!
11//! Since Pronto Graphics uses [SFML](https://www.sfml-dev.org/), specifically the [SFML bindings for Rust](https://docs.rs/sfml/latest/sfml/index.html),
12//! it's prerequisites are [the same as the SFML Rust bindings](https://docs.rs/sfml/latest/sfml/index.html#prerequisites).
13//!
14//! This might change in future versions.
15//!
16//! ## Usage
17//!
18//! Commonly you would have something like this in your `fn main()`:
19//!
20//! ```
21//! let mut pg = Window::new(800, 600, "Window Title");
22//! // or
23//! //let mut pg = Window::new_fullscreen();
24//!
25//! loop {
26//!     // --- Draw calls, etc. ---
27//!
28//!     pg.update();
29//! }
30//! ```
31//!
32//! ## Thread safety
33//!
34//! Pronto Graphics is not thread safe, both due to it's own internal structure and the fact it uses
35//! SFML for drawing, which already [isn't thread safe](https://docs.rs/sfml/latest/sfml/index.html#-thread-safety-warning-).
36//! As long as you only use Pronto Graphics in your main thread however, it should be fine to have parallel non-graphics threads.
37
38mod color;
39mod font;
40mod input;
41mod render_parameters;
42mod shape;
43mod texture;
44mod window;
45pub use color::Color;
46pub use font::Font;
47pub use sfml::window::{mouse::Button, Key};
48pub use texture::Texture;
49pub use window::Window;