pub struct Image { /* private fields */ }
Implementations
sourceimpl Image
impl Image
pub fn new(width: u32, height: u32) -> SharedImage
pub fn from_image(filename: &str) -> SharedImage
pub const fn width(&self) -> u32
pub const fn height(&self) -> u32
pub fn set(&mut self, x: i32, y: i32, data_str: &[&str])
pub fn load(&mut self, x: i32, y: i32, filename: &str)
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 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: Arc<Mutex<Self>>,
image_x: f64,
image_y: f64,
width: f64,
height: f64,
transparent: Option<Color>
)
pub fn bltm(
&mut self,
x: f64,
y: f64,
tilemap: SharedTilemap,
tilemap_x: f64,
tilemap_y: f64,
width: f64,
height: f64,
transparent: Option<Color>
)
pub fn text(&mut self, x: f64, y: f64, string: &str, color: Color)
Auto Trait Implementations
impl RefUnwindSafe for Image
impl Send for Image
impl Sync for Image
impl Unpin for Image
impl UnwindSafe for Image
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more