From 3175c24605324a16c8a6962c3d76de3d5be25dae Mon Sep 17 00:00:00 2001 From: Graeme Geldenhuys Date: Mon, 19 Mar 2012 09:16:09 +0200 Subject: agg: new color type conversion function --- src/corelib/render/software/Agg2D.pas | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v1.2.3-70-g09d2