Implement "repeat-x" and "repeat-y" for images

This commit is contained in:
pylbrecht 2019-12-10 14:58:21 +01:00
parent 25d036f05c
commit 1aecf40922
2 changed files with 77 additions and 48 deletions

View file

@ -358,7 +358,15 @@ pub enum Pattern<'a> {
#[cfg(feature = "canvas2d-azure")]
Azure(azure::azure_hl::Pattern, PhantomData<&'a ()>),
#[cfg(feature = "canvas2d-raqote")]
Raqote(raqote::Source<'a>),
Raqote(raqote::Source<'a>, Option<Repetition>),
}
#[derive(Clone)]
pub enum Repetition {
Repeat,
RepeatX,
RepeatY,
NoRepeat,
}
pub enum DrawSurfaceOptions {