🔧 Fix linting warnings and errors

This commit is contained in:
Elena Torro 2025-05-08 10:54:55 +02:00
parent 92f5b5f92b
commit 2c46605e36
2 changed files with 10 additions and 13 deletions

View File

@ -1,5 +1,5 @@
use skia_safe::gpu::{self, gl::FramebufferInfo, gl::TextureInfo, DirectContext};
use skia_safe::{self as skia, ISize, Surface, SurfaceProps, SurfacePropsFlags};
use skia_safe::{self as skia, ISize};
pub struct GpuState {
pub context: DirectContext,

View File

@ -827,10 +827,9 @@ impl Shape {
paint.set_blend_mode(skia::BlendMode::SrcATop);
paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width * 2.0);
paint.set_color(match &stroke.fill {
Fill::Solid(color) => *color,
_ => Color::BLACK,
});
if let Fill::Solid(SolidColor(color)) = stroke.fill {
paint.set_color(color);
}
paints.push(paint);
}
StrokeKind::CenterStroke => {
@ -838,10 +837,9 @@ impl Shape {
paint.set_style(skia::PaintStyle::Stroke);
paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width);
paint.set_color(match &stroke.fill {
Fill::Solid(color) => *color,
_ => Color::BLACK,
});
if let Fill::Solid(SolidColor(color)) = stroke.fill {
paint.set_color(color);
}
paints.push(paint);
}
StrokeKind::OuterStroke => {
@ -850,10 +848,9 @@ impl Shape {
paint.set_blend_mode(skia::BlendMode::DstOver);
paint.set_anti_alias(true);
paint.set_stroke_width(stroke.width * 2.0);
paint.set_color(match &stroke.fill {
Fill::Solid(color) => *color,
_ => Color::BLACK,
});
if let Fill::Solid(SolidColor(color)) = stroke.fill {
paint.set_color(color);
}
paints.push(paint);
let mut paint = skia::Paint::default();