Trait Image

Source
pub trait Image {
    // Required methods
    fn image_draw(
        &mut self,
        win: winid_t,
        image: u32,
        val1: i32,
        val2: i32,
    ) -> u32;
    fn image_draw_scaled(
        &mut self,
        win: winid_t,
        image: u32,
        val1: i32,
        val2: i32,
        width: u32,
        height: u32,
    ) -> u32;
    fn image_get_info(&mut self, image: u32) -> Option<(u32, u32)>;
    fn window_flow_break(&mut self, win: winid_t);
    fn window_erase_rect(
        &mut self,
        win: winid_t,
        left: i32,
        top: i32,
        width: u32,
        height: u32,
    );
    fn window_fill_rect(
        &mut self,
        win: winid_t,
        color: u32,
        left: i32,
        top: i32,
        width: u32,
        height: u32,
    );
    fn window_set_background_color(&mut self, win: winid_t, color: u32);
}
Expand description

GLK_MODULE_IMAGE

Required Methods§

Source

fn image_draw(&mut self, win: winid_t, image: u32, val1: i32, val2: i32) -> u32

Draws the given image resource in the given window. The position of the image is given by val1 and val2.

Source

fn image_draw_scaled( &mut self, win: winid_t, image: u32, val1: i32, val2: i32, width: u32, height: u32, ) -> u32

Draws the given image resource in the given window, scaling it to the given width and height. The position of the image is given by val1 and val2.

Source

fn image_get_info(&mut self, image: u32) -> Option<(u32, u32)>

Returns information about an image. Returns Some((width, height)), or None if the image does not exist.

Source

fn window_flow_break(&mut self, win: winid_t)

“Break” the stream of text down below the current margin image.

Source

fn window_erase_rect( &mut self, win: winid_t, left: i32, top: i32, width: u32, height: u32, )

Fills the given rectangle with the window’s background color.

Source

fn window_fill_rect( &mut self, win: winid_t, color: u32, left: i32, top: i32, width: u32, height: u32, )

Fills the given rectangle with the given color.

Source

fn window_set_background_color(&mut self, win: winid_t, color: u32)

Set the background color of the window.

Implementors§