Skip to content

FillRect error #20

@suti

Description

@suti

out of range error occur when filling rect with a transform.
this is my test:

fn test() { let mut pixmap = Pixmap::new(20, 20).unwrap(); let mut canvas = Canvas::from(pixmap.as_mut()); let mut paint = tiny_skia::Paint::default(); let rect = Rect::from_xywh(0.035864978902949929, 0.035864978902949929, 20.0, 20.0).unwrap(); let transform = Transform::from_row(1.0, 0.0, 0.0, 1.0, 0.46413517, 0.46413517).unwrap(); canvas.set_transform(transform); canvas.fill_rect(rect, &paint); }

the error is
thread 'test' panicked at 'range end index 401 out of range for slice of length 400', src/pipeline/blitter.rs:260:17

Rect(0.035864978902949929, 0.035864978902949929, 20.0, 20.0) and Transform(1.0, 0.0, 0.0, 1.0, 0.46413517, 0.46413517) is necessary

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions