From ebab992b44848120346b0fc67e79170acb9eb9be Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Tue, 29 Oct 2024 15:15:41 -0400 Subject: [PATCH] wlr_scene: Add notes about wlr_scene_rect taking premultiplied colors --- include/wlr/types/wlr_scene.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index dbca35e78..0e3e7750a 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -404,6 +404,8 @@ struct wlr_scene_surface *wlr_scene_surface_try_from_buffer( /** * Add a node displaying a solid-colored rectangle to the scene-graph. + * + * The color argument must be a premultiplied color value. */ struct wlr_scene_rect *wlr_scene_rect_create(struct wlr_scene_tree *parent, int width, int height, const float color[static 4]); @@ -415,6 +417,8 @@ void wlr_scene_rect_set_size(struct wlr_scene_rect *rect, int width, int height) /** * Change the color of an existing rectangle node. + * + * The color argument must be a premultiplied color value. */ void wlr_scene_rect_set_color(struct wlr_scene_rect *rect, const float color[static 4]);