#[inline(always)]
#[allow(clippy::inline_always)]
#[track_caller]
pub const fn draw_pixel_unsafe(
buffer: &mut (impl [const] BufferPointers + [const] BufferMetrics),
xy: (usize, usize),
color: u32,
) {
unsafe {
*buffer.mut_pointer().add(xy.1 * buffer.width() + xy.0) = color;
}
}
#[inline(always)]
#[allow(clippy::inline_always)]
#[track_caller]
pub const fn draw_pixel_safe(
buffer: &mut (impl [const] BufferPointers + [const] BufferMetrics),
xy: (usize, usize),
color: u32,
) {
if xy.0 < buffer.width() && xy.1 < buffer.height() {
unsafe {
*buffer.mut_pointer().add(xy.1 * buffer.width() + xy.0) = color;
}
}
}
pub mod buffer_type;
pub use buffer_type::*;
#[cfg(feature = "std")]
pub mod buffer_compatibility;
mod circle_outline;
pub use circle_outline::*;
#[cfg(feature = "font_support")]
mod text;
#[cfg(feature = "font_support")]
pub use text::*;
mod line;
pub use line::*;
mod circle;
pub use circle::*;
mod rectangle;
pub use rectangle::*;
#[cfg(feature = "std")]
mod triangle;
#[cfg(feature = "std")]
pub use triangle::*;
mod texture;
pub use texture::*;