summaryrefslogtreecommitdiff
path: root/src/corelib/render/software
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-19 09:16:09 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-19 09:16:09 +0200
commit3175c24605324a16c8a6962c3d76de3d5be25dae (patch)
tree03d2fc8ac5124c0cddf7180871bc63a0b9b4cd9a /src/corelib/render/software
parentafb464b6b191585bc4442bf3d126acb2307f806f (diff)
downloadfpGUI-3175c24605324a16c8a6962c3d76de3d5be25dae.tar.xz
agg: new color type conversion function
Diffstat (limited to 'src/corelib/render/software')
-rw-r--r--src/corelib/render/software/Agg2D.pas11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/corelib/render/software/Agg2D.pas b/src/corelib/render/software/Agg2D.pas
index 6a587b7e..9a153aa8 100644
--- a/src/corelib/render/software/Agg2D.pas
+++ b/src/corelib/render/software/Agg2D.pas
@@ -626,6 +626,8 @@ type
function Agg2DUsesWin32TrueType : boolean;
function BitmapAlphaTransparency(bitmap : TfpgImage; alpha : byte ) : boolean;
+
+ function fpgColor2AggColor(c: TfpgColor): TAggColor;
IMPLEMENTATION
@@ -974,6 +976,15 @@ begin
{$ENDIF }
end;
+function fpgColor2AggColor(c: TfpgColor): TAggColor;
+var
+ t: TRGBTriple;
+ c1: TfpgColor;
+begin
+ t := fpgColorToRGBTriple(c);
+ Result.Construct(t.Red, t.Green, t.Blue, t.Alpha);
+end;
+
function ColorDepthToPixelFormat(const AColorDepth: integer): TPixelFormat;
begin
case AColorDepth of