Struct fltk::image::SharedImage[][src]

pub struct SharedImage { /* fields omitted */ }
Expand description

Creates a struct holding a shared image

Implementations

impl SharedImage[src]

pub fn load<P: AsRef<Path>>(path: P) -> Result<SharedImage, FltkError>[src]

Loads a SharedImage from a path

Errors

Errors on non-existent path or invalid format

pub fn from_image<I: ImageExt>(image: I) -> Result<SharedImage, FltkError>[src]

Loads a SharedImage from an image

Errors

Errors on unsupported SharedImage types

Trait Implementations

impl Clone for SharedImage[src]

fn clone(&self) -> Self[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for SharedImage[src]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

impl Drop for SharedImage[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl ImageExt for SharedImage[src]

fn copy(&self) -> Self[src]

Performs a deep copy of the image

fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)[src]

Draws the image at the presupplied coordinates and size

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

Return the width of the image

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

Return the height of the image

fn w(&self) -> i32[src]

Return the width of the image

fn h(&self) -> i32[src]

Return the height of the image

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

Retunrs a pointer of the image Read more

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

Transforms a raw image pointer to an image Read more

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

Returns the underlying raw rgb image data

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

Returns the underlying raw image data

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

Transforms the image into an RgbImage Read more

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

Scales the image

fn count(&self) -> i32[src]

Return the count of an image

fn data_w(&self) -> i32[src]

Gets the image’s data width

fn data_h(&self) -> i32[src]

Gets the image’s data height

fn depth(&self) -> ColorDepth[src]

Gets the image’s depth

fn ld(&self) -> i32[src]

Gets the image’s line data size

fn inactive(&mut self)[src]

Greys the image

unsafe fn delete(img: Self)[src]

Deletes the image Read more

unsafe fn increment_arc(&mut self)[src]

INTERNAL: Manually increment the atomic refcount Read more

unsafe fn decrement_arc(&mut self)[src]

INTERNAL: Manually decrement the atomic refcount Read more

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

Checks if the image was deleted

unsafe fn into_image<I: ImageExt>(self) -> I[src]

Transforms an Image base into another Image Read more

impl Send for SharedImage[src]

impl Sync for SharedImage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

pub fn to_owned(&self) -> T[src]

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.