diff --git a/piet-cairo/src/lib.rs b/piet-cairo/src/lib.rs index fdfe4ecb..a6d6669e 100644 --- a/piet-cairo/src/lib.rs +++ b/piet-cairo/src/lib.rs @@ -503,7 +503,7 @@ impl<'a> CairoRenderContext<'a> { }; // Cairo returns an error if we try to paint an empty image, causing us to panic. We check if // either the source or destination is empty, and early-return if so. - if src_rect.is_empty() || dst_rect.is_empty() { + if src_rect.is_zero_area() || dst_rect.is_zero_area() { return; } diff --git a/piet/Cargo.toml b/piet/Cargo.toml index 7c3cbfba..6ea96dfe 100644 --- a/piet/Cargo.toml +++ b/piet/Cargo.toml @@ -13,7 +13,7 @@ include = ["src/**/*", "Cargo.toml", "snapshots/resources/*"] [dependencies] image = { version = "0.24.5", optional = true, default-features = false } -kurbo = "0.10.4" +kurbo = "0.11.1" pico-args = { version = "0.4.2", optional = true } png = { version = "0.17.7", optional = true } os_info = { version = "3.6.0", optional = true, default-features = false }