Struct fltk::surface::ImageSurface[][src]

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

An image surface object. Example usage:

use fltk::{prelude::*, *};
let but = button::Button::new(0, 0, 80, 40, "Click");
let sur = surface::ImageSurface::new(but.width(), but.height(), false);
surface::ImageSurface::push_current(&sur);
draw::set_draw_color(enums::Color::White);
draw::draw_rectf(0, 0, but.width(), but.height());
sur.draw(&but, 0, 0);
let img = sur.image().unwrap();
surface::ImageSurface::pop_current();

Implementations

Creates a new image surface

Gets the image of an image surface as an rgb image

Gets the high resolution image of an image surface as a shared image

Gets the origin coordinates of an image surface

Set the origin coordinates of an image surface

Rescale an image surface

Draw a widget on the image surface

draw a decorated window

Trait Implementations

Executes the destructor for this type. Read more

Checks whether this surface is the current surface

Get the current surface

Push a surface as a current surface

Pop the current surface

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.