summaryrefslogtreecommitdiff
path: root/src/drv
diff options
context:
space:
mode:
authorscuri <scuri>2009-06-13 20:40:10 +0000
committerscuri <scuri>2009-06-13 20:40:10 +0000
commita7d154259160d72a5d6430305def60ee271f1f08 (patch)
tree8653d394c9aa21c9891a252646e88657529e04c1 /src/drv
parenta49c3d001aa2a572c9ed53a90566461bbd151b2a (diff)
*** empty log message ***
Diffstat (limited to 'src/drv')
-rw-r--r--src/drv/cdirgb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drv/cdirgb.c b/src/drv/cdirgb.c
index 9fbb540..c590dcf 100644
--- a/src/drv/cdirgb.c
+++ b/src/drv/cdirgb.c
@@ -56,7 +56,7 @@ struct _cdCtxCanvas
#define _sNormX(_ctxcanvas, _x) (_x < 0? 0: _x < _ctxcanvas->canvas->w? _x: _ctxcanvas->canvas->w-1)
#define _sNormY(_ctxcanvas, _y) (_y < 0? 0: _y < _ctxcanvas->canvas->h? _y: _ctxcanvas->canvas->h-1)
-#define RGBA_COMPOSE(_SRC, _SRC_ALPHA, _DST, _TMP_MULTI, _TMP_ALPHA) (unsigned char)(((_SRC_ALPHA)*(_SRC) + (_TMP_MULTI)*(_DST)) / (_TMP_ALPHA))
+#define RGB_COMPOSE(_SRC, _SRC_ALPHA, _DST, _TMP_MULTI, _TMP_ALPHA) (unsigned char)(((_SRC_ALPHA)*(_SRC) + (_TMP_MULTI)*(_DST)) / (_TMP_ALPHA))
#define RGBA_COLOR_COMBINE(_ctxcanvas, _pdst_red, _pdst_green, _pdst_blue, _pdst_alpha, _src_red, _src_green, _src_blue, _src_alpha) \
{ \
@@ -87,9 +87,9 @@ struct _cdCtxCanvas
/* Closed Compositing Formulas for SRC over DST, Colors Not Premultiplied by Alpha: */ \
int _tmp_multi = *_pdst_alpha * (255 - _src_alpha); \
int _tmp_alpha = _src_alpha + _tmp_multi; \
- _tmp_red = RGBA_COMPOSE(_src_red, _src_alpha, *_pdst_red, _tmp_multi, _tmp_alpha); \
- _tmp_green = RGBA_COMPOSE(_src_green, _src_alpha, *_pdst_green, _tmp_multi, _tmp_alpha); \
- _tmp_blue = RGBA_COMPOSE(_src_blue, _src_alpha, *_pdst_blue, _tmp_multi, _tmp_alpha); \
+ _tmp_red = RGB_COMPOSE(_src_red, _src_alpha, *_pdst_red, _tmp_multi, _tmp_alpha); \
+ _tmp_green = RGB_COMPOSE(_src_green, _src_alpha, *_pdst_green, _tmp_multi, _tmp_alpha); \
+ _tmp_blue = RGB_COMPOSE(_src_blue, _src_alpha, *_pdst_blue, _tmp_multi, _tmp_alpha); \
*_pdst_alpha = (unsigned char)(_tmp_alpha / 255); \
} \
} \