diff options
author | pylbrecht <palbrecht@mailbox.org> | 2019-12-10 14:58:21 +0100 |
---|---|---|
committer | pylbrecht <palbrecht@mailbox.org> | 2019-12-17 19:52:02 +0100 |
commit | 1aecf40922337f7bd514ecd00b2ce9c43f3877d7 (patch) | |
tree | e50c62d1959da06ba6c3b81517b881dc0ea8dab0 /components/canvas/canvas_data.rs | |
parent | 25d036f05c9ff4c7538c58c9064c12d3a9c269f1 (diff) | |
download | servo-1aecf40922337f7bd514ecd00b2ce9c43f3877d7.tar.gz servo-1aecf40922337f7bd514ecd00b2ce9c43f3877d7.zip |
Implement "repeat-x" and "repeat-y" for images
Diffstat (limited to 'components/canvas/canvas_data.rs')
-rw-r--r-- | components/canvas/canvas_data.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/components/canvas/canvas_data.rs b/components/canvas/canvas_data.rs index 12bc87f84e1..c843ab19454 100644 --- a/components/canvas/canvas_data.rs +++ b/components/canvas/canvas_data.rs @@ -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 { |