pub struct Image { /* private fields */ }
Implementations§
Source§impl Image
impl Image
pub fn new(width: u32, height: u32) -> SharedImage
pub fn from_image(filename: &str, include_colors: Option<bool>) -> SharedImage
pub const fn width(&self) -> u32
pub const fn height(&self) -> u32
pub fn data_ptr(&mut self) -> *mut Color
pub fn set(&mut self, x: i32, y: i32, data_str: &[&str])
pub fn load( &mut self, x: i32, y: i32, filename: &str, include_colors: Option<bool>, )
pub fn save(&self, filename: &str, scale: u32)
pub fn clip(&mut self, x: f64, y: f64, width: f64, height: f64)
pub fn clip0(&mut self)
pub fn camera(&mut self, x: f64, y: f64)
pub fn camera0(&mut self)
pub fn pal(&mut self, src_color: Color, dst_color: Color)
pub fn pal0(&mut self)
pub fn dither(&mut self, alpha: f32)
pub fn cls(&mut self, color: Color)
pub fn pget(&mut self, x: f64, y: f64) -> Color
pub fn pset(&mut self, x: f64, y: f64, color: Color)
pub fn line(&mut self, x1: f64, y1: f64, x2: f64, y2: f64, color: Color)
pub fn rect(&mut self, x: f64, y: f64, width: f64, height: f64, color: Color)
pub fn rectb(&mut self, x: f64, y: f64, width: f64, height: f64, color: Color)
pub fn circ(&mut self, x: f64, y: f64, radius: f64, color: Color)
pub fn circb(&mut self, x: f64, y: f64, radius: f64, color: Color)
pub fn elli(&mut self, x: f64, y: f64, width: f64, height: f64, color: Color)
pub fn ellib(&mut self, x: f64, y: f64, width: f64, height: f64, color: Color)
pub fn tri( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, color: Color, )
pub fn trib( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, color: Color, )
pub fn fill(&mut self, x: f64, y: f64, color: Color)
pub fn blt( &mut self, x: f64, y: f64, image: SharedImage, image_x: f64, image_y: f64, width: f64, height: f64, transparent: Option<Color>, rotate: Option<f64>, scale: Option<f64>, )
pub fn bltm( &mut self, x: f64, y: f64, tilemap: SharedTilemap, tilemap_x: f64, tilemap_y: f64, width: f64, height: f64, transparent: Option<Color>, rotate: Option<f64>, scale: Option<f64>, )
pub fn text( &mut self, x: f64, y: f64, string: &str, color: Color, font: Option<SharedFont>, )
Auto Trait Implementations§
impl Freeze for Image
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more