Trait gdk4::prelude::TextureExt [−][src]
pub trait TextureExt: 'static {
fn height(&self) -> i32;
fn width(&self) -> i32;
fn save_to_png<P: AsRef<Path>>(&self, filename: P) -> bool;
}
Expand description
Required methods
fn save_to_png<P: AsRef<Path>>(&self, filename: P) -> bool
fn save_to_png<P: AsRef<Path>>(&self, filename: P) -> bool
Store the given self
to the filename
as a PNG file.
This is a utility function intended for debugging and testing.
If you want more control over formats, proper error handling or
want to store to a GFile
or other location, you might want to
look into using the gdk-pixbuf library.
filename
the filename to store to