From 87a613edd186461f1a8d224394043527a372571c Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 3 Aug 2024 16:23:30 +0200 Subject: Render text on top of images by default --- tiny_skia/src/lib.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'tiny_skia') 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() { -- cgit