Struct fltk::image::RgbImage [−][src]
pub struct RgbImage { /* fields omitted */ }
Expand description
Creates a struct holding a raw RGB image
Implementations
impl RgbImage
[src]
impl RgbImage
[src]pub fn new(
data: &[u8],
w: i32,
h: i32,
depth: ColorDepth
) -> Result<RgbImage, FltkError>
[src]
pub fn new(
data: &[u8],
w: i32,
h: i32,
depth: ColorDepth
) -> Result<RgbImage, FltkError>
[src]Initializes a new raw RgbImage
, copies the data and handles its lifetime.
If you need to work with RGB data,
Errors
Errors on invalid or unsupported image format
pub unsafe fn from_data(
data: &[u8],
w: i32,
h: i32,
depth: ColorDepth
) -> Result<RgbImage, FltkError>
[src]
pub unsafe fn from_data(
data: &[u8],
w: i32,
h: i32,
depth: ColorDepth
) -> Result<RgbImage, FltkError>
[src]pub unsafe fn new2(
data: &[u8],
w: i32,
h: i32,
depth: i32,
line_data: i32
) -> Result<RgbImage, FltkError>
[src]
pub unsafe fn new2(
data: &[u8],
w: i32,
h: i32,
depth: i32,
line_data: i32
) -> Result<RgbImage, FltkError>
[src]Trait Implementations
impl ImageExt for RgbImage
[src]
impl ImageExt for RgbImage
[src]fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]
fn draw(&mut self, arg2: i32, arg3: i32, arg4: i32, arg5: i32)
[src]Draws the image at the presupplied coordinates and size
unsafe fn as_image_ptr(&self) -> *mut Fl_Image
[src]
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]
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]
fn to_rgb_data(&self) -> Vec<u8>
[src]Returns the underlying raw rgb image data
fn to_raw_data(&self) -> *const *const u8
[src]
fn to_raw_data(&self) -> *const *const u8
[src]Returns the underlying raw image data
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]
fn scale(
&mut self,
width: i32,
height: i32,
proportional: bool,
can_expand: bool
)
[src]Scales the image
fn depth(&self) -> ColorDepth
[src]
fn depth(&self) -> ColorDepth
[src]Gets the image’s depth
unsafe fn increment_arc(&mut self)
[src]
unsafe fn increment_arc(&mut self)
[src]INTERNAL: Manually increment the atomic refcount Read more
unsafe fn decrement_arc(&mut self)
[src]
unsafe fn decrement_arc(&mut self)
[src]INTERNAL: Manually decrement the atomic refcount Read more
fn was_deleted(&self) -> bool
[src]
fn was_deleted(&self) -> bool
[src]Checks if the image was deleted
unsafe fn into_image<I: ImageExt>(self) -> I
[src]
unsafe fn into_image<I: ImageExt>(self) -> I
[src]Transforms an Image base into another Image Read more
impl Send for RgbImage
[src]
impl Sync for RgbImage
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
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]
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