Skip to main content

WrapedContext

Struct WrapedContext 

Source
pub struct WrapedContext<'a> {
    pub context: *mut Context,
    pub surface: ImageSurface,
    pub images: &'a mut Vec<Image<Rgba>>,
}

Fields§

§context: *mut Context§surface: ImageSurface§images: &'a mut Vec<Image<Rgba>>

Implementations§

Source§

impl<'a> WrapedContext<'a>

Source

pub fn new(surface: ImageSurface, images: &'a mut Vec<Image<Rgba>>) -> Self

Source

pub fn push(&mut self)

Methods from Deref<Target = Context>§

Source

pub fn to_raw_none(&self) -> *mut cairo_t

Source

pub fn ensure_status(&self)

Source

pub fn status(&self) -> Status

Source

pub fn save(&self)

Source

pub fn restore(&self)

Source

pub fn get_target(&self) -> Surface

Source

pub fn push_group(&self)

Source

pub fn push_group_with_content(&self, content: Content)

Source

pub fn pop_group(&self) -> Pattern

Source

pub fn pop_group_to_source(&self)

Source

pub fn get_group_target(&self) -> Surface

Source

pub fn set_source_rgb(&self, red: f64, green: f64, blue: f64)

Source

pub fn set_source_rgba(&self, red: f64, green: f64, blue: f64, alpha: f64)

Source

pub fn set_source(&self, source: &Pattern)

Source

pub fn get_source(&self) -> Pattern

Source

pub fn set_source_surface(&self, surface: &Surface, x: f64, y: f64)

Source

pub fn set_antialias(&self, antialias: Antialias)

Source

pub fn get_antialias(&self) -> Antialias

Source

pub fn set_dash(&self, dashes: &[f64], offset: f64)

Source

pub fn get_dash_count(&self) -> i32

Source

pub fn get_dash(&self) -> (Vec<f64>, f64)

Source

pub fn get_dash_dashes(&self) -> Vec<f64>

Source

pub fn get_dash_offset(&self) -> f64

Source

pub fn set_fill_rule(&self, fill_rule: FillRule)

Source

pub fn get_fill_rule(&self) -> FillRule

Source

pub fn set_line_cap(&self, arg: LineCap)

Source

pub fn get_line_cap(&self) -> LineCap

Source

pub fn set_line_join(&self, arg: LineJoin)

Source

pub fn get_line_join(&self) -> LineJoin

Source

pub fn set_line_width(&self, arg: f64)

Source

pub fn get_line_width(&self) -> f64

Source

pub fn set_miter_limit(&self, arg: f64)

Source

pub fn get_miter_limit(&self) -> f64

Source

pub fn set_operator(&self, op: Operator)

Source

pub fn get_operator(&self) -> Operator

Source

pub fn set_tolerance(&self, arg: f64)

Source

pub fn get_tolerance(&self) -> f64

Source

pub fn clip(&self)

Source

pub fn clip_preserve(&self)

Source

pub fn clip_extents(&self) -> (f64, f64, f64, f64)

Source

pub fn in_clip(&self, x: f64, y: f64) -> bool

Source

pub fn reset_clip(&self)

Source

pub fn copy_clip_rectangle_list(&self) -> RectangleList

Source

pub fn fill(&self)

Source

pub fn fill_preserve(&self)

Source

pub fn fill_extents(&self) -> (f64, f64, f64, f64)

Source

pub fn in_fill(&self, x: f64, y: f64) -> bool

Source

pub fn mask(&self, pattern: &Pattern)

Source

pub fn mask_surface(&self, surface: &Surface, x: f64, y: f64)

Source

pub fn paint(&self)

Source

pub fn paint_with_alpha(&self, alpha: f64)

Source

pub fn stroke(&self)

Source

pub fn stroke_preserve(&self)

Source

pub fn stroke_extents(&self) -> (f64, f64, f64, f64)

Source

pub fn in_stroke(&self, x: f64, y: f64) -> bool

Source

pub fn copy_page(&self)

Source

pub fn show_page(&self)

Source

pub fn get_reference_count(&self) -> u32

Source

pub fn translate(&self, tx: f64, ty: f64)

Source

pub fn scale(&self, sx: f64, sy: f64)

Source

pub fn rotate(&self, angle: f64)

Source

pub fn transform(&self, matrix: Matrix)

Source

pub fn set_matrix(&self, matrix: Matrix)

Source

pub fn get_matrix(&self) -> Matrix

Source

pub fn identity_matrix(&self)

Source

pub fn user_to_device(&self, x: f64, y: f64) -> (f64, f64)

Source

pub fn user_to_device_distance(&self, dx: f64, dy: f64) -> (f64, f64)

Source

pub fn device_to_user(&self, x: f64, y: f64) -> (f64, f64)

Source

pub fn device_to_user_distance(&self, dx: f64, dy: f64) -> (f64, f64)

Source

pub fn select_font_face( &self, family: &str, slant: FontSlant, weight: FontWeight, )

Source

pub fn set_font_size(&self, size: f64)

Source

pub fn set_font_matrix(&self, matrix: Matrix)

Source

pub fn get_font_matrix(&self) -> Matrix

Source

pub fn set_font_options(&self, options: &FontOptions)

Source

pub fn get_font_options(&self) -> FontOptions

Source

pub fn set_font_face(&self, font_face: &FontFace)

Source

pub fn get_font_face(&self) -> FontFace

Source

pub fn set_scaled_font(&self, scaled_font: &ScaledFont)

Source

pub fn get_scaled_font(&self) -> ScaledFont

Source

pub fn show_text(&self, text: &str)

Source

pub fn show_glyphs(&self, glyphs: &[Glyph])

Source

pub fn show_text_glyphs( &self, text: &str, glyphs: &[Glyph], clusters: &[TextCluster], cluster_flags: TextClusterFlags, )

Source

pub fn font_extents(&self) -> FontExtents

Source

pub fn text_extents(&self, text: &str) -> TextExtents

Source

pub fn glyph_extents(&self, glyphs: &[Glyph]) -> TextExtents

Source

pub fn copy_path(&self) -> Path

Source

pub fn copy_path_flat(&self) -> Path

Source

pub fn append_path(&self, path: &Path)

Source

pub fn has_current_point(&self) -> bool

Source

pub fn get_current_point(&self) -> (f64, f64)

Source

pub fn new_path(&self)

Source

pub fn new_sub_path(&self)

Source

pub fn close_path(&self)

Source

pub fn arc(&self, xc: f64, yc: f64, radius: f64, angle1: f64, angle2: f64)

Source

pub fn arc_negative( &self, xc: f64, yc: f64, radius: f64, angle1: f64, angle2: f64, )

Source

pub fn curve_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64)

Source

pub fn line_to(&self, x: f64, y: f64)

Source

pub fn move_to(&self, x: f64, y: f64)

Source

pub fn rectangle(&self, x: f64, y: f64, width: f64, height: f64)

Source

pub fn text_path(&self, str_: &str)

Source

pub fn glyph_path(&self, glyphs: &[Glyph])

Source

pub fn rel_curve_to( &self, dx1: f64, dy1: f64, dx2: f64, dy2: f64, dx3: f64, dy3: f64, )

Source

pub fn rel_line_to(&self, dx: f64, dy: f64)

Source

pub fn rel_move_to(&self, dx: f64, dy: f64)

Source

pub fn path_extents(&self) -> (f64, f64, f64, f64)

Trait Implementations§

Source§

impl<'a> Deref for WrapedContext<'a>

Source§

type Target = Context

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Context

Dereferences the value.
Source§

impl<'a> Drop for WrapedContext<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<'a> !Send for WrapedContext<'a>

§

impl<'a> !Sync for WrapedContext<'a>

§

impl<'a> !UnwindSafe for WrapedContext<'a>

§

impl<'a> Freeze for WrapedContext<'a>

§

impl<'a> RefUnwindSafe for WrapedContext<'a>

§

impl<'a> Unpin for WrapedContext<'a>

§

impl<'a> UnsafeUnpin for WrapedContext<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.