diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-20 00:34:03 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2012-03-20 00:34:03 +0200 |
commit | fd09a83ef101193f579240e0920e96f50a056388 (patch) | |
tree | 1cd4912a5bead35b593390247419b5f5f30614e2 | |
parent | 6efdaf440a34c057856f16f7fab07aa205556059 (diff) | |
download | fpGUI-fd09a83ef101193f579240e0920e96f50a056388.tar.xz |
agg: when painting images into the canvas buffer, use alpha blending too.
PNG images with alpha channel information is finally painted correctly in
fpGUI!!!!! :)
-rw-r--r-- | src/corelib/render/software/Agg2D.pas | 5 |
1 files 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); |