[][src]Trait fltk::prelude::ImageTrait

pub trait ImageTrait {
    fn new(path: PathBuf) -> 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; }

Defines the methods implemented by all image types

Required methods

fn new(path: PathBuf) -> Self

Creates an image object from a path

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 pointer of the image, for internal use

Loading content...

Implementors

impl ImageTrait for BmpImage[src]

impl ImageTrait for GifImage[src]

impl ImageTrait for JpegImage[src]

impl ImageTrait for PngImage[src]

impl ImageTrait for SvgImage[src]

Loading content...