mirror of
https://github.com/penpot/penpot.git
synced 2025-07-15 18:35:23 +02:00
🐛 Fix outer stroke with image fill extra artifacts
This commit is contained in:
parent
b81f4e913f
commit
5f4f7e422d
3 changed files with 92 additions and 56 deletions
|
@ -19,7 +19,12 @@ pub use blend::BlendMode;
|
|||
pub use images::*;
|
||||
|
||||
pub trait Renderable {
|
||||
fn render(&self, surface: &mut skia::Surface, images: &ImageStore) -> Result<(), String>;
|
||||
fn render(
|
||||
&self,
|
||||
surface: &mut skia::Surface,
|
||||
images: &ImageStore,
|
||||
scale: f32,
|
||||
) -> Result<(), String>;
|
||||
fn blend_mode(&self) -> BlendMode;
|
||||
fn opacity(&self) -> f32;
|
||||
fn bounds(&self) -> math::Rect;
|
||||
|
@ -157,8 +162,9 @@ impl RenderState {
|
|||
}
|
||||
|
||||
pub fn render_single_element(&mut self, element: &impl Renderable) {
|
||||
let scale = self.viewbox.zoom * self.options.dpr();
|
||||
element
|
||||
.render(&mut self.drawing_surface, &self.images)
|
||||
.render(&mut self.drawing_surface, &self.images, scale)
|
||||
.unwrap();
|
||||
|
||||
self.drawing_surface.draw(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue