1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

Wrap tesselated output in struct ClippedMesh(Rect, Mesh)

This commit is contained in:
Emil Ernerfeldt
2021-01-25 21:43:17 +01:00
parent 75fa77e040
commit b493bc6efc
16 changed files with 89 additions and 71 deletions

View File

@@ -114,8 +114,14 @@ pub struct ClippedShape(
pub Shape,
);
/// A clip triangle and some textured triangles, all in points (logical pixels).
pub type PaintJob = (emath::Rect, Mesh);
/// Grouped by clip rectangles, in points (logical pixels).
pub type PaintJobs = Vec<PaintJob>;
/// A [`Mesh`] within a clip rectangle.
///
/// Everything is using logical points.
#[derive(Clone, Debug)]
pub struct ClippedMesh(
/// Clip / scissor rectangle.
/// Only show the part of the [`Mesh`] that falls within this.
pub emath::Rect,
/// The shape
pub Mesh,
);