summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 13:15:50 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-10-01 13:15:50 +0200
commit3f5a719c9ff49083147230979fea496818b27fdc (patch)
tree0a5607c77252121bb91e72028c1a434abb7f5766 /src/corelib
parent79babc6044a13a83a0503f88be0d6b4b6ab681b4 (diff)
downloadfpGUI-3f5a719c9ff49083147230979fea496818b27fdc.tar.xz
minor improvement to fpgGetNamedColor - now using fpgIsNamedColor internally.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_main.pas5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/fpg_main.pas b/src/corelib/fpg_main.pas
index 2277c764..39d767bf 100644
--- a/src/corelib/fpg_main.pas
+++ b/src/corelib/fpg_main.pas
@@ -1047,7 +1047,10 @@ end;
function fpgGetNamedColor(col: TfpgColor): TfpgColor;
begin
- Result := fpgNamedColors[col and $FF];
+ if fpgIsNamedColor(col) then
+ Result := col // nothing to do, it is already a named color
+ else
+ Result := fpgNamedColors[col and $FF];
end;
procedure fpgSetNamedColor(colorid, rgbvalue: longword);