mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
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:
parent
f4c4ab6ab1
commit
b3e5c31b08
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user