From 7ee67e52e9d9dbcae5216815c9722f93aee5b156 Mon Sep 17 00:00:00 2001 From: DreamMaoMao <2523610504@qq.com> Date: Mon, 24 Feb 2025 20:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=BE=B9=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- maomao.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/maomao.c b/maomao.c index a838cfa0..98ccc36a 100644 --- a/maomao.c +++ b/maomao.c @@ -726,7 +726,11 @@ void apply_opacity_to_rect_nodes(struct wlr_scene_node *node, double opacity) { if (node->type == WLR_SCENE_NODE_RECT) { struct wlr_scene_rect *rect = wlr_scene_rect_from_node(node); // Assuming the rect has a color field and we can modify it - rect->color[3] = opacity; // Set the alpha channel of the color + // rect->color[0] = opacity * rect->color[3] * rect->color[0] ; // Set the red channel of the color + // rect->color[1] = opacity * rect->color[3] * rect->color[1] ; // Set the green channel of the color + // rect->color[2] = opacity * rect->color[3] * rect->color[2] ; // Set the blue channel of the color + rect->color[3] = opacity ; // Set the alpha channel of the color + wlr_scene_rect_set_color(rect, rect->color); } // If the node is a tree, recursively traverse its children