summaryrefslogtreecommitdiffstats
path: root/graphics/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2023-12-02 16:10:42 +0100
committerLibravatar GitHub <noreply@github.com>2023-12-02 16:10:42 +0100
commit8727b3fc50ec251d9c117c51ca1289be5ba9b117 (patch)
tree802fef9f0b54b6f9cbbeedff14d7f57169db7d6b /graphics/src/renderer.rs
parent7f8b17604a31e00becc43130ec516c1a53552c88 (diff)
parentb526ce4958b28208395276dd4078ffe0d780e1d7 (diff)
downloadiced-8727b3fc50ec251d9c117c51ca1289be5ba9b117.tar.gz
iced-8727b3fc50ec251d9c117c51ca1289be5ba9b117.tar.bz2
iced-8727b3fc50ec251d9c117c51ca1289be5ba9b117.zip
Merge pull request #2154 from iced-rs/fix/text-clipping
Fix text clipping
Diffstat (limited to '')
-rw-r--r--graphics/src/renderer.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/graphics/src/renderer.rs b/graphics/src/renderer.rs
index d7613e36..1b0f5c5b 100644
--- a/graphics/src/renderer.rs
+++ b/graphics/src/renderer.rs
@@ -164,11 +164,13 @@ where
paragraph: &Self::Paragraph,
position: Point,
color: Color,
+ clip_bounds: Rectangle,
) {
self.primitives.push(Primitive::Paragraph {
paragraph: paragraph.downgrade(),
position,
color,
+ clip_bounds,
});
}
@@ -177,11 +179,13 @@ where
editor: &Self::Editor,
position: Point,
color: Color,
+ clip_bounds: Rectangle,
) {
self.primitives.push(Primitive::Editor {
editor: editor.downgrade(),
position,
color,
+ clip_bounds,
});
}
@@ -190,6 +194,7 @@ where
text: Text<'_, Self::Font>,
position: Point,
color: Color,
+ clip_bounds: Rectangle,
) {
self.primitives.push(Primitive::Text {
content: text.content.to_string(),
@@ -201,6 +206,7 @@ where
horizontal_alignment: text.horizontal_alignment,
vertical_alignment: text.vertical_alignment,
shaping: text.shaping,
+ clip_bounds,
});
}
}