Trait ux::CanvasContext [−][src]
pub trait CanvasContext { type Pattern;}Show methods
pub fn get_direction(&self) -> Direction; pub fn set_direction(&self, value: Direction) -> String; pub fn set_fill_color(&self, value: Color<f64>); pub fn set_fill_gradient(&self, value: &Gradient); pub fn set_fill_pattern(&self, value: &Self::Pattern); pub fn get_filter(&self) -> String; pub fn set_filter(&self, value: &str); pub fn get_font(&self) -> String; pub fn set_font(
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
); pub fn get_global_alpha(&self) -> f64; pub fn set_global_alpha(&self, value: f64); pub fn get_global_composite_operation(&self) -> String; pub fn set_global_composite_operation(&self, value: &str); pub fn is_image_smoothing_enabled(&self) -> bool; pub fn set_image_smoothing(&self, value: bool); pub fn get_line_cap(&self) -> LineCap; pub fn set_line_cap(&self, value: LineCap); pub fn get_line_dash_offset(&self) -> f64; pub fn set_line_dash_offset(&self, value: f64); pub fn get_line_join(&self) -> LineJoin; pub fn set_line_join(&self, value: LineJoin); pub fn get_line_width(&self) -> f64; pub fn set_line_width(&self, value: f64); pub fn get_miter_limit(&self) -> f64; pub fn set_miter_limit(&self, value: f64); pub fn get_shadow_blur(&self) -> f64; pub fn set_shadow_blur(&self, value: f64); pub fn get_shadow_color(&self) -> Color<f64>; pub fn set_shadow_color(&self, value: Color<f64>); pub fn get_shadow_offset_x(&self) -> f64; pub fn set_shadow_offset_x(&self, value: f64); pub fn get_shadow_offset_y(&self) -> f64; pub fn set_shadow_offset_y(&self, value: f64); pub fn set_stroke_color(&self, value: Color<f64>); pub fn set_stroke_gradient(&self, value: &Gradient); pub fn set_stroke_pattern(&self, value: &Self::Pattern); pub fn get_text_align(&self) -> TextAlign; pub fn set_text_align(&self, value: TextAlign); pub fn get_text_baseline(&self) -> BaseLine; pub fn set_text_baseline(&self, value: BaseLine); pub fn arc(
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
); pub fn arc_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, radius: f64); pub fn begin_path(&self); pub fn bezier_curve_to(
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
); pub fn clear_rect(&self, x: f64, y: f64, width: f64, height: f64); pub fn close_path(&self); pub fn ellipse(
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
); pub fn fill(&self); pub fn fill_rect(&self, x: f64, y: f64, width: f64, height: f64); pub fn fill_text(&self, text: &str, x: f64, y: f64); pub fn get_line_dash(&self) -> Vec<f64, Global>ⓘ; pub fn line_to(&self, x: f64, y: f64); pub fn measure_text(&self, text: &str) -> TextMetrics; pub fn move_to(&self, x: f64, y: f64); pub fn quadratic_curve_to(&self, cpx: f64, cpy: f64, x: f64, y: f64); pub fn rect(&self, x: f64, y: f64, width: f64, height: f64); pub fn reset_transform(&self); pub fn restore(&self); pub fn rotate(&self, angle: f64); pub fn save(&self); pub fn scale(&self, x: f64, y: f64); pub fn set_line_dash(&self, dash: &Vec<f64, Global>); pub fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64); pub fn stroke(&self); pub fn stroke_rect(&self, x: f64, y: f64, width: f64, height: f64); pub fn stroke_text(&self, text: &str, x: f64, y: f64); pub fn transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64); pub fn translate(&self, x: f64, y: f64);
Associated Types
Loading content...Required methods
pub fn get_direction(&self) -> Direction
[src]
Get direction
pub fn set_direction(&self, value: Direction) -> String
[src]
Set direction
pub fn set_fill_color(&self, value: Color<f64>)
[src]
Set fill color
pub fn set_fill_gradient(&self, value: &Gradient)
[src]
Set fill gradient
pub fn set_fill_pattern(&self, value: &Self::Pattern)
[src]
Set fill pattern
pub fn get_filter(&self) -> String
[src]
Get filter
pub fn set_filter(&self, value: &str)
[src]
Set filter
pub fn get_font(&self) -> String
[src]
Get font
pub fn set_font(
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
[src]
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
Set direction
pub fn get_global_alpha(&self) -> f64
[src]
Get global alpha
pub fn set_global_alpha(&self, value: f64)
[src]
Set global alpha
pub fn get_global_composite_operation(&self) -> String
[src]
Get global composite operation
pub fn set_global_composite_operation(&self, value: &str)
[src]
Set global composite operation
pub fn is_image_smoothing_enabled(&self) -> bool
[src]
Whether images and patterns on this canvas will be smoothed when this canvas is scaled.
pub fn set_image_smoothing(&self, value: bool)
[src]
Set image smoothing
pub fn get_line_cap(&self) -> LineCap
[src]
Get line cap
pub fn set_line_cap(&self, value: LineCap)
[src]
Set line cap
pub fn get_line_dash_offset(&self) -> f64
[src]
Get line dash offset
pub fn set_line_dash_offset(&self, value: f64)
[src]
Set line dash offset
pub fn get_line_join(&self) -> LineJoin
[src]
Get line join
pub fn set_line_join(&self, value: LineJoin)
[src]
Set line dash
pub fn get_line_width(&self) -> f64
[src]
Get line width
pub fn set_line_width(&self, value: f64)
[src]
Set line width
pub fn get_miter_limit(&self) -> f64
[src]
Get miter limit
pub fn set_miter_limit(&self, value: f64)
[src]
Set miter limit
pub fn get_shadow_blur(&self) -> f64
[src]
Get shadow blur
pub fn set_shadow_blur(&self, value: f64)
[src]
Set shadow blur
pub fn get_shadow_color(&self) -> Color<f64>
[src]
Get shadow color
pub fn set_shadow_color(&self, value: Color<f64>)
[src]
Set shadow color
pub fn get_shadow_offset_x(&self) -> f64
[src]
Get shadow offset x
pub fn set_shadow_offset_x(&self, value: f64)
[src]
Set shadow offset x
pub fn get_shadow_offset_y(&self) -> f64
[src]
Get shadow offset y
pub fn set_shadow_offset_y(&self, value: f64)
[src]
Set shadow offset y
pub fn set_stroke_color(&self, value: Color<f64>)
[src]
Set stroke color
pub fn set_stroke_gradient(&self, value: &Gradient)
[src]
Set stroke gradient
pub fn set_stroke_pattern(&self, value: &Self::Pattern)
[src]
Set stroke pattern
pub fn get_text_align(&self) -> TextAlign
[src]
Get text align
pub fn set_text_align(&self, value: TextAlign)
[src]
Set text align
pub fn get_text_baseline(&self) -> BaseLine
[src]
Get text baseline
pub fn set_text_baseline(&self, value: BaseLine)
[src]
Set text baseline
pub fn arc(
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
Add arc to current path with anticlockwise param
pub fn arc_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, radius: f64)
[src]
Add arc to current path
pub fn begin_path(&self)
[src]
Begin the path
pub fn bezier_curve_to(
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
[src]
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
Add bezier curve to current path
pub fn clear_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
Clear rectangle on current canvas
pub fn close_path(&self)
[src]
Close the current path
pub fn ellipse(
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
Add ellipse to current path
pub fn fill(&self)
[src]
Fill current path
pub fn fill_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
Fill rectangle
pub fn fill_text(&self, text: &str, x: f64, y: f64)
[src]
Draws text to the canvas.
pub fn get_line_dash(&self) -> Vec<f64, Global>ⓘ
[src]
Get line dash
pub fn line_to(&self, x: f64, y: f64)
[src]
Add line to path from current position
pub fn measure_text(&self, text: &str) -> TextMetrics
[src]
Measure text using current font face and font size
pub fn move_to(&self, x: f64, y: f64)
[src]
Move cursor to position
pub fn quadratic_curve_to(&self, cpx: f64, cpy: f64, x: f64, y: f64)
[src]
Add quadratic curve to current path
pub fn rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
Add rectangle to current path
pub fn reset_transform(&self)
[src]
Reset current transformations
pub fn restore(&self)
[src]
Restore transformations
pub fn rotate(&self, angle: f64)
[src]
Add rotate to current transformations
pub fn save(&self)
[src]
Save current transformations
pub fn scale(&self, x: f64, y: f64)
[src]
Add scle to current transformations
pub fn set_line_dash(&self, dash: &Vec<f64, Global>)
[src]
Set line dash
pub fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)
[src]
Set transform matrix
pub fn stroke(&self)
[src]
Stroke current path
pub fn stroke_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
Stroke rectangle
pub fn stroke_text(&self, text: &str, x: f64, y: f64)
[src]
Stroke text
pub fn transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)
[src]
Add transform matrix to current transformations
pub fn translate(&self, x: f64, y: f64)
[src]
Add translate to current transformations
Implementors
impl<'a> CanvasContext for Canvas<'a>
[src]
impl<'a> CanvasContext for Canvas<'a>
[src]type Pattern = Pattern
pub fn get_direction(&self) -> Direction
[src]
pub fn set_direction(&self, value: Direction) -> String
[src]
pub fn set_fill_color(&self, value: Color<f64>)
[src]
pub fn set_fill_gradient(&self, value: &Gradient)
[src]
pub fn set_fill_pattern(&self, value: &<Canvas<'a> as CanvasContext>::Pattern)
[src]
pub fn get_filter(&self) -> String
[src]
pub fn set_filter(&self, value: &str)
[src]
pub fn get_font(&self) -> String
[src]
pub fn set_font(
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
[src]
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
pub fn get_global_alpha(&self) -> f64
[src]
pub fn set_global_alpha(&self, value: f64)
[src]
pub fn get_global_composite_operation(&self) -> String
[src]
pub fn set_global_composite_operation(&self, value: &str)
[src]
pub fn is_image_smoothing_enabled(&self) -> bool
[src]
pub fn set_image_smoothing(&self, value: bool)
[src]
pub fn get_line_cap(&self) -> LineCap
[src]
pub fn set_line_cap(&self, value: LineCap)
[src]
pub fn get_line_dash_offset(&self) -> f64
[src]
pub fn set_line_dash_offset(&self, value: f64)
[src]
pub fn get_line_join(&self) -> LineJoin
[src]
pub fn set_line_join(&self, value: LineJoin)
[src]
pub fn get_line_width(&self) -> f64
[src]
pub fn set_line_width(&self, value: f64)
[src]
pub fn get_miter_limit(&self) -> f64
[src]
pub fn set_miter_limit(&self, value: f64)
[src]
pub fn get_shadow_blur(&self) -> f64
[src]
pub fn set_shadow_blur(&self, value: f64)
[src]
pub fn get_shadow_color(&self) -> Color<f64>
[src]
pub fn set_shadow_color(&self, value: Color<f64>)
[src]
pub fn get_shadow_offset_x(&self) -> f64
[src]
pub fn set_shadow_offset_x(&self, value: f64)
[src]
pub fn get_shadow_offset_y(&self) -> f64
[src]
pub fn set_shadow_offset_y(&self, value: f64)
[src]
pub fn set_stroke_color(&self, value: Color<f64>)
[src]
pub fn set_stroke_gradient(&self, value: &Gradient)
[src]
pub fn set_stroke_pattern(&self, value: &<Canvas<'a> as CanvasContext>::Pattern)
[src]
pub fn get_text_align(&self) -> TextAlign
[src]
pub fn set_text_align(&self, value: TextAlign)
[src]
pub fn get_text_baseline(&self) -> BaseLine
[src]
pub fn set_text_baseline(&self, value: BaseLine)
[src]
pub fn arc(
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
pub fn arc_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, radius: f64)
[src]
pub fn begin_path(&self)
[src]
pub fn bezier_curve_to(
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
[src]
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
pub fn clear_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
pub fn close_path(&self)
[src]
pub fn ellipse(
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
pub fn fill(&self)
[src]
pub fn fill_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
pub fn fill_text(&self, text: &str, x: f64, y: f64)
[src]
pub fn get_line_dash(&self) -> Vec<f64, Global>ⓘ
[src]
pub fn line_to(&self, x: f64, y: f64)
[src]
pub fn measure_text(&self, text: &str) -> TextMetrics
[src]
pub fn move_to(&self, x: f64, y: f64)
[src]
pub fn quadratic_curve_to(&self, cpx: f64, cpy: f64, x: f64, y: f64)
[src]
pub fn rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
pub fn reset_transform(&self)
[src]
pub fn restore(&self)
[src]
pub fn rotate(&self, angle: f64)
[src]
pub fn save(&self)
[src]
pub fn scale(&self, x: f64, y: f64)
[src]
pub fn set_line_dash(&self, dash: &Vec<f64, Global>)
[src]
pub fn set_transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)
[src]
pub fn stroke(&self)
[src]
pub fn stroke_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
pub fn stroke_text(&self, text: &str, x: f64, y: f64)
[src]
pub fn transform(&self, a: f64, b: f64, c: f64, d: f64, e: f64, f: f64)
[src]
pub fn translate(&self, x: f64, y: f64)
[src]
impl<'a, C> CanvasContext for RoughCanvas<'a, C> where
C: CanvasContext<Pattern = Pattern>,
[src]
impl<'a, C> CanvasContext for RoughCanvas<'a, C> where
C: CanvasContext<Pattern = Pattern>,
[src]type Pattern = Pattern
pub fn get_direction(&self) -> Direction
[src]
pub fn set_direction(&self, value: Direction) -> String
[src]
pub fn set_fill_color(&self, value: Color<f64>)
[src]
pub fn set_fill_gradient(&self, value: &Gradient)
[src]
pub fn set_fill_pattern(
&self,
pattern: &<RoughCanvas<'a, C> as CanvasContext>::Pattern
)
[src]
&self,
pattern: &<RoughCanvas<'a, C> as CanvasContext>::Pattern
)
pub fn get_filter(&self) -> String
[src]
pub fn set_filter(&self, value: &str)
[src]
pub fn get_font(&self) -> String
[src]
pub fn set_font(
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
[src]
&self,
family: &str,
style: TextStyle,
weight: TextWeight,
size: f64
)
pub fn get_global_alpha(&self) -> f64
[src]
pub fn set_global_alpha(&self, value: f64)
[src]
pub fn get_global_composite_operation(&self) -> String
[src]
pub fn set_global_composite_operation(&self, value: &str)
[src]
pub fn is_image_smoothing_enabled(&self) -> bool
[src]
pub fn set_image_smoothing(&self, value: bool)
[src]
pub fn get_line_cap(&self) -> LineCap
[src]
pub fn set_line_cap(&self, value: LineCap)
[src]
pub fn get_line_dash_offset(&self) -> f64
[src]
pub fn set_line_dash_offset(&self, value: f64)
[src]
pub fn get_line_join(&self) -> LineJoin
[src]
pub fn set_line_join(&self, value: LineJoin)
[src]
pub fn get_line_width(&self) -> f64
[src]
pub fn set_line_width(&self, value: f64)
[src]
pub fn get_miter_limit(&self) -> f64
[src]
pub fn set_miter_limit(&self, value: f64)
[src]
pub fn get_shadow_blur(&self) -> f64
[src]
pub fn set_shadow_blur(&self, value: f64)
[src]
pub fn get_shadow_color(&self) -> Color<f64>
[src]
pub fn set_shadow_color(&self, value: Color<f64>)
[src]
pub fn get_shadow_offset_x(&self) -> f64
[src]
pub fn set_shadow_offset_x(&self, value: f64)
[src]
pub fn get_shadow_offset_y(&self) -> f64
[src]
pub fn set_shadow_offset_y(&self, value: f64)
[src]
pub fn set_stroke_color(&self, value: Color<f64>)
[src]
pub fn set_stroke_gradient(&self, value: &Gradient)
[src]
pub fn set_stroke_pattern(
&self,
pattern: &<RoughCanvas<'a, C> as CanvasContext>::Pattern
)
[src]
&self,
pattern: &<RoughCanvas<'a, C> as CanvasContext>::Pattern
)
pub fn get_text_align(&self) -> TextAlign
[src]
pub fn set_text_align(&self, value: TextAlign)
[src]
pub fn get_text_baseline(&self) -> BaseLine
[src]
pub fn set_text_baseline(&self, value: BaseLine)
[src]
pub fn arc(
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
pub fn arc_to(&self, x1: f64, y1: f64, x2: f64, y2: f64, radius: f64)
[src]
pub fn begin_path(&self)
[src]
pub fn bezier_curve_to(
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
[src]
&self,
cp1x: f64,
cp1y: f64,
cp2x: f64,
cp2y: f64,
x: f64,
y: f64
)
pub fn clear_rect(&self, x: f64, y: f64, width: f64, height: f64)
[src]
pub fn close_path(&self)
[src]
pub fn ellipse(
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)
[src]
&self,
x: f64,
y: f64,
radius_x: f64,
radius_y: f64,
rotation: f64,
start_angle: f64,
end_angle: f64,
anticlockwise: bool
)