From b2df5bc42f64b45e44dbad61f3386bcb5ec1383d Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Mon, 18 May 2015 19:41:03 +0300 Subject: Fix documentation to explicitly mention premultiplied alpha Before this patch, it wasn't mentioned in this file at all, which is a monumental oversight. Signed-off-by: Lauri Kasanen --- doc/libXrender.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/libXrender.txt b/doc/libXrender.txt index 27cc75d..753ee98 100644 --- a/doc/libXrender.txt +++ b/doc/libXrender.txt @@ -84,7 +84,8 @@ as a separate argument which marks the valid entries. 2.4 Colors The core protocol XColor type doesn't include an alpha component, so Xrender -has a separate type. +has a separate type. Note that XRender expects premultiplied alpha in all +cases except with the gradient operations. typedef struct { unsigned short red; @@ -526,6 +527,8 @@ conceptually built. 7.1 Composite XRenderComposite exposes the RenderComposite protocol request directly. +If a format with alpha is used, make sure it is premultiplied into the +color channels. void XRenderComposite (Display *dpy, -- cgit v1.2.1