summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-15 09:10:49 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2012-03-15 09:18:47 +0200
commit70fd59b13468b12f2bd7af35992b2974fb2bafff (patch)
treea7fe1a674799627275adaf56233fc75170eeaad1 /src/corelib
parent60c6680973646d1a852f66cf522acf74f174702b (diff)
downloadfpGUI-70fd59b13468b12f2bd7af35992b2974fb2bafff.tar.xz
New overloaded fpgColor() that takes a Alpha parameter as well.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_base.pas6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index 269d47aa..8a97efc6 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -744,6 +744,7 @@ function fpgGetBlue(const AColor: TfpgColor): byte;
function fpgGetAlpha(const AColor: TfpgColor): byte;
function fpgGetAvgColor(const AColor1, AColor2: TfpgColor): TfpgColor;
function fpgColor(const ARed, AGreen, ABlue: byte): TfpgColor;
+function fpgColor(const ARed, AGreen, ABlue, AAlpha: byte): TfpgColor;
function fpgDarker(const AColor: TfpgColor; APercent: Byte = 50): TfpgColor;
function fpgLighter(const AColor: TfpgColor; APercent: Byte = 50): TfpgColor;
@@ -1040,6 +1041,11 @@ begin
Result := ABlue or (AGreen shl 8) or (ARed shl 16) or ($FF shl 24);
end;
+function fpgColor(const ARed, AGreen, ABlue, AAlpha: byte): TfpgColor;
+begin
+ Result := ABlue or (AGreen shl 8) or (ARed shl 16) or (AAlpha shl 24);
+end;
+
function fpgDarker(const AColor: TfpgColor; APercent: Byte): TfpgColor;
var
lColor: TRGBTriple;