[−][src]Trait fltk::prelude::ImageExt
Defines the methods implemented by all image types
Required methods
fn copy(&self) -> Self
Creates a copy of the image
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
unsafe fn as_ptr(&self) -> *mut c_void
Returns a void pointer of the image, for internal use
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
Retunrs a pointer of the image
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
Transforms a raw image pointer to an image
fn to_rgb(&self) -> Vec<u8>
Returns the raw underlying image data
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
Scales the image
Implementors
impl ImageExt for BmpImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for GifImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for Image
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for JpegImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for PngImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for RgbImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for SharedImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
impl ImageExt for SvgImage
[src]
fn copy(&self) -> Self
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn width(&self) -> i32
[src]
fn height(&self) -> i32
[src]
unsafe fn as_ptr(&self) -> *mut c_void
[src]
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
unsafe fn from_image_ptr(ptr: *mut Fl_Image) -> Self
[src]
fn to_rgb(&self) -> Vec<u8>
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)