cyrgani
cyrgani
This PR adds two functions for drawing multiline text that breaks on newlines. The new `draw_multiline_text` and `draw_multiline_text_ex` functions mirror the existing signatures of the `draw_text` and `draw_text_ex` functions. A...
This PR is a huge rework of the `Image` type to fix a soundness issue and other bugs, increase performance and improve ergonomics. It also adds deprecation warnings to prepare...
This fixes the test failure described in #693 by ~~wrapping the global `Context` in `std::mem::ManuallyDrop` to prevent the compiler from dropping it at the beginning of the second test when...
The following safe code causes undefined behaviour by reading out of bounds: ```rust fn main() { let mut image = macroquad::texture::Image::empty(); image.width += 1; image.height += 1; dbg!(image.get_image_data()); } ```...
### Code ```Rust fn main() { let val = 2; let ptr = std::ptr::addr_of!(val); unsafe { *ptr = 3; } } ``` ### Current output ```Shell error[E0594]: cannot assign to...
With Rust 1.82, `const_fn_floating_point_arithmetic` is stable (see rust-lang/rust#57241). This means that `Color::from_rgba` can be `const` and the `color_u8!` macro is not required anymore. `Color::from_rgba_f32` was added too since the macro...
This PR just fixes a few cases where `use crate::` was used although the imported type was from miniquad. These imports have been corrected to `use miniquad::`.
This should either be `cfg`ed out properly so it doesn't warn anymore or be removed, depending on whether it is still used.
This is an experimental idea for reducing the amount of dependencies in some projects. `image` has around 15 more dependencies, but is only used in a few places in macroquad:...
This PR adds a public `get_default_font` method and uses it to fix a bug in `draw_multiline_text_ex`: when no custom font and no custom line distance was given, a line distance...