Skip to content

Commit

Permalink
Add method stubs for other backend platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
longmathemagician committed Jul 26, 2022
1 parent e18f44a commit b26548a
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions piet-cairo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,14 @@ impl<'a> RenderContext for CairoRenderContext<'a> {
Err(err) => self.error = Err(err),
}
}

fn blur_image(
&mut self,
_image: &Self::Image,
_blur_radius: f64,
) -> Result<Self::Image, Error> {
Err(Error::Unimplemented)
}
}

impl<'a> IntoBrush<CairoRenderContext<'a>> for Brush {
Expand Down
8 changes: 8 additions & 0 deletions piet-coregraphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,14 @@ impl<'a> RenderContext for CoreGraphicsContext<'a> {
fn status(&mut self) -> Result<(), Error> {
Ok(())
}

fn blur_image(
&mut self,
_image: &Self::Image,
_blur_radius: f64,
) -> Result<Self::Image, Error> {
Err(Error::Unimplemented)
}
}

impl<'a> IntoBrush<CoreGraphicsContext<'a>> for Brush {
Expand Down
8 changes: 8 additions & 0 deletions piet-svg/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,14 @@ impl piet::RenderContext for RenderContext {
// TODO blur (perhaps using SVG filters)
self.fill(rect, brush)
}

fn blur_image(
&mut self,
_image: &Self::Image,
_blur_radius: f64,
) -> Result<Self::Image, Error> {
Err(Error::Unimplemented)
}
}

fn draw_image(
Expand Down
8 changes: 8 additions & 0 deletions piet-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,14 @@ impl RenderContext for WebRenderContext<'_> {
.fill_rect(rect.x0, rect.y0, rect.width(), rect.height());
self.ctx.set_shadow_color("none");
}

fn blur_image(
&mut self,
_image: &Self::Image,
_blur_radius: f64,
) -> Result<Self::Image, Error> {
Err(Error::Unimplemented)
}
}

fn draw_image(
Expand Down

0 comments on commit b26548a

Please sign in to comment.