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

pub unsafe trait ImageExt {
Show 24 methods fn copy(&self) -> Self
    where
        Self: Sized
;
fn draw(&mut self, x: i32, y: i32, width: i32, height: i32);
fn draw_ext(
        &mut self,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
        cx: i32,
        cy: i32
    );
fn width(&self) -> i32;
fn height(&self) -> i32;
fn w(&self) -> i32;
fn h(&self) -> i32;
unsafe fn as_image_ptr(&self) -> *mut Fl_Image;
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
    where
        Self: Sized
;
fn to_rgb_data(&self) -> Vec<u8>;
fn to_raw_data(&self) -> *const *const u8;
fn to_rgb(&self) -> Result<RgbImage, FltkError>;
fn scale(
        &mut self,
        width: i32,
        height: i32,
        proportional: bool,
        can_expand: bool
    );
fn count(&self) -> i32;
fn data_w(&self) -> i32;
fn data_h(&self) -> i32;
fn depth(&self) -> ColorDepth;
fn ld(&self) -> i32;
fn inactive(&mut self);
unsafe fn delete(img: Self)
    where
        Self: Sized
;
fn was_deleted(&self) -> bool;
unsafe fn increment_arc(&mut self);
unsafe fn decrement_arc(&mut self);
unsafe fn into_image<I: ImageExt>(self) -> I
    where
        Self: Sized
;
}
Expand description

Defines the methods implemented by all image types

Required methods

Performs a deep copy of the image

Draws the image at the presupplied coordinates and size

Draws the image at the presupplied coordinates and size and offset cx, cy

Return the width of the image

Return the height of the image

Return the width of the image

Return the height of the image

Retunrs a pointer of the image

Safety

Can return multiple mutable pointers to the image

Transforms a raw image pointer to an image

Safety

The pointer must be valid

Returns the underlying raw rgb image data

Returns the underlying raw image data

Transforms the image into an RgbImage

Errors

Errors on failure to transform to RgbImage

Scales the image

Return the count of pointers in an image (Pixmaps have more than 1, bitmaps have 0, Rgb based images have 1)

Gets the image’s data width

Gets the image’s data height

Gets the image’s depth

Gets the image’s line data size

Greys the image

Deletes the image

Safety

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

Checks if the image was deleted

INTERNAL: Manually increment the atomic refcount

Safety

The underlying image pointer must be valid

INTERNAL: Manually decrement the atomic refcount

Safety

The underlying image pointer must be valid

Transforms an Image base into another Image

Safety

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

Implementors