mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
🎉 Add text solid strokes (#6384)
* 🎉 Add text strokes * 🔧 Minor refactor
This commit is contained in:
@@ -350,15 +350,32 @@ impl RenderState {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Type::Text(text_content) => {
|
||||
self.surfaces.apply_mut(&[SurfaceId::Fills], |s| {
|
||||
s.canvas().concat(&matrix);
|
||||
});
|
||||
|
||||
let paragraphs = text_content.to_skia_paragraphs(&self.fonts.font_collection());
|
||||
let paragraphs = text_content.get_skia_paragraphs(&self.fonts.font_collection());
|
||||
|
||||
shadows::render_text_drop_shadows(self, &shape, ¶graphs, antialias);
|
||||
text::render(self, &shape, ¶graphs, None, None);
|
||||
|
||||
for stroke in shape.strokes().rev() {
|
||||
let stroke_paints = shape.get_text_stroke_paint(&stroke);
|
||||
let stroke_paragraphs = text_content
|
||||
.get_skia_stroke_paragraphs(&self.fonts.font_collection(), &stroke_paints);
|
||||
shadows::render_text_drop_shadows(self, &shape, &stroke_paragraphs, antialias);
|
||||
text::render(
|
||||
self,
|
||||
&shape,
|
||||
&stroke_paragraphs,
|
||||
Some(SurfaceId::Strokes),
|
||||
None,
|
||||
);
|
||||
shadows::render_text_inner_shadows(self, &shape, &stroke_paragraphs, antialias);
|
||||
}
|
||||
|
||||
shadows::render_text_inner_shadows(self, &shape, ¶graphs, antialias);
|
||||
}
|
||||
_ => {
|
||||
|
||||
Reference in New Issue
Block a user