mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-04-25 13:10:44 +02:00
path: Fix _cairo_path_fixed_is_rectangle()
__cairo_path_fixed_is_rectangle() is used by the PS and PDF backends to check if a path is equivalent to a rectangle when stroking. This is different from being a rectangle when filling, because of the implicit close_path appended to every subpath when filling. Fixes stroke-open-box. See https://bugs.freedesktop.org/show_bug.cgi?id=34560
This commit is contained in:
parent
4369255961
commit
c0fe556515
1 changed files with 4 additions and 1 deletions
|
|
@ -1290,8 +1290,11 @@ _cairo_path_fixed_is_rectangle (const cairo_path_fixed_t *path,
|
|||
if (! _cairo_path_fixed_is_box (path, box))
|
||||
return FALSE;
|
||||
|
||||
/* This check is valid because the current implementation of
|
||||
* _cairo_path_fixed_is_box () only accepts rectangles like:
|
||||
* move,line,line,line[,line|close[,close|move]]. */
|
||||
buf = cairo_path_head (path);
|
||||
if (buf->points[0].y == buf->points[1].y)
|
||||
if (buf->num_ops > 4)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue