Move core::Image::clip_bounds to graphics::Image
This commit is contained in:
parent
3cc5bd5dbc
commit
7c11ccb046
16 changed files with 189 additions and 88 deletions
|
|
@ -777,9 +777,14 @@ impl core::image::Renderer for Renderer {
|
|||
self.image_cache.borrow_mut().measure_image(handle)
|
||||
}
|
||||
|
||||
fn draw_image(&mut self, image: core::Image, bounds: Rectangle) {
|
||||
fn draw_image(
|
||||
&mut self,
|
||||
image: core::Image,
|
||||
bounds: Rectangle,
|
||||
clip_bounds: Rectangle,
|
||||
) {
|
||||
let (layer, transformation) = self.layers.current_mut();
|
||||
layer.draw_raster(image, bounds, transformation);
|
||||
layer.draw_raster(image, bounds, clip_bounds, transformation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -789,9 +794,14 @@ impl core::svg::Renderer for Renderer {
|
|||
self.image_cache.borrow_mut().measure_svg(handle)
|
||||
}
|
||||
|
||||
fn draw_svg(&mut self, svg: core::Svg, bounds: Rectangle) {
|
||||
fn draw_svg(
|
||||
&mut self,
|
||||
svg: core::Svg,
|
||||
bounds: Rectangle,
|
||||
clip_bounds: Rectangle,
|
||||
) {
|
||||
let (layer, transformation) = self.layers.current_mut();
|
||||
layer.draw_svg(svg, bounds, transformation);
|
||||
layer.draw_svg(svg, bounds, clip_bounds, transformation);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue