Struct ggez::graphics::ScreenImage
source · pub struct ScreenImage { /* private fields */ }
Expand description
An image which is sized relative to the screen. This is primarily for canvas images.
Implementations§
source§impl ScreenImage
impl ScreenImage
sourcepub fn new(
gfx: &impl Has<GraphicsContext>,
format: impl Into<Option<ImageFormat>>,
width: f32,
height: f32,
samples: u32
) -> Self
pub fn new( gfx: &impl Has<GraphicsContext>, format: impl Into<Option<ImageFormat>>, width: f32, height: f32, samples: u32 ) -> Self
Creates a new ScreenImage
with the given parameters.
width
and height
specify the fraction of the framebuffer width and height that the Image will have.
For example, width = 1.0
and height = 1.0
means the image will be the same size as the framebuffer.
If format
is None
then the format will be inferred from the surface format.
Trait Implementations§
source§impl Clone for ScreenImage
impl Clone for ScreenImage
source§fn clone(&self) -> ScreenImage
fn clone(&self) -> ScreenImage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for ScreenImage
impl Send for ScreenImage
impl Sync for ScreenImage
impl Unpin for ScreenImage
impl !UnwindSafe for ScreenImage
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
§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
source§impl<T> HasMut<T> for T
impl<T> HasMut<T> for T
source§fn retrieve_mut(&mut self) -> &mut T
fn retrieve_mut(&mut self) -> &mut T
Method to retrieve the context type as mutable.