mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-04-06 07:15:53 -04:00
测试边框
This commit is contained in:
parent
abf1208073
commit
7ee67e52e9
1 changed files with 5 additions and 1 deletions
6
maomao.c
6
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue