Clip text to viewport bounds instead of layout bounds
This commit is contained in:
parent
99899d49cc
commit
936d480267
23 changed files with 177 additions and 115 deletions
|
|
@ -13,6 +13,7 @@ pub enum Text<'a> {
|
|||
paragraph: paragraph::Weak,
|
||||
position: Point,
|
||||
color: Color,
|
||||
viewport: Rectangle,
|
||||
},
|
||||
/// An editor.
|
||||
#[allow(missing_docs)]
|
||||
|
|
@ -20,6 +21,7 @@ pub enum Text<'a> {
|
|||
editor: editor::Weak,
|
||||
position: Point,
|
||||
color: Color,
|
||||
viewport: 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 viewport of the text.
|
||||
pub viewport: Rectangle,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue