summaryrefslogtreecommitdiffstats
path: root/tiny_skia
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-08-03 16:23:30 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-08-03 16:24:07 +0200
commit87a613edd186461f1a8d224394043527a372571c (patch)
tree21f76875a4c5cd044b839753d2e26e864caf6af2 /tiny_skia
parente84070acef84f883ca42d965c577e54ce60c3f2a (diff)
downloadiced-87a613edd186461f1a8d224394043527a372571c.tar.gz
iced-87a613edd186461f1a8d224394043527a372571c.tar.bz2
iced-87a613edd186461f1a8d224394043527a372571c.zip
Render text on top of images by default
Diffstat (limited to 'tiny_skia')
-rw-r--r--tiny_skia/src/lib.rs20
1 files changed, 10 insertions, 10 deletions
diff --git a/tiny_skia/src/lib.rs b/tiny_skia/src/lib.rs
index 1aabff00..6ec60158 100644
--- a/tiny_skia/src/lib.rs
+++ b/tiny_skia/src/lib.rs
@@ -178,6 +178,16 @@ impl Renderer {
engine::adjust_clip_mask(clip_mask, clip_bounds);
}
+ for image in &layer.images {
+ self.engine.draw_image(
+ image,
+ Transformation::scale(scale_factor),
+ pixels,
+ clip_mask,
+ clip_bounds,
+ );
+ }
+
for group in &layer.text {
for text in group.as_slice() {
self.engine.draw_text(
@@ -190,16 +200,6 @@ impl Renderer {
);
}
}
-
- for image in &layer.images {
- self.engine.draw_image(
- image,
- Transformation::scale(scale_factor),
- pixels,
- clip_mask,
- clip_bounds,
- );
- }
}
if !overlay.is_empty() {