diff options
author | 2023-12-02 15:53:02 +0100 | |
---|---|---|
committer | 2023-12-02 15:56:28 +0100 | |
commit | b526ce4958b28208395276dd4078ffe0d780e1d7 (patch) | |
tree | 802fef9f0b54b6f9cbbeedff14d7f57169db7d6b /tiny_skia | |
parent | 43a7cc2222750b1cada1663b29278b29d3ea232c (diff) | |
download | iced-b526ce4958b28208395276dd4078ffe0d780e1d7.tar.gz iced-b526ce4958b28208395276dd4078ffe0d780e1d7.tar.bz2 iced-b526ce4958b28208395276dd4078ffe0d780e1d7.zip |
Rename `viewport` to `clip_bounds`
Diffstat (limited to 'tiny_skia')
-rw-r--r-- | tiny_skia/src/backend.rs | 15 | ||||
-rw-r--r-- | tiny_skia/src/geometry.rs | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/tiny_skia/src/backend.rs b/tiny_skia/src/backend.rs index cc0f72d1..3e9bd2a5 100644 --- a/tiny_skia/src/backend.rs +++ b/tiny_skia/src/backend.rs @@ -361,9 +361,10 @@ impl Backend { paragraph, position, color, - viewport, + clip_bounds: text_clip_bounds, } => { - let physical_bounds = (*viewport + translation) * scale_factor; + let physical_bounds = + (*text_clip_bounds + translation) * scale_factor; if !clip_bounds.intersects(&physical_bounds) { return; @@ -385,9 +386,10 @@ impl Backend { editor, position, color, - viewport, + clip_bounds: text_clip_bounds, } => { - let physical_bounds = (*viewport + translation) * scale_factor; + let physical_bounds = + (*text_clip_bounds + translation) * scale_factor; if !clip_bounds.intersects(&physical_bounds) { return; @@ -415,9 +417,10 @@ impl Backend { horizontal_alignment, vertical_alignment, shaping, - viewport, + clip_bounds: text_clip_bounds, } => { - let physical_bounds = (*viewport + translation) * scale_factor; + let physical_bounds = + (*text_clip_bounds + translation) * scale_factor; if !clip_bounds.intersects(&physical_bounds) { return; diff --git a/tiny_skia/src/geometry.rs b/tiny_skia/src/geometry.rs index b73f84a9..5f28b737 100644 --- a/tiny_skia/src/geometry.rs +++ b/tiny_skia/src/geometry.rs @@ -127,7 +127,7 @@ impl Frame { horizontal_alignment: text.horizontal_alignment, vertical_alignment: text.vertical_alignment, shaping: text.shaping, - viewport: bounds, + clip_bounds: Rectangle::with_size(Size::INFINITY), }); } |