mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 01:48:07 +02:00
fix _cairo_pattern_get_ink_extents to work with snapshot recording surfaces
It had caused pdf bbox sizes to regress to page size bboxes.
This commit is contained in:
parent
8886220b50
commit
8657ca10e3
1 changed files with 4 additions and 0 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include "cairo-path-private.h"
|
||||
#include "cairo-pattern-private.h"
|
||||
#include "cairo-recording-surface-private.h"
|
||||
#include "cairo-surface-snapshot-private.h"
|
||||
|
||||
#include <float.h>
|
||||
|
||||
|
|
@ -3666,6 +3667,9 @@ _cairo_pattern_get_ink_extents (const cairo_pattern_t *pattern,
|
|||
(const cairo_surface_pattern_t *) pattern;
|
||||
cairo_surface_t *surface = surface_pattern->surface;
|
||||
|
||||
if (_cairo_surface_is_snapshot (surface))
|
||||
surface = _cairo_surface_snapshot_get_target (surface);
|
||||
|
||||
if (_cairo_surface_is_recording (surface)) {
|
||||
cairo_matrix_t imatrix;
|
||||
cairo_box_t box;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue