Struct gdk_pixbuf::Pixbuf
[−]
pub struct Pixbuf(_, _);
Methods
impl Pixbuf
[src]
pub fn new(
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32
) -> Pixbuf
[src]
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32
) -> Pixbuf
pub fn new_from_inline(data: &[u8], copy_pixels: bool) -> Result<Pixbuf, Error>
[src]
pub fn new_from_resource(resource_path: &str) -> Result<Pixbuf, Error>
[src]
pub fn new_from_resource_at_scale(
resource_path: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
[src]
resource_path: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
pub fn new_from_stream<'a, P: IsA<InputStream>, Q: Into<Option<&'a Cancellable>>>(
stream: &P,
cancellable: Q
) -> Result<Pixbuf, Error>
[src]
stream: &P,
cancellable: Q
) -> Result<Pixbuf, Error>
pub fn new_from_stream_at_scale<'a, P: IsA<InputStream>, Q: Into<Option<&'a Cancellable>>>(
stream: &P,
width: i32,
height: i32,
preserve_aspect_ratio: bool,
cancellable: Q
) -> Result<Pixbuf, Error>
[src]
stream: &P,
width: i32,
height: i32,
preserve_aspect_ratio: bool,
cancellable: Q
) -> Result<Pixbuf, Error>
pub fn new_from_xpm_data(data: &[&str]) -> Pixbuf
[src]
pub fn get_formats() -> Vec<PixbufFormat>
[src]
impl Pixbuf
[src]
pub fn new_from_vec(
vec: Vec<u8>,
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32,
row_stride: i32
) -> Pixbuf
[src]
vec: Vec<u8>,
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32,
row_stride: i32
) -> Pixbuf
pub fn new_from_file<T: AsRef<Path>>(filename: T) -> Result<Pixbuf, Error>
[src]
pub fn new_from_file_at_size<T: AsRef<Path>>(
filename: T,
width: i32,
height: i32
) -> Result<Pixbuf, Error>
[src]
filename: T,
width: i32,
height: i32
) -> Result<Pixbuf, Error>
pub fn new_from_file_at_scale<T: AsRef<Path>>(
filename: T,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
[src]
filename: T,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
pub fn new_from_stream_async<'a, P: IsA<InputStream>, Q: Into<Option<&'a Cancellable>>, R: FnOnce(Result<Pixbuf, Error>) + Send + 'static>(
stream: &P,
cancellable: Q,
callback: R
)
[src]
stream: &P,
cancellable: Q,
callback: R
)
pub fn new_from_stream_at_scale_async<'a, P: IsA<InputStream>, Q: Into<Option<&'a Cancellable>>, R: FnOnce(Result<Pixbuf, Error>) + Send + 'static>(
stream: &P,
width: i32,
height: i32,
preserve_aspect_ratio: bool,
cancellable: Q,
callback: R
)
[src]
stream: &P,
width: i32,
height: i32,
preserve_aspect_ratio: bool,
cancellable: Q,
callback: R
)
pub unsafe fn get_pixels(&self) -> &mut [u8]
[src]
pub fn put_pixel(&self, x: i32, y: i32, red: u8, green: u8, blue: u8, alpha: u8)
[src]
pub fn get_file_info<T: AsRef<Path>>(
filename: T
) -> Option<(PixbufFormat, i32, i32)>
[src]
filename: T
) -> Option<(PixbufFormat, i32, i32)>
pub fn save_to_bufferv(
&self,
type_: &str,
options: &[(&str, &str)]
) -> Result<Vec<u8>, Error>
[src]
&self,
type_: &str,
options: &[(&str, &str)]
) -> Result<Vec<u8>, Error>
pub fn savev<T: AsRef<Path>>(
&self,
filename: T,
type_: &str,
options: &[(&str, &str)]
) -> Result<(), Error>
[src]
&self,
filename: T,
type_: &str,
options: &[(&str, &str)]
) -> Result<(), Error>
Trait Implementations
impl Clone for Pixbuf
fn clone(&self) -> Pixbuf
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Pixbuf
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Hash for Pixbuf
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl StaticType for Pixbuf
fn static_type() -> Type
Returns the type identifier of Self
.
impl<T: IsA<Object>> PartialEq<T> for Pixbuf
fn eq(&self, other: &T) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.