mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 05:16:13 +02:00
🎉 Add text stroke fills
This commit is contained in:
parent
b71b9edee7
commit
eddabc0d68
3 changed files with 54 additions and 15 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue