pub struct PngImage { /* private fields */ }Expand description
Creates a struct holding a PNG image
Implementations
Trait Implementations
sourceimpl ImageExt for PngImage
impl ImageExt for PngImage
sourcefn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
Draws the image at the presupplied coordinates and size
sourcefn draw_ext(
&mut self,
arg2: i32,
arg3: i32,
arg4: i32,
arg5: i32,
cx: i32,
cy: i32
)
fn draw_ext(
&mut self,
arg2: i32,
arg3: i32,
arg4: i32,
arg5: i32,
cx: i32,
cy: i32
)
Draws the image at the presupplied coordinates and size and offset cx, cy
sourceunsafe fn as_image_ptr(&self) -> *mut Fl_Image
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
Returns a pointer of the image Read more
sourceunsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
Transforms a raw image pointer to an image Read more
sourcefn to_rgb_data(&self) -> Vec<u8>
fn to_rgb_data(&self) -> Vec<u8>
Returns the underlying raw rgb image data
sourcefn to_raw_data(&self) -> *const *const u8
fn to_raw_data(&self) -> *const *const u8
Returns the underlying raw image data
sourcefn to_rgb(&self) -> Result<RgbImage, FltkError>
fn to_rgb(&self) -> Result<RgbImage, FltkError>
Transforms the image into an RgbImage Read more
sourcefn to_rgb_image(&self) -> Result<RgbImage, FltkError>
fn to_rgb_image(&self) -> Result<RgbImage, FltkError>
Transforms the image into an RgbImage Read more
sourcefn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
Scales the image
sourcefn count(&self) -> i32
fn count(&self) -> i32
Return the count of pointers in an image (Pixmaps have more than 1, bitmaps have 0, Rgb based images have 1)
sourcefn depth(&self) -> ColorDepth
fn depth(&self) -> ColorDepth
Gets the image’s depth
sourcefn was_deleted(&self) -> bool
fn was_deleted(&self) -> bool
Checks if the image was deleted
sourceunsafe fn into_image<I: ImageExt>(self) -> I
unsafe fn into_image<I: ImageExt>(self) -> I
Transforms an Image base into another Image Read more
impl Eq for PngImage
impl Send for PngImage
impl Sync for PngImage
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more