Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overflow panic with large coordinates #107

Open
pcwalton opened this issue Jan 3, 2020 · 0 comments · May be fixed by #108
Open

Overflow panic with large coordinates #107

pcwalton opened this issue Jan 3, 2020 · 0 comments · May be fixed by #108

Comments

@pcwalton
Copy link

pcwalton commented Jan 3, 2020

Failing test case:

use raqote::{DrawOptions, DrawTarget, PathBuilder, SolidSource, Source};

fn main() {
    let mut draw_target = DrawTarget::new(256, 256);

    let mut path_builder = PathBuilder::new();
    path_builder.move_to(-22015.0, -2901.0);
    path_builder.quad_to(-32255.0, -3413.0, -33279.0, 172.0);
    path_builder.close();
    let path = path_builder.finish();

    draw_target.fill(&path,
                    &Source::Solid(SolidSource { r: 0, g: 0, b: 0, a: 255 }),
                    &DrawOptions::default());
}
pcwalton added a commit to pcwalton/raqote that referenced this issue Jan 4, 2020
Fixes jrmuizel#107, but I'm not sure this is the best fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant