🎉 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
5 changed files with 93 additions and 7 deletions

View File

@@ -371,7 +371,12 @@ impl RenderState {
self.surfaces.apply_mut(&[SurfaceId::Fills], |s| {
s.canvas().concat(&matrix);
});
text::render(self, &shape, text_content);
let paragraphs = text_content.to_skia_paragraphs(&self.fonts.font_collection());
shadows::render_text_drop_shadows(self, &shape, &paragraphs, antialias);
text::render(self, &shape, &paragraphs, None, None);
shadows::render_text_inner_shadows(self, &shape, &paragraphs, antialias);
}
_ => {
self.surfaces.apply_mut(