I have no idea what I'm doing

Signed-off-by: Raman Varabets <gitlab-20240601-da2ef10c@cyborgize.sg>
This commit is contained in:
Raman Varabets 2024-07-01 19:16:50 +08:00
parent 60c941b0a4
commit 02a04f6edb
3 changed files with 22 additions and 0 deletions

View file

@ -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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB