iced-rs/iced · error

Stroke rectangle

Error message

Stroke rectangle

What it means

Error "Stroke rectangle" thrown in iced-rs/iced.

Source

Thrown at wgpu/src/geometry.rs:262

        let size = self
            .transforms
            .current
            .0
            .transform_vector(lyon::math::Vector::new(size.width, size.height));

        let mut options = tessellation::StrokeOptions::default();
        options.line_width = stroke.width;
        options.start_cap = into_line_cap(stroke.line_cap);
        options.end_cap = into_line_cap(stroke.line_cap);
        options.line_join = into_line_join(stroke.line_join);

        self.stroke_tessellator
            .tessellate_rectangle(
                &lyon::math::Box2D::new(top_left, top_left + size),
                &options,
                buffer.as_mut(),
            )
            .expect("Stroke rectangle");
    }

    fn stroke_text<'a>(&mut self, text: impl Into<geometry::Text>, stroke: impl Into<Stroke<'a>>) {
        let text = text.into();
        let stroke = stroke.into();

        text.draw_with(|glyph, _color| self.stroke(&glyph, stroke));
    }

    fn fill_text(&mut self, text: impl Into<geometry::Text>) {
        let text = text.into();

        let (scale_x, scale_y) = self.transforms.current.scale();

        if self.transforms.current.is_scale_translation()
            && scale_x == scale_y
            && scale_x > 0.0
            && scale_y > 0.0

View on GitHub (pinned to 2cffa99b39)

When it happens

Trigger: Thrown at wgpu/src/geometry.rs:262 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/37b404c1f989dcaa. Report an issue: GitHub.