[PATCH libXrender] Fix documentation to explicitly mention premultiplied alpha

Lauri Kasanen cand at gmx.com
Mon May 18 09:41:03 PDT 2015


Before this patch, it wasn't mentioned in this file at all, which
is a monumental oversight.

Signed-off-by: Lauri Kasanen <cand at gmx.com>
---
 
 v2 with gradient wording.
 
 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,
-- 
1.8.3.1



More information about the xorg-devel mailing list