Don't fill out of viewport text
This commit is contained in:
parent
75548373a7
commit
509a0a574a
1 changed files with 4 additions and 0 deletions
|
|
@ -334,6 +334,10 @@ pub fn draw<Renderer>(
|
|||
{
|
||||
let bounds = layout.bounds();
|
||||
|
||||
if !bounds.intersects(viewport) {
|
||||
return;
|
||||
}
|
||||
|
||||
let x = match paragraph.horizontal_alignment() {
|
||||
alignment::Horizontal::Left => bounds.x,
|
||||
alignment::Horizontal::Center => bounds.center_x(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue