# Struct gdk_pixbuf::Pixbuf [−]

    pub struct Pixbuf(_, _);

## Methods

### `impl Pixbuf`
[src]

#### `pub unsafe fn new(
colorspace: Colorspace,
has_alpha: bool,
bits_per_sample: i32,
width: i32,
height: i32
) -> Result<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]

#### `pub fn new_from_file(filename: &str) -> Result<Pixbuf, Error>`
[src]

#### `pub fn new_from_file_at_size(
filename: &str,
width: i32,
height: i32
) -> Result<Pixbuf, Error>`
[src]

#### `pub fn new_from_file_at_scale(
filename: &str,
width: i32,
height: i32,
preserve_aspect_ratio: bool
) -> Result<Pixbuf, Error>`
[src]

#### `pub fn new_from_xpm_data(data: &[&str]) -> Pixbuf`
[src]

#### `pub fn get_file_info(
filename: &str,
width: &mut i32,
height: &mut i32
) -> Option<PixbufFormat>`
[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]

#### `pub fn new_subpixbuf(
&self,
src_x: i32,
src_y: i32,
width: i32,
height: i32
) -> Pixbuf`
[src]

#### `pub fn get_colorspace(&self) -> Colorspace`
[src]

#### `pub fn get_n_channels(&self) -> i32`
[src]

#### `pub fn get_has_alpha(&self) -> bool`
[src]

#### `pub fn get_bits_per_sample(&self) -> i32`
[src]

#### `pub unsafe fn get_pixels(&self) -> &mut [u8]`
[src]

#### `pub fn get_width(&self) -> i32`
[src]

#### `pub fn get_height(&self) -> i32`
[src]

#### `pub fn get_rowstride(&self) -> i32`
[src]

#### `pub fn get_byte_length(&self) -> usize`
[src]

#### `pub fn get_option(&self, key: &str) -> Option<String>`
[src]

#### `pub fn scale_simple(
&self,
dest_width: i32,
dest_height: i32,
interp_type: InterpType
) -> Result<Pixbuf, ()>`
[src]

#### `pub 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
)`
[src]

#### `pub 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
)`
[src]

#### `pub fn flip(&self, horizontal: bool) -> Result<Pixbuf, ()>`
[src]

#### `pub fn put_pixel(&self, x: i32, y: i32, red: u8, green: u8, blue: u8, alpha: u8)`
[src]

#### `pub fn copy(&self) -> Pixbuf`
[src]

## 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]

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 `!=`.

### `impl Eq for Pixbuf`

### `impl IsA<Object> for Pixbuf`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
↑
  Move up in search results
↓
  Move down in search results
↹
  Switch tab
⏎
  Go to active search result
+ / -
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)