mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-17 18:18:11 +02:00
I have no idea what I'm doing
Signed-off-by: Raman Varabets <gitlab-20240601-da2ef10c@cyborgize.sg>
This commit is contained in:
parent
60c941b0a4
commit
02a04f6edb
3 changed files with 22 additions and 0 deletions
|
|
@ -2535,6 +2535,28 @@ _cairo_svg_surface_emit_composite_recording_pattern (cairo_svg_stream_t *output,
|
|||
return status;
|
||||
}
|
||||
|
||||
// FIXME error handling order
|
||||
cairo_svg_paint_t *paint_entry = _cairo_calloc (sizeof (cairo_svg_paint_t));
|
||||
if (paint_entry == NULL) {
|
||||
return _cairo_error (CAIRO_STATUS_NO_MEMORY);
|
||||
}
|
||||
|
||||
cairo_rectangle_int_t extents;
|
||||
cairo_bool_t is_bounded;
|
||||
// how to get extents ???
|
||||
is_bounded =_cairo_surface_get_extents (pattern->surface, &extents);
|
||||
//assert (is_bounded); ???
|
||||
paint_entry->source_id = surface->source_id;
|
||||
paint_entry->box.p1.x = extents.x;
|
||||
paint_entry->box.p1.y = extents.y;
|
||||
paint_entry->box.p2.x = extents.x + extents.width;
|
||||
paint_entry->box.p2.y = extents.y + extents.height;
|
||||
_cairo_svg_paint_box_add_padding (&paint_entry->box);
|
||||
|
||||
_cairo_array_init (&paint_entry->paint_elements, sizeof (cairo_svg_paint_element_t));
|
||||
_cairo_svg_paint_init_key (paint_entry);
|
||||
status = _cairo_hash_table_insert (document->paints, &paint_entry->base);
|
||||
|
||||
surface->transitive_paint_used = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
BIN
test/reference/ft-svg-render-doc.svg.ref.png
Normal file
BIN
test/reference/ft-svg-render-doc.svg.ref.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
Loading…
Add table
Reference in a new issue