Add Tessellator::set_clip_rect (#1369)
This allows the user to set the outer rectangle used for culling, which is required to be able to implement its own tessellate_shapes.
This commit is contained in:
parent
cecb48af03
commit
0d47e57775
1 changed files with 5 additions and 0 deletions
|
@ -695,6 +695,11 @@ impl Tessellator {
|
|||
}
|
||||
}
|
||||
|
||||
/// Set the `Rect` to use for culling.
|
||||
pub fn set_clip_rect(&mut self, clip_rect: Rect) {
|
||||
self.clip_rect = clip_rect;
|
||||
}
|
||||
|
||||
/// Tessellate a single [`Shape`] into a [`Mesh`].
|
||||
///
|
||||
/// * `tex_size`: size of the font texture (required to normalize glyph uv rectangles).
|
||||
|
|
Loading…
Reference in a new issue