Struct gdk_pixbuf::Pixbuf
[−]
pub struct Pixbuf(_, _);
Methods
impl Pixbuf
[src]
unsafe fn new(
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32
) -> Result<Pixbuf, ()>
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32
) -> Result<Pixbuf, ()>
fn new_from_vec(
vec: Vec<u8>,
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32,
row_stride: i32
) -> Pixbuf
vec: Vec<u8>,
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32,
row_stride: i32
) -> Pixbuf
fn new_from_file(filename: &str) -> Result<Pixbuf, Error>
fn new_from_file_at_size(
filename: &str,
width: i32,
height: i32
) -> Result<Pixbuf, Error>
filename: &str,
width: i32,
height: i32
) -> Result<Pixbuf, Error>
fn new_from_file_at_scale(
filename: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
filename: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
fn new_from_xpm_data(data: &[&str]) -> Pixbuf
fn get_file_info(
filename: &str,
width: &mut i32,
height: &mut i32
) -> Option<PixbufFormat>
filename: &str,
width: &mut i32,
height: &mut i32
) -> Option<PixbufFormat>
fn new_from_resource(resource_path: &str) -> Result<Pixbuf, Error>
fn new_from_resource_at_scale(
resource_path: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
resource_path: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>
fn new_subpixbuf(
&self,
src_x: i32,
src_y: i32,
width: i32,
height: i32
) -> Pixbuf
&self,
src_x: i32,
src_y: i32,
width: i32,
height: i32
) -> Pixbuf
fn get_colorspace(&self) -> Colorspace
fn get_n_channels(&self) -> i32
fn get_has_alpha(&self) -> bool
fn get_bits_per_sample(&self) -> i32
unsafe fn get_pixels(&self) -> &mut [u8]
fn get_width(&self) -> i32
fn get_height(&self) -> i32
fn get_rowstride(&self) -> i32
fn get_byte_length(&self) -> usize
fn get_option(&self, key: &str) -> Option<String>
fn scale_simple(
&self,
dest_width: i32,
dest_height: i32,
interp_type: InterpType
) -> Result<Pixbuf, ()>
&self,
dest_width: i32,
dest_height: i32,
interp_type: InterpType
) -> Result<Pixbuf, ()>
fn scale(
&self,
dest: &Pixbuf,
dest_x: i32,
dest_y: i32,
dest_width: i32,
dest_height: i32,
offset_x: f64,
offset_y: f64,
scale_x: f64,
scale_y: f64,
interp_type: InterpType
)
&self,
dest: &Pixbuf,
dest_x: i32,
dest_y: i32,
dest_width: i32,
dest_height: i32,
offset_x: f64,
offset_y: f64,
scale_x: f64,
scale_y: f64,
interp_type: InterpType
)
fn composite(
&self,
dest: &Pixbuf,
dest_x: i32,
dest_y: i32,
dest_width: i32,
dest_height: i32,
offset_x: f64,
offset_y: f64,
scale_x: f64,
scale_y: f64,
interp_type: InterpType,
overall_alpha: i32
)
&self,
dest: &Pixbuf,
dest_x: i32,
dest_y: i32,
dest_width: i32,
dest_height: i32,
offset_x: f64,
offset_y: f64,
scale_x: f64,
scale_y: f64,
interp_type: InterpType,
overall_alpha: i32
)
fn flip(&self, horizontal: bool) -> Result<Pixbuf, ()>
fn put_pixel(&self, x: i32, y: i32, red: u8, green: u8, blue: u8, alpha: u8)
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
Performs copy-assignment from source
. Read more
impl Debug for Pixbuf
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
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
This method tests for !=
.