From c4ca69d3fa84dca98dce71c7a71b61413d6be165 Mon Sep 17 00:00:00 2001 From: scuri Date: Tue, 27 Oct 2009 19:45:36 +0000 Subject: Fixed: compositing in IMAGERGB when canvas has a semi-transparent alpha channel and a color with semi transparent alpha are used. --- html/en/func/attributes.html | 4 ++-- html/en/func/color.html | 9 +++++---- html/en/history.html | 5 ++++- src/drv/cdirgb.c | 35 ++++++++++++++++++++--------------- 4 files changed, 31 insertions(+), 22 deletions(-) diff --git a/html/en/func/attributes.html b/html/en/func/attributes.html index 60768e4..984af01 100644 --- a/html/en/func/attributes.html +++ b/html/en/func/attributes.html @@ -17,7 +17,7 @@ canvas:SetForeground(color: lightuserdata) [in Lua] color is used in all primitives (lines, areas, marks and text). Default value: CD_BLACK. Value CD_QUERY simply returns the current value.

-

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full +

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,0) (full transparent white). Use SetForeground to avoid the conflict. See also Color Coding.

long int cdCanvasBackground(cdCanvas* canvas, long int color); [in C]
@@ -31,7 +31,7 @@ canvas:SetBackground(color: lightuserdata) [in Lua]
background color only makes sense for Clear and for primitives affected by the background opacity attribute. Default value: CD_WHITE. Value CD_QUERY simply returns the current value.

-

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,255) (full +

Notice that CD_QUERY conflicts with color RGBA=(255,255,255,0) (full transparent white). Use SetBackground to avoid the conflict. See also Color Coding.

int cdCanvasWriteMode(cdCanvas* canvas, int mode); [in C]
diff --git a/html/en/func/color.html b/html/en/func/color.html
index 9ec9928..8efd8a4 100644
--- a/html/en/func/color.html
+++ b/html/en/func/color.html
@@ -52,12 +52,13 @@ cd.DecodeColor(color: lightuserdata) -> (r, g, b: number) [in Lua]
cd.EncodeAlpha(color: lightuserdata, alpha: number) -> (color: lightuserdata) [in Lua]

Returns the given color coded with the alpha information. ATENTION: At the - moment only the Win32 with GDI+ and the IMAGERGB drivers support alpha - components in color coding. Se in Windows Using - GDI+ Base Driver and IMAGERGB driver. The + moment only the Win32 with GDI+, the + XRender and the IMAGERGB + drivers support alpha components in color coding. The internal representation of the component is inverted, because the default value must be 0 and opaque for backward compatibility, so you should use the cdDecodeAlpha - function ot the cdAlpha macro to retrieve the alpha component.

+ function or the cdAlpha macro to retrieve the alpha component. + 0 is transparent, 255 is opaque.

unsigned char cdDecodeAlpha(long int color) [in C]
 
 cd.DecodeAlpha(color: lightuserdata) -> (a: number) [in Lua]
diff --git a/html/en/history.html b/html/en/history.html index 8dd485a..81db388 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -19,7 +19,7 @@

History of Changes

-

CVS (23/Oct/2009)

+

CVS (27/Oct/2009)

Version 5.2 (26/Jun/2009)