1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

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:
jean-airoldie
2022-03-19 08:01:33 -04:00
committed by GitHub
parent cecb48af03
commit 0d47e57775

View File

@@ -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).