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

pub unsafe trait ImageExt {
    pub fn copy(&self) -> Self
    where
        Self: Sized
;
pub fn draw(&mut self, x: i32, y: i32, width: i32, height: i32);
pub fn width(&self) -> i32;
pub fn height(&self) -> i32;
pub unsafe fn as_image_ptr(&self) -> *mut Fl_Image;
pub unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
    where
        Self: Sized
;
pub fn to_rgb_data(&self) -> Vec<u8>;
pub fn to_raw_data(&self) -> *const *const u8;
pub fn to_rgb(&self) -> Result<RgbImage, FltkError>;
pub fn scale(
        &mut self,
        width: i32,
        height: i32,
        proportional: bool,
        can_expand: bool
    );
pub fn count(&self) -> u32;
pub fn data_w(&self) -> u32;
pub fn data_h(&self) -> u32;
pub fn depth(&self) -> u32;
pub fn ld(&self) -> u32;
pub fn inactive(&mut self);
pub fn into_png(self) -> Result<PngImage, FltkError>
    where
        Self: Sized
;
pub fn into_jpeg(self) -> Result<JpegImage, FltkError>
    where
        Self: Sized
;
pub fn into_bmp(self) -> Result<BmpImage, FltkError>
    where
        Self: Sized
;
pub unsafe fn delete(img: Self)
    where
        Self: Sized
;
pub fn was_deleted(&self) -> bool;
pub unsafe fn increment_arc(&mut self);
pub unsafe fn decrement_arc(&mut self);
pub unsafe fn into_image<I: ImageExt>(self) -> I
    where
        Self: Sized
; }

Defines the methods implemented by all image types

Required methods

pub fn copy(&self) -> Self where
    Self: Sized
[src]

Performs a deep copy of the image

pub fn draw(&mut self, x: i32, y: i32, width: i32, height: i32)[src]

Draws the image at the presupplied coordinates and size

pub fn width(&self) -> i32[src]

Return the width of the image

pub fn height(&self) -> i32[src]

Return the height of the image

pub unsafe fn as_image_ptr(&self) -> *mut Fl_Image[src]

Retunrs a pointer of the image

Safety

Can return multiple mutable pointers to the image

pub unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self where
    Self: Sized
[src]

Transforms a raw image pointer to an image

Safety

The pointer must be valid

pub fn to_rgb_data(&self) -> Vec<u8>[src]

Returns the underlying raw rgb image data

pub fn to_raw_data(&self) -> *const *const u8[src]

Returns the underlying raw image data

pub fn to_rgb(&self) -> Result<RgbImage, FltkError>[src]

Transforms the image into an RgbImage

pub fn scale(
    &mut self,
    width: i32,
    height: i32,
    proportional: bool,
    can_expand: bool
)
[src]

Scales the image

pub fn count(&self) -> u32[src]

Return the count of an image

pub fn data_w(&self) -> u32[src]

Gets the image's data width

pub fn data_h(&self) -> u32[src]

Gets the image's data height

pub fn depth(&self) -> u32[src]

Gets the image's depth

pub fn ld(&self) -> u32[src]

Gets the image's line data size

pub fn inactive(&mut self)[src]

Greys the image

pub fn into_png(self) -> Result<PngImage, FltkError> where
    Self: Sized
[src]

Transforms an image to a PngImage

pub fn into_jpeg(self) -> Result<JpegImage, FltkError> where
    Self: Sized
[src]

Transforms an image to a JpegImage

pub fn into_bmp(self) -> Result<BmpImage, FltkError> where
    Self: Sized
[src]

Transforms an image to a BmpImage

pub unsafe fn delete(img: Self) where
    Self: Sized
[src]

Deletes the image

Safety

An image shouldn't be deleted while it's being used by a widget

pub fn was_deleted(&self) -> bool[src]

Checks if the image was deleted

pub unsafe fn increment_arc(&mut self)[src]

INTERNAL: Manually increment the atomic refcount

Safety

The underlying image pointer must be valid

pub unsafe fn decrement_arc(&mut self)[src]

INTERNAL: Manually decrement the atomic refcount

Safety

The underlying image pointer must be valid

pub unsafe fn into_image<I: ImageExt>(self) -> I where
    Self: Sized
[src]

Transforms an Image base into another Image

Safety

Can be unsafe if used to downcast to an image of different format

Loading content...

Implementors

impl ImageExt for BmpImage[src]

impl ImageExt for GifImage[src]

impl ImageExt for Image[src]

impl ImageExt for JpegImage[src]

impl ImageExt for Pixmap[src]

impl ImageExt for PngImage[src]

impl ImageExt for PnmImage[src]

impl ImageExt for RgbImage[src]

impl ImageExt for SharedImage[src]

impl ImageExt for SvgImage[src]

impl ImageExt for TiledImage[src]

impl ImageExt for XbmImage[src]

impl ImageExt for XpmImage[src]

Loading content...