From cc912614c78b042b3a704effcb0060d405217dc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 15 Apr 2021 12:14:04 +0200 Subject: [PATCH] clutter/paint-volume: Union paint volumes correctly using Graphene Since commit d2f8a30625e we use Graphene to union paint volumes, it turns out a quite severe issue snuck in during review of that MR though: Unioned paint volumes (so paint volumes of any actors with children) now have negative heights. Once projected to 2d coordinates they luckily are correct again, which is why everything is still working. The problem is that obvious once looking closer: For the y coordinates of the unioned paint volume we confused the maximum and the minimum points and simply used the wrong coordinates to create the unioned paint volume. Part-of: --- clutter/clutter/clutter-paint-volume.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/clutter/clutter/clutter-paint-volume.c b/clutter/clutter/clutter-paint-volume.c index c18e66165..e30d804c0 100644 --- a/clutter/clutter/clutter-paint-volume.c +++ b/clutter/clutter/clutter-paint-volume.c @@ -585,10 +585,10 @@ clutter_paint_volume_union (ClutterPaintVolume *pv, graphene_box_get_min (&union_box, &min); graphene_box_get_max (&union_box, &max); - graphene_point3d_init (&pv->vertices[0], min.x, max.y, min.z); - graphene_point3d_init (&pv->vertices[1], max.x, max.y, min.z); - graphene_point3d_init (&pv->vertices[3], min.x, min.y, min.z); - graphene_point3d_init (&pv->vertices[4], min.x, max.y, max.z); + graphene_point3d_init (&pv->vertices[0], min.x, min.y, min.z); + graphene_point3d_init (&pv->vertices[1], max.x, min.y, min.z); + graphene_point3d_init (&pv->vertices[3], min.x, max.y, min.z); + graphene_point3d_init (&pv->vertices[4], min.x, min.y, max.z); if (pv->vertices[4].z == pv->vertices[0].z) pv->is_2d = TRUE;