summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-11-20 21:50:59 +0000
committerMoonchild <moonchild@palemoon.org>2022-04-05 19:25:09 +0200
commit804d0f6604252768a9230c63cdf7f079b9f8cab8 (patch)
treee148de30ee5ac3271d18eaf0d99cc07b146f1f32 /gfx
parent327f5499ca6252c4b5ed75e4fc69dddcbfd3b72f (diff)
downloaduxp-804d0f6604252768a9230c63cdf7f079b9f8cab8.tar.gz
Issue #1795 - Add closure point to bounds calculation.
This addition of a closure point (explicitly completing the closed shape) isn't strictly needed in our current cairo version as it works perfectly fine without, but if our clipping extents code changes then this might cause problems if the extra point isn't added (in case of 0-length paths).
Diffstat (limited to 'gfx')
-rw-r--r--gfx/cairo/cairo/src/cairo-path-bounds.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gfx/cairo/cairo/src/cairo-path-bounds.c b/gfx/cairo/cairo/src/cairo-path-bounds.c
index c752fbca1d..701539e3a3 100644
--- a/gfx/cairo/cairo/src/cairo-path-bounds.c
+++ b/gfx/cairo/cairo/src/cairo-path-bounds.c
@@ -107,6 +107,16 @@ _cairo_path_bounder_curve_to (void *closure,
static cairo_status_t
_cairo_path_bounder_close_path (void *closure)
{
+ // XXXMC: This addition of a closure point isn't strictly needed but
+ // if our clipping extents code changes then this might cause problems
+ // if the extra point isn't added (in case of 0-length paths).
+ cairo_path_bounder_t *bounder = closure;
+
+ if (bounder->has_initial_point) {
+ _cairo_path_bounder_add_point (bounder, &bounder->current_point);
+ bounder->has_initial_point = FALSE;
+ }
+
return CAIRO_STATUS_SUCCESS;
}