Expand description
Prisma2D
Prisma2D is a crate to wrap all the mathematics behind drawing basic primitives
such as points, lines and circles in Rust. All it needs is a framebuffer to draw upon
(Represented in the crate with a &mut [u8]
) to output the results. As such, it is
completely API/library independent.
One of the main limitations of this crate is the focus on performance over quality. If you
plan on using it on 2D games, you should first ensure you like the output graphics, otherwise
wgpu
will be of more use.
Features
nostd
- Disables the use of the Rust standard library.threading
- Enables multithreading using therayon
library.transparency
- Adds transparency support forcrate::color::Color
images
- Enables support for image buffers (You will still need an external crate to load the image)aggr-inline
- Inlines multiple functions within the crate such as constructors and setters.
Modules
- Circles
- Colors
- Plain line
- Pixel points
- Vertices, can be used for more complex shapes.