🎉 Add text shadows (#6335)

This commit is contained in:
Elena Torró 2025-04-24 12:19:41 +02:00 committed by GitHub
parent 14e8026e30
commit c2ae58bf08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 93 additions and 7 deletions

View file

@ -65,6 +65,15 @@ impl TextContent {
})
.collect()
}
pub fn to_skia_paragraphs(&self, fonts: &FontCollection) -> Vec<skia::textlayout::Paragraph> {
let mut paragraphs = Vec::new();
for mut skia_paragraph in self.to_paragraphs(fonts) {
skia_paragraph.layout(self.width());
paragraphs.push(skia_paragraph);
}
paragraphs
}
}
impl Default for TextContent {