iced-rs/iced · error

Create clip rectangle

Error message

Create clip rectangle

What it means

Error "Create clip rectangle" thrown in iced-rs/iced.

Source

Thrown at tiny_skia/src/engine.rs:781

    let radius = match (to_center.x > 0.0, to_center.y > 0.0) {
        (true, true) => radii[2],
        (true, false) => radii[1],
        (false, true) => radii[3],
        (false, false) => radii[0],
    };

    let x = (to_center.x.abs() - size.width() + radius).max(0.0);
    let y = (to_center.y.abs() - size.height() + radius).max(0.0);

    (x.powf(2.0) + y.powf(2.0)).sqrt() - radius
}

pub fn adjust_clip_mask(clip_mask: &mut tiny_skia::Mask, bounds: Rectangle) {
    clip_mask.clear();

    let path = tiny_skia::PathBuilder::from_rect(
        tiny_skia::Rect::from_xywh(bounds.x, bounds.y, bounds.width, bounds.height)
            .expect("Create clip rectangle"),
    );

    clip_mask.fill_path(
        &path,
        tiny_skia::FillRule::EvenOdd,
        false,
        tiny_skia::Transform::default(),
    );
}

View on GitHub (pinned to 2cffa99b39)

When it happens

Trigger: Thrown at tiny_skia/src/engine.rs:781 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of iced-rs/iced@2cffa99b39 (2026-08-16). Data as JSON: /api/errors/23d2184381aa1b54. Report an issue: GitHub.