From fd09a83ef101193f579240e0920e96f50a056388 Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Tue, 20 Mar 2012 00:34:03 +0200 Subject: agg: when painting images into the canvas buffer, use alpha blending too. PNG images with alpha channel information is finally painted correctly in fpGUI!!!!! :) --- src/corelib/render/software/Agg2D.pas | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas index 3dd03855..ce759352 100644 --- a/src/corelib/render/software/Agg2D.pas +++ b/src/corelib/render/software/Agg2D.pas @@ -3647,8 +3647,9 @@ end; procedure TAgg2D.DoDrawImagePart(x, y: TfpgCoord; img: TfpgImageBase; xi, yi, w, h: integer); begin -// ImageFilter(AGG_NoFilter); - CopyImage(TfpgImage(img), xi, yi, xi+w, yi+h, x, y); + { We use TransformImage so we can get alpha blending support. + CopyImage doesn't use image blending, when it does painting. } + TransformImage(TfpgImage(img), xi, yi, xi+w, yi+h, x, y, x+w, y+h); end; procedure TAgg2D.DoDrawString(x, y: TfpgCoord; const txt: string); -- cgit v1.2.3-70-g09d2