index 0c809154051de215431d58616bb2a8d4bcf77b1e..38afcbb424d0a7d592f8e6aa963d4d05017e81b0 100644 (file)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
+ * the Free Software Foundation, version 3 of the License ONLY.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
result.a := a;
end;
-function TGxRGBA.toString (): AnsiString; begin result := formatstrf('rgba(%s,%s,%s,%s)', [r, g, b, a]); end;
-
+function TGxRGBA.toString (): AnsiString;
+begin
+ if (a = 255) then result := formatstrf('rgb(%s,%s,%s)', [r, g, b])
+ else result := formatstrf('rgba(%s,%s,%s,%s)', [r, g, b, a]);
+end;
// ////////////////////////////////////////////////////////////////////////// //