diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-01 13:15:50 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-10-01 13:15:50 +0200 |
commit | 3f5a719c9ff49083147230979fea496818b27fdc (patch) | |
tree | 0a5607c77252121bb91e72028c1a434abb7f5766 | |
parent | 79babc6044a13a83a0503f88be0d6b4b6ab681b4 (diff) | |
download | fpGUI-3f5a719c9ff49083147230979fea496818b27fdc.tar.xz |
minor improvement to fpgGetNamedColor - now using fpgIsNamedColor internally.
-rw-r--r-- | src/corelib/fpg_main.pas | 5 |
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); |