Imlplement get_composition_op

This commit is contained in:
Bastien Orivel 2019-08-11 14:30:29 +02:00
parent a28d00013c
commit 4c73e4bb3f
2 changed files with 3 additions and 3 deletions

View file

@ -325,7 +325,7 @@ pub enum CompositionOp {
#[cfg(feature = "canvas2d-azure")] #[cfg(feature = "canvas2d-azure")]
Azure(azure::azure_hl::CompositionOp), Azure(azure::azure_hl::CompositionOp),
#[cfg(feature = "canvas2d-raqote")] #[cfg(feature = "canvas2d-raqote")]
Raqote(()), Raqote(raqote::BlendMode),
} }
pub enum SurfaceFormat { pub enum SurfaceFormat {

View file

@ -16,8 +16,8 @@ use std::marker::PhantomData;
pub struct RaqoteBackend; pub struct RaqoteBackend;
impl Backend for RaqoteBackend { impl Backend for RaqoteBackend {
fn get_composition_op(&self, _opts: &DrawOptions) -> CompositionOp { fn get_composition_op(&self, opts: &DrawOptions) -> CompositionOp {
unimplemented!() CompositionOp::Raqote(opts.as_raqote().blend_mode)
} }
fn need_to_draw_shadow(&self, color: &Color) -> bool { fn need_to_draw_shadow(&self, color: &Color) -> bool {