🎉 Add text stroke fills

This commit is contained in:
Elena Torro 2025-05-08 13:28:04 +02:00
parent b71b9edee7
commit eddabc0d68
3 changed files with 54 additions and 15 deletions

View file

@ -41,7 +41,7 @@ impl Gradient {
self.offsets.extend(offsets);
}
fn to_linear_shader(&self, rect: &Rect) -> Option<skia::Shader> {
pub fn to_linear_shader(&self, rect: &Rect) -> Option<skia::Shader> {
let start = (
rect.left + self.start.0 * rect.width(),
rect.top + self.start.1 * rect.height(),
@ -60,7 +60,7 @@ impl Gradient {
)
}
fn to_radial_shader(&self, rect: &Rect) -> Option<skia::Shader> {
pub fn to_radial_shader(&self, rect: &Rect) -> Option<skia::Shader> {
let center = skia::Point::new(
rect.left + self.start.0 * rect.width(),
rect.top + self.start.1 * rect.height(),
@ -119,6 +119,10 @@ impl ImageFill {
pub fn id(&self) -> Uuid {
self.id
}
pub fn opacity(&self) -> u8 {
self.opacity
}
}
#[derive(Debug, Clone, PartialEq, Copy)]