Implement fill() for raqote::DrawTarget

This commit is contained in:
pylbrecht 2019-07-07 20:26:10 +02:00 committed by Bastien Orivel
parent 4e51caeb7e
commit 398929ffef
2 changed files with 35 additions and 10 deletions

View file

@ -352,11 +352,11 @@ pub enum Path {
}
#[derive(Clone)]
pub enum Pattern {
pub enum Pattern<'a> {
#[cfg(feature = "canvas2d-azure")]
Azure(azure::azure_hl::Pattern),
#[cfg(feature = "canvas2d-raqote")]
Raqote(()),
Raqote(raqote::Source<'a>),
}
pub enum DrawSurfaceOptions {
@ -1113,8 +1113,8 @@ impl<'a> Drop for CanvasData<'a> {
#[derive(Clone)]
pub struct CanvasPaintState<'a> {
pub draw_options: DrawOptions,
pub fill_style: Pattern,
pub stroke_style: Pattern,
pub fill_style: Pattern<'a>,
pub stroke_style: Pattern<'a>,
pub stroke_opts: StrokeOptions<'a>,
/// The current 2D transform matrix.
pub transform: Transform2D<f32>,