API ReferenceLayout Widgets
ClipRSuperellipse
Squircle clip lowering to a rounded rect.
ClipRSuperellipse { radius: f32, clip_behavior: Clip, child: Widget } clips
with a rounded superellipse (squircle), lowering to ClipRRect. Radius is
required and clamped to >= 0; default behavior AntiAlias.
use incular::prelude::*;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let app = Application::new(|_cx| {
Container::builder()
.padding(EdgeInsets::all(24.0))
.alignment(Alignment::CENTER)
.child(
ClipRSuperellipse::new(
24.0,
Container::new()
.color(Color::WHITE)
.width(160.0)
.height(160.0),
),
)
.build()
.into()
})?;
incular::run(app)?;
Ok(())
}Props
Prop
Type
Related: ClipRRect.