mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -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:
@@ -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`].
|
/// Tessellate a single [`Shape`] into a [`Mesh`].
|
||||||
///
|
///
|
||||||
/// * `tex_size`: size of the font texture (required to normalize glyph uv rectangles).
|
/// * `tex_size`: size of the font texture (required to normalize glyph uv rectangles).
|
||||||
|
|||||||
Reference in New Issue
Block a user