Trait ContextExt

Source
pub trait ContextExt {
    // Required methods
    fn create_from_window(window: &Window) -> Context;
    fn cairo_draw_from_gl(
        cr: &Context,
        window: &Window,
        source: i32,
        source_type: i32,
        buffer_scale: i32,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
    );
    fn cairo_surface_create_from_pixbuf<T: IsA<Window>>(
        pixbuf: &Pixbuf,
        scale: i32,
        for_window: Option<&T>,
    ) -> Option<Surface>;
    fn get_clip_rectangle(&self) -> Option<Rectangle>;
    fn set_source_rgba(&self, rgba: &RGBA);
    fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64);
    fn set_source_window(&self, window: &Window, x: f64, y: f64);
    fn rectangle(&self, rectangle: &Rectangle);
    fn add_region(&self, region: &Region);
}

Required Methods§

Source

fn create_from_window(window: &Window) -> Context

Source

fn cairo_draw_from_gl( cr: &Context, window: &Window, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32, )

Source

fn cairo_surface_create_from_pixbuf<T: IsA<Window>>( pixbuf: &Pixbuf, scale: i32, for_window: Option<&T>, ) -> Option<Surface>

Source

fn get_clip_rectangle(&self) -> Option<Rectangle>

Source

fn set_source_rgba(&self, rgba: &RGBA)

Source

fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64)

Source

fn set_source_window(&self, window: &Window, x: f64, y: f64)

Source

fn rectangle(&self, rectangle: &Rectangle)

Source

fn add_region(&self, region: &Region)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ContextExt for Context

Source§

fn create_from_window(window: &Window) -> Context

Source§

fn cairo_draw_from_gl( cr: &Context, window: &Window, source: i32, source_type: i32, buffer_scale: i32, x: i32, y: i32, width: i32, height: i32, )

Source§

fn cairo_surface_create_from_pixbuf<T: IsA<Window>>( pixbuf: &Pixbuf, scale: i32, for_window: Option<&T>, ) -> Option<Surface>

Source§

fn get_clip_rectangle(&self) -> Option<Rectangle>

Source§

fn set_source_rgba(&self, rgba: &RGBA)

Source§

fn set_source_pixbuf(&self, pixbuf: &Pixbuf, x: f64, y: f64)

Source§

fn set_source_window(&self, window: &Window, x: f64, y: f64)

Source§

fn rectangle(&self, rectangle: &Rectangle)

Source§

fn add_region(&self, region: &Region)

Implementors§