[][src]Trait fltk::prelude::ImageExt

pub trait ImageExt {
    fn new(path: &Path) -> Self;
fn copy(&self) -> Self;
fn draw(&mut self, x: i32, y: i32, width: i32, height: i32);
fn width(&self) -> i32;
fn height(&self) -> i32;
fn as_ptr(&self) -> *mut c_void;
fn as_image_ptr(&self) -> *mut Fl_Image;
fn from_image_ptr(ptr: *mut Fl_Image) -> Self;
fn as_bytes<'a>(&self) -> &'a [u8]; }

Defines the methods implemented by all image types

Required methods

fn new(path: &Path) -> Self

Creates an image object from a path

fn copy(&self) -> Self

Creates a copy of the image

fn draw(&mut self, x: i32, y: i32, width: i32, height: i32)

Draws the image at the presupplied coordinates and size

fn width(&self) -> i32

Return the width of the image

fn height(&self) -> i32

Return the height of the image

fn as_ptr(&self) -> *mut c_void

Returns a void pointer of the image, for internal use

fn as_image_ptr(&self) -> *mut Fl_Image

Retunrs a pointer of the image

fn from_image_ptr(ptr: *mut Fl_Image) -> Self

Transforms a raw image pointer to an image

fn as_bytes<'a>(&self) -> &'a [u8]

Returns the raw underlying image data

Loading content...

Implementors

impl ImageExt for BmpImage[src]

impl ImageExt for GifImage[src]

impl ImageExt for JpegImage[src]

impl ImageExt for PngImage[src]

impl ImageExt for SvgImage[src]

Loading content...