Expand description
A simple 2D graphics library for turning simple 2D shapes and text into textured triangles.
Made for egui
.
Create some Shape
:s and pass them to tessellate_shapes
to generate Mesh
:es
that you can then paint using some graphics API of your choice (e.g. OpenGL).
Feature flags
-
cint
—cint
enables interopability with other color libraries. -
color-hex
— Enable thehex_color
macro. -
deadlock_detection
— This will automatically detect deadlocks due to double-locking on the same thread. If your app freezes, you may want to enable this! Only affectsmutex::RwLock
(which epaint and egui uses a lot). -
default_fonts
(enabled by default) — If set, epaint will useinclude_bytes!
to bundle some fonts. If you plan on specifying your own fonts you may disable this feature. -
extra_debug_asserts
— Enable additional checks if debug assertions are enabled (debug builds). -
extra_asserts
— Always enable additional checks. -
mint
—mint
enables interopability with other math libraries such asglam
andnalgebra
. -
serde
— Allow serialization usingserde
.
Optional dependencies
-
document-features
— Enable this when generating docs. -
serde
— Allow serialization usingserde
.
Re-exports
pub use image::ColorImage;
pub use image::FontImage;
pub use image::ImageData;
pub use image::ImageDelta;
pub use stats::PaintStats;
pub use tessellator::tessellate_shapes;
pub use tessellator::TessellationOptions;
pub use tessellator::Tessellator;
pub use textures::TextureManager;
pub use ahash;
pub use ecolor;
pub use emath;
Modules
Macros
epaint
is compiled with the extra_asserts
feature
or with the extra_debug_asserts
feature in debug builds.crate::Color32
from a hex RGB or RGBA string.Structs
Mesh
or PaintCallback
within a clip rectangle.Shape
within a clip rectangle.epaint
.v
value (brightness) being gamma corrected
so that it is somewhat perceptually even.PaintCallback
(Shape::Callback
).RGBA
color with premultiplied alpha.Enums
Mesh
or a PaintCallback
.