Struct cairo::Context [−][src]
pub struct Context(_, _);
Methods
impl Context[src]
impl Contextpub unsafe fn from_raw_none(ptr: *mut cairo_t) -> Context[src]
pub unsafe fn from_raw_none(ptr: *mut cairo_t) -> Contextpub unsafe fn from_raw_borrow(ptr: *mut cairo_t) -> Context[src]
pub unsafe fn from_raw_borrow(ptr: *mut cairo_t) -> Contextpub unsafe fn from_raw_full(ptr: *mut cairo_t) -> Context[src]
pub unsafe fn from_raw_full(ptr: *mut cairo_t) -> Contextpub fn to_raw_none(&self) -> *mut cairo_t[src]
pub fn to_raw_none(&self) -> *mut cairo_tpub fn ensure_status(&self)[src]
pub fn ensure_status(&self)pub fn new<T: AsRef<Surface>>(target: &T) -> Context[src]
pub fn new<T: AsRef<Surface>>(target: &T) -> Contextpub fn status(&self) -> Status[src]
pub fn status(&self) -> Statuspub fn save(&self)[src]
pub fn save(&self)pub fn restore(&self)[src]
pub fn restore(&self)pub fn get_target(&self) -> Surface[src]
pub fn get_target(&self) -> Surfacepub fn push_group(&self)[src]
pub fn push_group(&self)pub fn push_group_with_content(&self, content: Content)[src]
pub fn push_group_with_content(&self, content: Content)pub fn pop_group(&self) -> Pattern[src]
pub fn pop_group(&self) -> Patternpub fn pop_group_to_source(&self)[src]
pub fn pop_group_to_source(&self)pub fn get_group_target(&self) -> Surface[src]
pub fn get_group_target(&self) -> Surfacepub fn set_source_rgb(&self, red: f64, green: f64, blue: f64)[src]
pub fn set_source_rgb(&self, red: f64, green: f64, blue: f64)pub fn set_source_rgba(&self, red: f64, green: f64, blue: f64, alpha: f64)[src]
pub fn set_source_rgba(&self, red: f64, green: f64, blue: f64, alpha: f64)pub fn set_source(&self, source: &Pattern)[src]
pub fn set_source(&self, source: &Pattern)pub fn get_source(&self) -> Pattern[src]
pub fn get_source(&self) -> Patternpub fn set_source_surface<T: AsRef<Surface>>(&self, surface: &T, x: f64, y: f64)[src]
pub fn set_source_surface<T: AsRef<Surface>>(&self, surface: &T, x: f64, y: f64)pub fn set_antialias(&self, antialias: Antialias)[src]
pub fn set_antialias(&self, antialias: Antialias)pub fn get_antialias(&self) -> Antialias[src]
pub fn get_antialias(&self) -> Antialiaspub fn set_dash(&self, dashes: &[f64], offset: f64)[src]
pub fn set_dash(&self, dashes: &[f64], offset: f64)pub fn get_dash_count(&self) -> i32[src]
pub fn get_dash_count(&self) -> i32pub fn get_dash(&self) -> (Vec<f64>, f64)[src]
pub fn get_dash(&self) -> (Vec<f64>, f64)pub fn get_dash_dashes(&self) -> Vec<f64>[src]
pub fn get_dash_dashes(&self) -> Vec<f64>pub fn get_dash_offset(&self) -> f64[src]
pub fn get_dash_offset(&self) -> f64pub fn set_fill_rule(&self, fill_rule: FillRule)[src]
pub fn set_fill_rule(&self, fill_rule: FillRule)pub fn get_fill_rule(&self) -> FillRule[src]
pub fn get_fill_rule(&self) -> FillRulepub fn set_line_cap(&self, arg: LineCap)[src]
pub fn set_line_cap(&self, arg: LineCap)pub fn get_line_cap(&self) -> LineCap[src]
pub fn get_line_cap(&self) -> LineCappub fn set_line_join(&self, arg: LineJoin)[src]
pub fn set_line_join(&self, arg: LineJoin)pub fn get_line_join(&self) -> LineJoin[src]
pub fn get_line_join(&self) -> LineJoinpub fn set_line_width(&self, arg: f64)[src]
pub fn set_line_width(&self, arg: f64)pub fn get_line_width(&self) -> f64[src]
pub fn get_line_width(&self) -> f64pub fn set_miter_limit(&self, arg: f64)[src]
pub fn set_miter_limit(&self, arg: f64)pub fn get_miter_limit(&self) -> f64[src]
pub fn get_miter_limit(&self) -> f64pub fn set_operator(&self, op: Operator)[src]
pub fn set_operator(&self, op: Operator)pub fn get_operator(&self) -> Operator[src]
pub fn get_operator(&self) -> Operatorpub fn set_tolerance(&self, arg: f64)[src]
pub fn set_tolerance(&self, arg: f64)pub fn get_tolerance(&self) -> f64[src]
pub fn get_tolerance(&self) -> f64pub fn clip(&self)[src]
pub fn clip(&self)pub fn clip_preserve(&self)[src]
pub fn clip_preserve(&self)pub fn clip_extents(&self) -> (f64, f64, f64, f64)[src]
pub fn clip_extents(&self) -> (f64, f64, f64, f64)pub fn in_clip(&self, x: f64, y: f64) -> bool[src]
pub fn in_clip(&self, x: f64, y: f64) -> boolpub fn reset_clip(&self)[src]
pub fn reset_clip(&self)pub fn copy_clip_rectangle_list(&self) -> RectangleList[src]
pub fn copy_clip_rectangle_list(&self) -> RectangleListpub fn fill(&self)[src]
pub fn fill(&self)pub fn fill_preserve(&self)[src]
pub fn fill_preserve(&self)pub fn fill_extents(&self) -> (f64, f64, f64, f64)[src]
pub fn fill_extents(&self) -> (f64, f64, f64, f64)pub fn in_fill(&self, x: f64, y: f64) -> bool[src]
pub fn in_fill(&self, x: f64, y: f64) -> boolpub fn mask(&self, pattern: &Pattern)[src]
pub fn mask(&self, pattern: &Pattern)pub fn mask_surface(&self, surface: &Surface, x: f64, y: f64)[src]
pub fn mask_surface(&self, surface: &Surface, x: f64, y: f64)pub fn paint(&self)[src]
pub fn paint(&self)pub fn paint_with_alpha(&self, alpha: f64)[src]
pub fn paint_with_alpha(&self, alpha: f64)pub fn stroke(&self)[src]
pub fn stroke(&self)pub fn stroke_preserve(&self)[src]
pub fn stroke_preserve(&self)pub fn stroke_extents(&self) -> (f64, f64, f64, f64)[src]
pub fn stroke_extents(&self) -> (f64, f64, f64, f64)pub fn in_stroke(&self, x: f64, y: f64) -> bool[src]
pub fn in_stroke(&self, x: f64, y: f64) -> boolpub fn copy_page(&self)[src]
pub fn copy_page(&self)pub fn show_page(&self)[src]
pub fn show_page(&self)pub fn get_reference_count(&self) -> u32[src]
pub fn get_reference_count(&self) -> u32pub fn translate(&self, tx: f64, ty: f64)[src]
pub fn translate(&self, tx: f64, ty: f64)pub fn scale(&self, sx: f64, sy: f64)[src]
pub fn scale(&self, sx: f64, sy: f64)pub fn rotate(&self, angle: f64)[src]
pub fn rotate(&self, angle: f64)pub fn transform(&self, matrix: Matrix)[src]
pub fn transform(&self, matrix: Matrix)pub fn set_matrix(&self, matrix: Matrix)[src]
pub fn set_matrix(&self, matrix: Matrix)pub fn get_matrix(&self) -> Matrix[src]
pub fn get_matrix(&self) -> Matrixpub fn identity_matrix(&self)[src]
pub fn identity_matrix(&self)pub fn user_to_device(&self, x: f64, y: f64) -> (f64, f64)[src]
pub fn user_to_device(&self, x: f64, y: f64) -> (f64, f64)pub fn user_to_device_distance(&self, dx: f64, dy: f64) -> (f64, f64)[src]
pub fn user_to_device_distance(&self, dx: f64, dy: f64) -> (f64, f64)pub fn device_to_user(&self, x: f64, y: f64) -> (f64, f64)[src]
pub fn device_to_user(&self, x: f64, y: f64) -> (f64, f64)pub fn device_to_user_distance(&self, dx: f64, dy: f64) -> (f64, f64)[src]
pub fn device_to_user_distance(&self, dx: f64, dy: f64) -> (f64, f64)pub fn select_font_face(
&self,
family: &str,
slant: FontSlant,
weight: FontWeight
)[src]
pub fn select_font_face(
&self,
family: &str,
slant: FontSlant,
weight: FontWeight
)pub fn set_font_size(&self, size: f64)[src]
pub fn set_font_size(&self, size: f64)pub fn set_font_matrix(&self, matrix: Matrix)[src]
pub fn set_font_matrix(&self, matrix: Matrix)pub fn get_font_matrix(&self) -> Matrix[src]
pub fn get_font_matrix(&self) -> Matrixpub fn set_font_options(&self, options: &FontOptions)[src]
pub fn set_font_options(&self, options: &FontOptions)pub fn get_font_options(&self) -> FontOptions[src]
pub fn get_font_options(&self) -> FontOptionspub fn set_font_face(&self, font_face: &FontFace)[src]
pub fn set_font_face(&self, font_face: &FontFace)pub fn get_font_face(&self) -> FontFace[src]
pub fn get_font_face(&self) -> FontFacepub fn set_scaled_font(&self, scaled_font: &ScaledFont)[src]
pub fn set_scaled_font(&self, scaled_font: &ScaledFont)pub fn get_scaled_font(&self) -> ScaledFont[src]
pub fn get_scaled_font(&self) -> ScaledFontpub fn show_text(&self, text: &str)[src]
pub fn show_text(&self, text: &str)pub fn show_glyphs(&self, glyphs: &[Glyph])[src]
pub fn show_glyphs(&self, glyphs: &[Glyph])pub fn show_text_glyphs(
&self,
text: &str,
glyphs: &[Glyph],
clusters: &[TextCluster],
cluster_flags: TextClusterFlags
)[src]
pub fn show_text_glyphs(
&self,
text: &str,
glyphs: &[Glyph],
clusters: &[TextCluster],
cluster_flags: TextClusterFlags
)pub fn font_extents(&self) -> FontExtents[src]
pub fn font_extents(&self) -> FontExtentspub fn text_extents(&self, text: &str) -> TextExtents[src]
pub fn text_extents(&self, text: &str) -> TextExtentspub fn glyph_extents(&self, glyphs: &[Glyph]) -> TextExtents[src]
pub fn glyph_extents(&self, glyphs: &[Glyph]) -> TextExtentspub fn copy_path(&self) -> Path[src]
pub fn copy_path(&self) -> Pathpub fn copy_path_flat(&self) -> Path[src]
pub fn copy_path_flat(&self) -> Pathpub fn append_path(&self, path: &Path)[src]
pub fn append_path(&self, path: &Path)pub fn has_current_point(&self) -> bool[src]
pub fn has_current_point(&self) -> boolpub fn get_current_point(&self) -> (f64, f64)[src]
pub fn get_current_point(&self) -> (f64, f64)pub fn new_path(&self)[src]
pub fn new_path(&self)pub fn new_sub_path(&self)[src]
pub fn new_sub_path(&self)pub fn close_path(&self)[src]
pub fn close_path(&self)pub fn arc(&self, xc: f64, yc: f64, radius: f64, angle1: f64, angle2: f64)[src]
pub fn arc(&self, xc: f64, yc: f64, radius: f64, angle1: f64, angle2: f64)pub fn arc_negative(
&self,
xc: f64,
yc: f64,
radius: f64,
angle1: f64,
angle2: f64
)[src]
pub fn arc_negative(
&self,
xc: f64,
yc: f64,
radius: f64,
angle1: f64,
angle2: f64
)pub fn curve_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64)[src]
pub fn curve_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64)pub fn line_to(&self, x: f64, y: f64)[src]
pub fn line_to(&self, x: f64, y: f64)pub fn move_to(&self, x: f64, y: f64)[src]
pub fn move_to(&self, x: f64, y: f64)pub fn rectangle(&self, x: f64, y: f64, width: f64, height: f64)[src]
pub fn rectangle(&self, x: f64, y: f64, width: f64, height: f64)pub fn text_path(&self, str_: &str)[src]
pub fn text_path(&self, str_: &str)pub fn glyph_path(&self, glyphs: &[Glyph])[src]
pub fn glyph_path(&self, glyphs: &[Glyph])pub fn rel_curve_to(
&self,
dx1: f64,
dy1: f64,
dx2: f64,
dy2: f64,
dx3: f64,
dy3: f64
)[src]
pub fn rel_curve_to(
&self,
dx1: f64,
dy1: f64,
dx2: f64,
dy2: f64,
dx3: f64,
dy3: f64
)pub fn rel_line_to(&self, dx: f64, dy: f64)[src]
pub fn rel_line_to(&self, dx: f64, dy: f64)pub fn rel_move_to(&self, dx: f64, dy: f64)[src]
pub fn rel_move_to(&self, dx: f64, dy: f64)Trait Implementations
impl Debug for Context[src]
impl Debug for Contextfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a> ToGlibPtr<'a, *mut cairo_t> for &'a Context[src]
impl<'a> ToGlibPtr<'a, *mut cairo_t> for &'a Contexttype Storage = &'a Context
fn to_glib_none(&self) -> Stash<'a, *mut cairo_t, &'a Context>[src]
fn to_glib_none(&self) -> Stash<'a, *mut cairo_t, &'a Context>Transfer: none. Read more
fn to_glib_full(&self) -> *mut cairo_t[src]
fn to_glib_full(&self) -> *mut cairo_tTransfer: full. Read more
fn to_glib_container(&'a self) -> Stash<'a, P, Self>[src]
fn to_glib_container(&'a self) -> Stash<'a, P, Self>Transfer: container. Read more
impl FromGlibPtrNone<*mut cairo_t> for Context[src]
impl FromGlibPtrNone<*mut cairo_t> for Contextunsafe fn from_glib_none(ptr: *mut cairo_t) -> Context[src]
unsafe fn from_glib_none(ptr: *mut cairo_t) -> Contextimpl FromGlibPtrBorrow<*mut cairo_t> for Context[src]
impl FromGlibPtrBorrow<*mut cairo_t> for Contextunsafe fn from_glib_borrow(ptr: *mut cairo_t) -> Context[src]
unsafe fn from_glib_borrow(ptr: *mut cairo_t) -> Contextimpl FromGlibPtrFull<*mut cairo_t> for Context[src]
impl FromGlibPtrFull<*mut cairo_t> for Contextunsafe fn from_glib_full(ptr: *mut cairo_t) -> Context[src]
unsafe fn from_glib_full(ptr: *mut cairo_t) -> Contextimpl StaticType for Context[src]
impl StaticType for Contextfn static_type() -> Type[src]
fn static_type() -> TypeReturns the type identifier of Self.
impl<'a> FromValueOptional<'a> for Context[src]
impl<'a> FromValueOptional<'a> for Contextunsafe fn from_value_optional(v: &'a Value) -> Option<Self>[src]
unsafe fn from_value_optional(v: &'a Value) -> Option<Self>impl SetValue for Context[src]
impl SetValue for Contextimpl SetValueOptional for Context[src]
impl SetValueOptional for Contextunsafe fn set_value_optional(v: &mut Value, s: Option<&Self>)[src]
unsafe fn set_value_optional(v: &mut Value, s: Option<&Self>)impl AsRef<Context> for Context[src]
impl AsRef<Context> for Contextimpl Clone for Context[src]
impl Clone for Contextfn clone(&self) -> Context[src]
fn clone(&self) -> ContextReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)1.0.0
[src]Performs copy-assignment from source. Read more
impl Drop for Context[src]
impl Drop for Context