mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-08 06:00:21 +01:00
[cairo-analysis-surface] Check for an empty transformed bbox.
After transforming the bbox, check that it has not been projected into an empty box.
This commit is contained in:
parent
d9461733af
commit
be126b6842
1 changed files with 8 additions and 2 deletions
|
|
@ -115,8 +115,14 @@ _cairo_analysis_surface_add_operation (cairo_analysis_surface_t *surface,
|
|||
NULL);
|
||||
rect->x = floor (x1);
|
||||
rect->y = floor (x2);
|
||||
rect->width = ceil (x2) - rect->x;
|
||||
rect->height = ceil (y2) - rect->y;
|
||||
|
||||
x2 = ceil (x2) - rect->x;
|
||||
y2 = ceil (y2) - rect->y;
|
||||
if (x2 <= 0 || y2 <= 0)
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
rect->width = x2;
|
||||
rect->height = y2;
|
||||
}
|
||||
|
||||
bbox.p1.x = _cairo_fixed_from_int (rect->x);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue