mod contiguous_pixels;
mod draw_item;
mod orientation;
mod tga;
pub mod tiling;
use core::{convert::Infallible, future::Future};
use embedded_graphics::{
pixelcolor::Rgb565,
prelude::{DrawTarget, Point},
primitives::Rectangle,
};
use crate::pixel_target::PixelTarget;
pub(crate) use contiguous_pixels::ContiguousPixels;
pub use draw_item::{DrawItem, Image565View};
pub use orientation::Orientation;
pub use tga::{Image565Fixed, Image888Fixed, MaskFixed, mask_byte_count};
pub use crate::__cyd_tga as tga;
pub trait RectanglePixels {
fn width(&self) -> usize;
fn height(&self) -> usize;
fn raw_pixels(&self) -> &[u16];
}
pub trait CydFrame: DrawTarget<Color = Rgb565, Error = Infallible> + PixelTarget {
type Error;
#[must_use]
fn tile_top_left(&self) -> Point {
Point::zero()
}
fn rectangle(&self) -> Rectangle;
fn fill(&mut self, color: Rgb565) -> &mut Self;
fn clear(&mut self) -> &mut Self;
fn write_text(&mut self, text: &str) -> &mut Self;
fn copy_from_565(&mut self, src: &[u16]) -> crate::Result<()>;
fn flush(&mut self) -> impl Future<Output = Result<(), <Self as CydFrame>::Error>>;
}