fpspreadsheet: Support individual fill colors of bars, bubbles, symbols. Fix dash line pattern broken after previous commit.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8997 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2023-10-29 15:52:46 +00:00
parent b8bff13140
commit fb8b6eef96
5 changed files with 108 additions and 57 deletions

View File

@@ -189,6 +189,7 @@ function HTMLLengthStrToPts(AValue: String; DefaultUnits: String = 'pt'): Double
function ColorToHTMLColorStr(AValue: TsColor; AExcelDialect: Boolean = false): String;
function HTMLColorStrToColor(AValue: String): TsColor;
function FlipColorBytes(AColor: TsColor): TsColor;
function GetColorName(AColor: TsColor): String;
function HighContrastColor(AColor: TsColor): TsColor;
function IsPaletteIndex(AColor: TsColor): Boolean;
@@ -2213,6 +2214,16 @@ begin
raise EFPSpreadsheet.Create('Unknown length units');
end;
function FlipColorBytes(AColor: TsColor): TsColor;
var
r,g,b: Byte;
begin
r := (AColor and $0000FF);
g := (AColor and $00FF00) shr 8;
b := (AColor and $FF0000) shr 16;
Result := b + g shl 8 + r shl 16;
end;
{@@ ----------------------------------------------------------------------------
Determines the name of a color from its rgb value
-------------------------------------------------------------------------------}