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:
@@ -65,7 +65,7 @@ begin
|
||||
FMaxSat := 255;
|
||||
FMaxVal := 255;
|
||||
FGradientWidth := FMaxHue + 1;
|
||||
FGradientHeight := 12;
|
||||
FGradientHeight := 1;
|
||||
FSat := 1.0;
|
||||
FVal := 1.0;
|
||||
FChange := false;
|
||||
@@ -80,7 +80,7 @@ var
|
||||
h: Double;
|
||||
begin
|
||||
if Layout = lyVertical then AValue := (FMaxHue + 1) - AValue;
|
||||
h := AValue / (FMaxHue + 1);
|
||||
h := AValue / FMaxHue;
|
||||
Result := HSVtoColor(h, FSat, FVal);
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user