# Struct cairo::ImageSurface [−] [src]

    pub struct ImageSurface(_);

## Methods

### `impl ImageSurface`
[src]

#### `fn from(surface: Surface) -> Result<ImageSurface, Surface>`

#### `unsafe fn from_raw_full(ptr: *mut cairo_surface_t) -> ImageSurface`

#### `fn create(format: Format, width: i32, height: i32) -> ImageSurface`

#### `fn create_for_data<F>(
data: Box<[u8]>,
free: F,
format: Format,
width: i32,
height: i32,
stride: i32
) -> ImageSurface where
F: FnOnce(Box<[u8]>) + 'static,`

#### `fn get_data(&mut self) -> Result<ImageSurfaceData, BorrowError>`

#### `fn get_format(&self) -> Format`

#### `fn get_height(&self) -> i32`

#### `fn get_stride(&self) -> i32`

#### `fn get_width(&self) -> i32`

## Methods from Deref<Target = Surface>

#### `fn status(&self) -> Status`

#### `fn create_similar(&self, content: Content, width: i32, height: i32) -> Surface`

## Trait Implementations

### `impl Debug for ImageSurface`
[src]

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

Formats the value using the given formatter.

### `impl<'a> ToGlibPtr<'a, *mut cairo_surface_t> for ImageSurface`
[src]

#### `type Storage = &'a Surface`

#### `fn to_glib_none(&'a self) -> Stash<'a, *mut cairo_surface_t, Self>`

Transfer: none. Read more

#### `fn to_glib_container(&'a self) -> Stash<'a, P, Self>`

Transfer: container. Read more

#### `fn to_glib_full(&self) -> P`

Transfer: full. Read more

### `impl FromGlibPtrNone<*mut cairo_surface_t> for ImageSurface`
[src]

#### `unsafe fn from_glib_none(ptr: *mut cairo_surface_t) -> ImageSurface`

### `impl FromGlibPtrFull<*mut cairo_surface_t> for ImageSurface`
[src]

#### `unsafe fn from_glib_full(ptr: *mut cairo_surface_t) -> ImageSurface`

### `impl AsRef<Surface> for ImageSurface`
[src]

#### `fn as_ref(&self) -> &Surface`

Performs the conversion.

### `impl Deref for ImageSurface`
[src]

#### `type Target = Surface`

The resulting type after dereferencing

#### `fn deref(&self) -> &Surface`

The method called to dereference a value

### `impl Clone for ImageSurface`
[src]

#### `fn clone(&self) -> ImageSurface`

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

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  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`)