diff options
author | Andreas Gal <andreas.gal@gmail.com> | 2015-02-20 01:45:54 -0800 |
---|---|---|
committer | Andreas Gal <andreas.gal@gmail.com> | 2015-02-20 14:56:23 -0800 |
commit | ad5671bc143c5c02fd6b3d0ea7b5f314d85c9cc3 (patch) | |
tree | 210c41f3178434333a5d1bf84e8b5c10d4a28b88 /components/canvas/canvas_paint_task.rs | |
parent | 49ff6b2ccc43ab657814a1b4584122411a4b2acb (diff) | |
download | servo-ad5671bc143c5c02fd6b3d0ea7b5f314d85c9cc3.tar.gz servo-ad5671bc143c5c02fd6b3d0ea7b5f314d85c9cc3.zip |
Use cleaner StrokeOptions interface introduced by https://github.com/servo/rust-azure/pull/145.
Diffstat (limited to 'components/canvas/canvas_paint_task.rs')
-rw-r--r-- | components/canvas/canvas_paint_task.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/components/canvas/canvas_paint_task.rs b/components/canvas/canvas_paint_task.rs index 982861b0637..095a8d76aca 100644 --- a/components/canvas/canvas_paint_task.rs +++ b/components/canvas/canvas_paint_task.rs @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ use azure::azure_hl::{DrawTarget, SurfaceFormat, BackendType, StrokeOptions, DrawOptions}; -use azure::azure_hl::{ColorPattern, PatternRef}; +use azure::azure_hl::{ColorPattern, PatternRef, JoinStyle, CapStyle}; use geom::rect::Rect; use geom::size::Size2D; use gfx::color; @@ -22,20 +22,20 @@ pub enum CanvasMsg { Close, } -pub struct CanvasPaintTask { +pub struct CanvasPaintTask<'a> { drawtarget: DrawTarget, fill_color: ColorPattern, stroke_color: ColorPattern, - stroke_opts: StrokeOptions, + stroke_opts: StrokeOptions<'a>, } -impl CanvasPaintTask { - fn new(size: Size2D<i32>) -> CanvasPaintTask { +impl<'a> CanvasPaintTask<'a> { + fn new(size: Size2D<i32>) -> CanvasPaintTask<'a> { CanvasPaintTask { drawtarget: CanvasPaintTask::create(size), fill_color: ColorPattern::new(color::black()), stroke_color: ColorPattern::new(color::black()), - stroke_opts: StrokeOptions::new(1.0, 1.0), + stroke_opts: StrokeOptions::new(1.0, JoinStyle::MiterOrBevel, CapStyle::Butt, 1.0, &[]), } } |