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

Refactor: turn ClippedShape from struct-enum to a normal struct (#3225)

This commit is contained in:
Emil Ernerfeldt
2023-08-10 14:50:11 +02:00
committed by GitHub
parent 66cbb61ad5
commit 83c18498e9
5 changed files with 26 additions and 13 deletions

View File

@@ -90,13 +90,14 @@ impl Default for TextureId {
///
/// Everything is using logical points.
#[derive(Clone, Debug, PartialEq)]
pub struct ClippedShape(
pub struct ClippedShape {
/// Clip / scissor rectangle.
/// Only show the part of the [`Shape`] that falls within this.
pub emath::Rect,
pub clip_rect: emath::Rect,
/// The shape
pub Shape,
);
pub shape: Shape,
}
/// A [`Mesh`] or [`PaintCallback`] within a clip rectangle.
///