rendernode: Transform cairo_t to correct coordinates

We want to have the coordinate system of the created cairo surface to be
identical to the coordinate system of the node's bounds. For that, we
need to translate the cairo surface by the bounds' origin.
This commit is contained in:
Benjamin Otte 2016-11-01 03:42:35 +01:00
parent f4c4ab6ab1
commit b3e5c31b08

View File

@ -1424,6 +1424,8 @@ gsk_render_node_get_draw_context (GskRenderNode *node)
res = cairo_create (node->surface);
cairo_translate (res, -node->bounds.origin.x, -node->bounds.origin.y);
cairo_rectangle (res,
node->bounds.origin.x, node->bounds.origin.y,
node->bounds.size.width, node->bounds.size.height);