You've already forked lazarus-ccr
mbColorLib: All HSV/HSL controls have a property for MaxHue/MaxSaturation/MaxValue (MaxLuminance). Some refactoring avoiding duplicate storage of H, S, L (V) in the complex pickers.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5540 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -54,7 +54,7 @@ constructor TMColorPicker.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited;
|
||||
FGradientWidth := 256;
|
||||
FGradientHeight := 12;
|
||||
FGradientHeight := 1;
|
||||
FCyan := 0;
|
||||
FMagenta := 255;
|
||||
FYellow := 0;
|
||||
@ -71,7 +71,7 @@ end;
|
||||
|
||||
function TMColorPicker.GetGradientColor(AValue: Integer): TColor;
|
||||
begin
|
||||
Result := CMYKtoTColor(FCyan, AValue, FYellow, FBlack);
|
||||
Result := CMYKtoColor(FCyan, AValue, FYellow, FBlack);
|
||||
end;
|
||||
|
||||
procedure TMColorPicker.SetMagenta(m: integer);
|
||||
@ -159,10 +159,9 @@ end;
|
||||
|
||||
function TMColorPicker.GetSelectedColor: TColor;
|
||||
begin
|
||||
if not WebSafe then
|
||||
Result := CMYKtoTColor(FCyan, FMagenta, FYellow, FBlack)
|
||||
else
|
||||
Result := GetWebSafe(CMYKtoTColor(FCyan, FMagenta, FYellow, FBlack));
|
||||
Result := CMYKtoColor(FCyan, FMagenta, FYellow, FBlack);
|
||||
if WebSafe then
|
||||
Result := GetWebSafe(Result);
|
||||
end;
|
||||
|
||||
function TMColorPicker.GetSelectedValue: integer;
|
||||
|
Reference in New Issue
Block a user