diff options
author | 2023-12-02 16:10:42 +0100 | |
---|---|---|
committer | 2023-12-02 16:10:42 +0100 | |
commit | 8727b3fc50ec251d9c117c51ca1289be5ba9b117 (patch) | |
tree | 802fef9f0b54b6f9cbbeedff14d7f57169db7d6b /wgpu/src/layer/text.rs | |
parent | 7f8b17604a31e00becc43130ec516c1a53552c88 (diff) | |
parent | b526ce4958b28208395276dd4078ffe0d780e1d7 (diff) | |
download | iced-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 'wgpu/src/layer/text.rs')
-rw-r--r-- | wgpu/src/layer/text.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/wgpu/src/layer/text.rs b/wgpu/src/layer/text.rs index 66417cec..df2f2875 100644 --- a/wgpu/src/layer/text.rs +++ b/wgpu/src/layer/text.rs @@ -13,6 +13,7 @@ pub enum Text<'a> { paragraph: paragraph::Weak, position: Point, color: Color, + clip_bounds: Rectangle, }, /// An editor. #[allow(missing_docs)] @@ -20,6 +21,7 @@ pub enum Text<'a> { editor: editor::Weak, position: Point, color: Color, + clip_bounds: Rectangle, }, /// A cached text. Cached(Cached<'a>), @@ -53,4 +55,7 @@ pub struct Cached<'a> { /// The shaping strategy of the text. pub shaping: text::Shaping, + + /// The clip bounds of the text. + pub clip_bounds: Rectangle, } |