Rename viewport to clip_bounds

This commit is contained in:
Héctor Ramón Jiménez 2023-12-02 15:53:02 +01:00
parent 43a7cc2222
commit b526ce4958
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
11 changed files with 53 additions and 50 deletions

View file

@ -120,12 +120,12 @@ impl Pipeline {
horizontal_alignment,
vertical_alignment,
color,
viewport,
clip_bounds,
) = match section {
Text::Paragraph {
position,
color,
viewport,
clip_bounds,
..
} => {
use crate::core::text::Paragraph as _;
@ -141,13 +141,13 @@ impl Pipeline {
paragraph.horizontal_alignment(),
paragraph.vertical_alignment(),
*color,
*viewport,
*clip_bounds,
)
}
Text::Editor {
position,
color,
viewport,
clip_bounds,
..
} => {
use crate::core::text::Editor as _;
@ -163,7 +163,7 @@ impl Pipeline {
alignment::Horizontal::Left,
alignment::Vertical::Top,
*color,
*viewport,
*clip_bounds,
)
}
Text::Cached(text) => {
@ -182,7 +182,7 @@ impl Pipeline {
text.horizontal_alignment,
text.vertical_alignment,
text.color,
text.viewport,
text.clip_bounds,
)
}
};
@ -206,7 +206,7 @@ impl Pipeline {
};
let clip_bounds =
layer_bounds.intersection(&(viewport * scale_factor))?;
layer_bounds.intersection(&(clip_bounds * scale_factor))?;
Some(glyphon::TextArea {
buffer,