13 lines
234 B
Rust
13 lines
234 B
Rust
use crate::prelude::*;
|
|
|
|
pub struct Masked {
|
|
pub inner: WidgetId,
|
|
}
|
|
|
|
impl Widget for Masked {
|
|
fn draw(&mut self, painter: &mut Painter) {
|
|
painter.set_mask(painter.region());
|
|
painter.widget(&self.inner);
|
|
}
|
|
}
|