mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-29 14:50:44 +02:00
Merge branch 'master' into 'master'
Fix image overclipping in vector backends Closes #480 See merge request cairo/cairo!268
This commit is contained in:
commit
934b82c594
4 changed files with 12 additions and 0 deletions
|
|
@ -3702,7 +3702,11 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
|
|||
y1 = raster->extents.y;
|
||||
x2 = raster->extents.x + (int) raster->extents.width;
|
||||
y2 = raster->extents.y + (int) raster->extents.height;
|
||||
|
||||
goto HANDLE_FILTER;
|
||||
}
|
||||
break;
|
||||
|
||||
HANDLE_FILTER:
|
||||
switch (pattern->filter) {
|
||||
case CAIRO_FILTER_NEAREST:
|
||||
|
|
@ -3713,6 +3717,14 @@ _cairo_pattern_get_extents (const cairo_pattern_t *pattern,
|
|||
y1 -= 0.004;
|
||||
x2 += 0.004;
|
||||
y2 += 0.004;
|
||||
/* Fix clipping issue in vector backends. */
|
||||
if (is_vector)
|
||||
{
|
||||
x1 -= 0.5;
|
||||
y1 -= 0.5;
|
||||
x2 += 0.5;
|
||||
y2 += 0.5;
|
||||
}
|
||||
break;
|
||||
case CAIRO_FILTER_BEST:
|
||||
/* Assume best filter will produce nice antialiased edges */
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 457 B |
Binary file not shown.
|
Before Width: | Height: | Size: 522 B After Width: | Height: | Size: 457 B |
Binary file not shown.
|
Before Width: | Height: | Size: 566 B After Width: | Height: | Size: 496 B |
Loading…
Add table
Reference in a new issue