You've already forked lazarus-ccr
mColorLib: Refactor mouse coordinates (mx, mxx, mdx etc).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5579 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -14,7 +14,6 @@ type
|
|||||||
TBAxisColorPicker = class(TmbColorPickerControl)
|
TBAxisColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FR, FG, FB: integer;
|
FR, FG, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetRValue(r: integer);
|
procedure SetRValue(r: integer);
|
||||||
procedure SetGValue(g: integer);
|
procedure SetGValue(g: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -63,11 +62,6 @@ begin
|
|||||||
FB := 255;
|
FB := 255;
|
||||||
FR := 0;
|
FR := 0;
|
||||||
FSelected := clBlue;
|
FSelected := clBlue;
|
||||||
FManual := false;
|
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -91,8 +85,6 @@ begin
|
|||||||
FR := GetRValue(FSelected);
|
FR := GetRValue(FSelected);
|
||||||
FG := GetGValue(FSelected);
|
FG := GetGValue(FSelected);
|
||||||
FB := GetBValue(FSelected);
|
FB := GetBValue(FSelected);
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -124,10 +116,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -163,13 +155,13 @@ end;
|
|||||||
procedure TBAxisColorPicker.Paint;
|
procedure TBAxisColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TBAxisColorPicker.Resize;
|
procedure TBAxisColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
mxx := round(FR * Width / 255);
|
mx := round(FR * Width / 255);
|
||||||
myy := round((255 - FG) * Height / 255);
|
my := round((255 - FG) * Height / 255);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -180,8 +172,8 @@ var
|
|||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
CorrectCoords(x, y);
|
CorrectCoords(x, y);
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
c := GetColorAtPoint(x, y);
|
c := GetColorAtPoint(x, y);
|
||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
@ -241,8 +233,8 @@ begin
|
|||||||
FG := g;
|
FG := g;
|
||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
mxx := Round(FR * Width / 255); // RED is on x
|
mx := Round(FR * Width / 255); // RED is on x
|
||||||
myy := Round((255 - FG) * Height / 255); // GREEN is on y
|
my := Round((255 - FG) * Height / 255); // GREEN is on y
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -15,7 +15,6 @@ type
|
|||||||
TCIEAColorPicker = class(TmbColorPickerControl)
|
TCIEAColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FL, FA, FB: integer;
|
FL, FA, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetLValue(l: integer);
|
procedure SetLValue(l: integer);
|
||||||
procedure SetAValue(a: integer);
|
procedure SetAValue(a: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -63,10 +62,6 @@ begin
|
|||||||
FL := 100;
|
FL := 100;
|
||||||
FA := 127;
|
FA := 127;
|
||||||
FB := -128;
|
FB := -128;
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -90,8 +85,6 @@ begin
|
|||||||
FL := Round(GetCIELValue(FSelected));
|
FL := Round(GetCIELValue(FSelected));
|
||||||
FA := Round(GetCIEAValue(FSelected));
|
FA := Round(GetCIEAValue(FSelected));
|
||||||
FB := Round(GetCIEBValue(FSelected));
|
FB := Round(GetCIEBValue(FSelected));
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -135,10 +128,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -175,21 +168,21 @@ end;
|
|||||||
procedure TCIEAColorPicker.Paint;
|
procedure TCIEAColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCIEAColorPicker.Resize;
|
procedure TCIEAColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
mxx := Round((FB + 128) / 255 * Width);
|
mx := Round((FB + 128) / 255 * Width);
|
||||||
// myy := Round(((100 - FL) * 255 / 100) * Height / 255);
|
// myy := Round(((100 - FL) * 255 / 100) * Height / 255);
|
||||||
myy := Round((100 - FL) / 100 * Height);
|
my := Round((100 - FL) / 100 * Height);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCIEAColorPicker.SelectColor(x, y: Integer);
|
procedure TCIEAColorPicker.SelectColor(x, y: Integer);
|
||||||
var
|
var
|
||||||
c: TColor;
|
c: TColor;
|
||||||
l, a, b: Integer;
|
L, a, b: Integer;
|
||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
CorrectCoords(x, y);
|
CorrectCoords(x, y);
|
||||||
@ -199,14 +192,14 @@ begin
|
|||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
l := Round(GetCIELValue(c));
|
L := Round(GetCIELValue(c));
|
||||||
a := Round(GetCIEAValue(c));
|
a := Round(GetCIEAValue(c));
|
||||||
b := Round(GetCIEBValue(c));
|
b := Round(GetCIEBValue(c));
|
||||||
needNewGradient := a <> FA;
|
needNewGradient := a <> FA;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
FL := l;
|
FL := L;
|
||||||
FA := a;
|
FA := a;
|
||||||
FB := b;
|
FB := b;
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
@ -254,9 +247,9 @@ begin
|
|||||||
FA := a;
|
FA := a;
|
||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
mxx := Round((FB + 128) * Width / 255);
|
mx := Round((FB + 128) * Width / 255);
|
||||||
// myy := Round((100 - FL) * 255 / 100 * Height / 255);
|
// my := Round((100 - FL) * 255 / 100 * Height / 255);
|
||||||
myy := Round((100 - FL) / 100 * Height);
|
my := Round((100 - FL) / 100 * Height);
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -18,7 +18,6 @@ type
|
|||||||
TCIEBColorPicker = class(TmbColorPickerControl)
|
TCIEBColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FL, FA, FB: integer;
|
FL, FA, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetLValue(l: integer);
|
procedure SetLValue(l: integer);
|
||||||
procedure SetAValue(a: integer);
|
procedure SetAValue(a: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -66,10 +65,6 @@ begin
|
|||||||
FL := 100;
|
FL := 100;
|
||||||
FA := -128;
|
FA := -128;
|
||||||
FB := 127;
|
FB := 127;
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -93,8 +88,6 @@ begin
|
|||||||
FL := Round(GetCIELValue(FSelected));
|
FL := Round(GetCIELValue(FSelected));
|
||||||
FA := Round(GetCIEAValue(FSelected));
|
FA := Round(GetCIEAValue(FSelected));
|
||||||
FB := Round(GetCIEBValue(FSelected));
|
FB := Round(GetCIEBValue(FSelected));
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -138,10 +131,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -178,14 +171,14 @@ end;
|
|||||||
procedure TCIEBColorPicker.Paint;
|
procedure TCIEBColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCIEBColorPicker.Resize;
|
procedure TCIEBColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
mxx := Round((FA + 128) * (Width / 255));
|
mx := Round((FA + 128) * (Width / 255));
|
||||||
// myy := Round(((100 - FL) * 255 / 100) * (Height / 255));
|
// myy := Round(((100 - FL) * 255 / 100) * (Height / 255));
|
||||||
myy := Round(( 100 - FL) / 100 * Height);
|
my := Round(( 100 - FL) / 100 * Height);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -202,8 +195,8 @@ begin
|
|||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
l := Round(GetCIELValue(c));
|
l := Round(GetCIELValue(c));
|
||||||
a := Round(GetCIEAValue(c));
|
a := Round(GetCIEAValue(c));
|
||||||
b := Round(GetCIEBValue(c));
|
b := Round(GetCIEBValue(c));
|
||||||
@ -241,7 +234,7 @@ end;
|
|||||||
|
|
||||||
procedure TCIEBColorPicker.SetSelectedColor(c: TColor);
|
procedure TCIEBColorPicker.SetSelectedColor(c: TColor);
|
||||||
var
|
var
|
||||||
l, a, b: Integer;
|
L, a, b: Integer;
|
||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
if WebSafe then
|
if WebSafe then
|
||||||
@ -249,17 +242,17 @@ begin
|
|||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
l := Round(GetCIELValue(c));
|
L := Round(GetCIELValue(c));
|
||||||
a := Round(GetCIEAValue(c));
|
a := Round(GetCIEAValue(c));
|
||||||
b := Round(GetCIEBValue(c));
|
b := Round(GetCIEBValue(c));
|
||||||
needNewGradient := (b <> FB);
|
needNewGradient := (b <> FB);
|
||||||
FL := l;
|
FL := L;
|
||||||
FA := a;
|
FA := a;
|
||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
mxx := Round((FA + 128) * Width / 255);
|
mx := Round((FA + 128) * Width / 255);
|
||||||
// myy := Round((100 - FL) * 255 / 100* Height / 255);
|
// my := Round((100 - FL) * 255 / 100* Height / 255);
|
||||||
myy := Round((100 - FL) / 100 * Height);
|
my := Round((100 - FL) / 100 * Height);
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -15,7 +15,6 @@ type
|
|||||||
TCIELColorPicker = class(TmbColorPickerControl)
|
TCIELColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FL, FA, FB: integer;
|
FL, FA, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetLValue(l: integer);
|
procedure SetLValue(l: integer);
|
||||||
procedure SetAValue(a: integer);
|
procedure SetAValue(a: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -63,11 +62,6 @@ begin
|
|||||||
FL := 100;
|
FL := 100;
|
||||||
FA := -128;
|
FA := -128;
|
||||||
FB := 127;
|
FB := 127;
|
||||||
FManual := false;
|
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -91,8 +85,6 @@ begin
|
|||||||
FL := Round(GetCIELValue(FSelected));
|
FL := Round(GetCIELValue(FSelected));
|
||||||
FA := Round(GetCIEAValue(FSelected));
|
FA := Round(GetCIEAValue(FSelected));
|
||||||
FB := Round(GetCIEBValue(FSelected));
|
FB := Round(GetCIEBValue(FSelected));
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -133,10 +125,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_Right : SelectColor(mxx + delta, myy);
|
VK_Right : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -173,15 +165,15 @@ end;
|
|||||||
procedure TCIELColorPicker.Paint;
|
procedure TCIELColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
CorrectCoords(mxx, myy);
|
CorrectCoords(mx, my);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCIELColorPicker.Resize;
|
procedure TCIELColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
FManual := false;
|
FManual := false;
|
||||||
mxx := Round((FA + 128) * Width / 255);
|
mx := Round((FA + 128) * Width / 255);
|
||||||
myy := Round((255 - (FB + 128)) * Height / 255);
|
my := Round((255 - (FB + 128)) * Height / 255);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -198,8 +190,8 @@ begin
|
|||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
l := Round(GetCIELValue(c));
|
l := Round(GetCIELValue(c));
|
||||||
a := Round(GetCIEAValue(c));
|
a := Round(GetCIEAValue(c));
|
||||||
b := Round(GetCIEBValue(c));
|
b := Round(GetCIEBValue(c));
|
||||||
@ -237,7 +229,7 @@ end;
|
|||||||
|
|
||||||
procedure TCIELColorPicker.SetSelectedColor(c: TColor);
|
procedure TCIELColorPicker.SetSelectedColor(c: TColor);
|
||||||
var
|
var
|
||||||
l, a, b: Integer;
|
L, a, b: Integer;
|
||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
if WebSafe then
|
if WebSafe then
|
||||||
@ -245,16 +237,16 @@ begin
|
|||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
l := Round(GetCIELValue(c));
|
L := Round(GetCIELValue(c));
|
||||||
a := Round(GetCIEAValue(c));
|
a := Round(GetCIEAValue(c));
|
||||||
b := Round(GetCIEBValue(c));
|
b := Round(GetCIEBValue(c));
|
||||||
needNewGradient := l <> FL;
|
needNewGradient := L <> FL;
|
||||||
FL := l;
|
FL := L;
|
||||||
FA := a;
|
FA := a;
|
||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
mxx := Round((FA + 128) * Width / 255);
|
mx := Round((FA + 128) * Width / 255);
|
||||||
myy := Round((255 - (FB + 128)) * Height / 255);
|
my := Round((255 - (FB + 128)) * Height / 255);
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -14,7 +14,6 @@ type
|
|||||||
TGAxisColorPicker = class(TmbColorPickerControl)
|
TGAxisColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FR, FG, FB: integer;
|
FR, FG, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetRValue(r: integer);
|
procedure SetRValue(r: integer);
|
||||||
procedure SetGValue(g: integer);
|
procedure SetGValue(g: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -63,10 +62,6 @@ begin
|
|||||||
FR := 0;
|
FR := 0;
|
||||||
FSelected := clLime;
|
FSelected := clLime;
|
||||||
FManual := false;
|
FManual := false;
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -90,8 +85,6 @@ begin
|
|||||||
FR := GetRValue(FSelected);
|
FR := GetRValue(FSelected);
|
||||||
FG := GetGValue(FSelected);
|
FG := GetGValue(FSelected);
|
||||||
FB := GetBValue(FSelected);
|
FB := GetBValue(FSelected);
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -123,10 +116,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -161,14 +154,14 @@ end;
|
|||||||
procedure TGAxisColorPicker.Paint;
|
procedure TGAxisColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TGAxisColorPicker.Resize;
|
procedure TGAxisColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
FManual := false;
|
FManual := false;
|
||||||
mxx := Round(FB * Width / 255);
|
mx := Round(FB * Width / 255);
|
||||||
myy := Round((255 - FR) * Height / 255);
|
my := Round((255 - FR) * Height / 255);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -179,8 +172,8 @@ var
|
|||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
CorrectCoords(x, y);
|
CorrectCoords(x, y);
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
c := GetColorAtPoint(x, y);
|
c := GetColorAtPoint(x, y);
|
||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
@ -241,8 +234,8 @@ begin
|
|||||||
FG := g;
|
FG := g;
|
||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
mxx := Round(FB * Width / 255); // BLUE is x
|
mx := Round(FB * Width / 255); // BLUE is x
|
||||||
myy := Round((255 - FR) * Height / 255); // RED is y
|
my := Round((255 - FR) * Height / 255); // RED is y
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -20,7 +20,6 @@ type
|
|||||||
private
|
private
|
||||||
FHue, FSat, FLum, FLumSel: Double;
|
FHue, FSat, FLum, FLumSel: Double;
|
||||||
FMaxHue, FMaxSat, FMaxLum: Integer;
|
FMaxHue, FMaxSat, FMaxLum: Integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
function GetHue: Integer;
|
function GetHue: Integer;
|
||||||
function GetLum: Integer;
|
function GetLum: Integer;
|
||||||
function GetSat: Integer;
|
function GetSat: Integer;
|
||||||
@ -112,8 +111,6 @@ begin
|
|||||||
RGBToHSL(FSelected, FHue, FSat, L);
|
RGBToHSL(FSelected, FHue, FSat, L);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -184,10 +181,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
{
|
{
|
||||||
@ -264,7 +261,7 @@ end;
|
|||||||
procedure THSColorPicker.Paint;
|
procedure THSColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function THSColorPicker.PredictColor: TColor;
|
function THSColorPicker.PredictColor: TColor;
|
||||||
@ -291,8 +288,8 @@ var
|
|||||||
c: TColor;
|
c: TColor;
|
||||||
begin
|
begin
|
||||||
CorrectCoords(x, y);
|
CorrectCoords(x, y);
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
c := GetColorAtPoint(x, y);
|
c := GetColorAtPoint(x, y);
|
||||||
if WebSafe then c := GetWebSafe(c);
|
if WebSafe then c := GetWebSafe(c);
|
||||||
{$IFDEF USE_COLOR_TO_RGB}
|
{$IFDEF USE_COLOR_TO_RGB}
|
||||||
@ -452,9 +449,9 @@ end;
|
|||||||
|
|
||||||
procedure THSCOlorPicker.UpdateCoords;
|
procedure THSCOlorPicker.UpdateCoords;
|
||||||
begin
|
begin
|
||||||
mxx := Round(FHue * Width);
|
mx := Round(FHue * Width);
|
||||||
myy := Round((1.0 - FSat) * Height);
|
my := Round((1.0 - FSat) * Height);
|
||||||
CorrectCoords(mxx, myy);
|
CorrectCoords(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -339,7 +339,7 @@ begin
|
|||||||
DeleteObject(rgn);
|
DeleteObject(rgn);
|
||||||
DrawSatCirc;
|
DrawSatCirc;
|
||||||
DrawHueLine;
|
DrawHueLine;
|
||||||
DrawMarker(mdx, mdy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function THSVColorPicker.RadHue(New: integer): integer;
|
function THSVColorPicker.RadHue(New: integer): integer;
|
||||||
@ -362,8 +362,8 @@ var
|
|||||||
dx, dy, r, radius: integer;
|
dx, dy, r, radius: integer;
|
||||||
H, S: Double;
|
H, S: Double;
|
||||||
begin
|
begin
|
||||||
mdx := x;
|
mx := x;
|
||||||
mdy := y;
|
my := y;
|
||||||
|
|
||||||
radius := Min(Width, Height) div 2;
|
radius := Min(Width, Height) div 2;
|
||||||
dx := x - radius;
|
dx := x - radius;
|
||||||
@ -572,8 +572,8 @@ begin
|
|||||||
r := -FSat * radius;
|
r := -FSat * radius;
|
||||||
angle := -(FHue * 2 + 1) * pi;
|
angle := -(FHue * 2 + 1) * pi;
|
||||||
SinCos(angle, sinAngle, cosAngle);
|
SinCos(angle, sinAngle, cosAngle);
|
||||||
mdx := round(cosAngle * r) + radius;
|
mx := round(cosAngle * r) + radius;
|
||||||
mdy := round(sinAngle * r) + radius;
|
my := round(sinAngle * r) + radius;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -12,7 +12,6 @@ type
|
|||||||
TRAxisColorPicker = class(TmbColorPickerControl)
|
TRAxisColorPicker = class(TmbColorPickerControl)
|
||||||
private
|
private
|
||||||
FR, FG, FB: integer;
|
FR, FG, FB: integer;
|
||||||
dx, dy, mxx, myy: integer;
|
|
||||||
procedure SetRValue(r: integer);
|
procedure SetRValue(r: integer);
|
||||||
procedure SetGValue(g: integer);
|
procedure SetGValue(g: integer);
|
||||||
procedure SetBValue(b: integer);
|
procedure SetBValue(b: integer);
|
||||||
@ -60,11 +59,6 @@ begin
|
|||||||
FB := 0;
|
FB := 0;
|
||||||
FR := 255;
|
FR := 255;
|
||||||
FSelected := clRed;
|
FSelected := clRed;
|
||||||
FManual := false;
|
|
||||||
dx := 0;
|
|
||||||
dy := 0;
|
|
||||||
mxx := 0;
|
|
||||||
myy := 0;
|
|
||||||
MarkerStyle := msCircle;
|
MarkerStyle := msCircle;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -88,8 +82,6 @@ begin
|
|||||||
FR := GetRValue(FSelected);
|
FR := GetRValue(FSelected);
|
||||||
FG := GetGValue(FSelected);
|
FG := GetGValue(FSelected);
|
||||||
FB := GetBValue(FSelected);
|
FB := GetBValue(FSelected);
|
||||||
dx := x;
|
|
||||||
dy := y;
|
|
||||||
if Focused or (csDesigning in ComponentState) then
|
if Focused or (csDesigning in ComponentState) then
|
||||||
c := clBlack
|
c := clBlack
|
||||||
else
|
else
|
||||||
@ -121,10 +113,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mxx - delta, myy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mxx + delta, myy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mxx, myy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mxx, myy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -160,14 +152,14 @@ end;
|
|||||||
procedure TRAxisColorPicker.Paint;
|
procedure TRAxisColorPicker.Paint;
|
||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
Canvas.StretchDraw(ClientRect, FBufferBmp);
|
||||||
DrawMarker(mxx, myy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRAxisColorPicker.Resize;
|
procedure TRAxisColorPicker.Resize;
|
||||||
begin
|
begin
|
||||||
FManual := false;
|
FManual := false;
|
||||||
mxx := Round(FB * Width / 255);
|
mx := Round(FB * Width / 255);
|
||||||
myy := Round((255 - FG) * Height / 255);
|
my := Round((255 - FG) * Height / 255);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -178,8 +170,8 @@ var
|
|||||||
needNewGradient: Boolean;
|
needNewGradient: Boolean;
|
||||||
begin
|
begin
|
||||||
CorrectCoords(x, y);
|
CorrectCoords(x, y);
|
||||||
mxx := x;
|
mx := x;
|
||||||
myy := y;
|
my := y;
|
||||||
c := GetColorAtPoint(x, y);
|
c := GetColorAtPoint(x, y);
|
||||||
if c = FSelected then
|
if c = FSelected then
|
||||||
exit;
|
exit;
|
||||||
@ -240,8 +232,8 @@ begin
|
|||||||
FB := b;
|
FB := b;
|
||||||
FSelected := c;
|
FSelected := c;
|
||||||
FManual := false;
|
FManual := false;
|
||||||
mxx := Round(FB * Width / 255); // BLUE on x
|
mx := Round(FB * Width / 255); // BLUE on x
|
||||||
myy := Round((255 - FG) * Height / 255); // GREEN on y
|
my := Round((255 - FG) * Height / 255); // GREEN on y
|
||||||
if needNewGradient then
|
if needNewGradient then
|
||||||
CreateGradient;
|
CreateGradient;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
|
@ -143,10 +143,10 @@ begin
|
|||||||
delta := IfThen(ssCtrl in Shift, 10, 1);
|
delta := IfThen(ssCtrl in Shift, 10, 1);
|
||||||
|
|
||||||
case Key of
|
case Key of
|
||||||
VK_LEFT : SelectColor(mdx - delta, mdy);
|
VK_LEFT : SelectColor(mx - delta, my);
|
||||||
VK_RIGHT : SelectColor(mdx + delta, mdy);
|
VK_RIGHT : SelectColor(mx + delta, my);
|
||||||
VK_UP : SelectColor(mdx, mdy - delta);
|
VK_UP : SelectColor(mx, my - delta);
|
||||||
VK_DOWN : SelectColor(mdx, mdy + delta);
|
VK_DOWN : SelectColor(mx, my + delta);
|
||||||
else eraseKey := false;
|
else eraseKey := false;
|
||||||
end;
|
end;
|
||||||
{
|
{
|
||||||
@ -228,7 +228,7 @@ procedure TSLColorPicker.Paint;
|
|||||||
begin
|
begin
|
||||||
Canvas.StretchDraw(ClientRect, FBufferBMP);
|
Canvas.StretchDraw(ClientRect, FBufferBMP);
|
||||||
UpdateCoords;
|
UpdateCoords;
|
||||||
DrawMarker(mdx, mdy);
|
DrawMarker(mx, my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSLColorPicker.Resize;
|
procedure TSLColorPicker.Resize;
|
||||||
@ -353,8 +353,8 @@ end;
|
|||||||
|
|
||||||
procedure TSLColorPicker.UpdateCoords;
|
procedure TSLColorPicker.UpdateCoords;
|
||||||
begin
|
begin
|
||||||
mdx := round(FSat * (Width - 1));
|
mx := round(FSat * (Width - 1));
|
||||||
mdy := round((1.0 - FLum) * (Height - 1));
|
my := round((1.0 - FLum) * (Height - 1));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,30 +23,20 @@ type
|
|||||||
protected
|
protected
|
||||||
FManual: Boolean;
|
FManual: Boolean;
|
||||||
FSelected: TColor;
|
FSelected: TColor;
|
||||||
mx, my, mdx, mdy: integer;
|
mx, my: integer;
|
||||||
procedure CreateGradient; override;
|
procedure CreateGradient; override;
|
||||||
function GetHintStr(X, Y: Integer): String; override;
|
function GetHintStr(X, Y: Integer): String; override;
|
||||||
function GetSelectedColor: TColor; virtual;
|
function GetSelectedColor: TColor; virtual;
|
||||||
procedure InternalDrawMarker(X, Y: Integer; C: TColor);
|
procedure InternalDrawMarker(X, Y: Integer; C: TColor);
|
||||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
|
||||||
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
|
|
||||||
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); override;
|
|
||||||
procedure SetSelectedColor(C: TColor); virtual;
|
procedure SetSelectedColor(C: TColor); virtual;
|
||||||
procedure WebSafeChanged; dynamic;
|
procedure WebSafeChanged; dynamic;
|
||||||
{$IFDEF DELPHI}
|
|
||||||
procedure CMGotFocus(var Message: TCMGotFocus); message CM_ENTER;
|
|
||||||
procedure CMLostFocus(var Message: TCMLostFocus); message CM_EXIT;
|
|
||||||
procedure CMMouseLeave(var Message: TMessage); message CM_MOUSELEAVE;
|
|
||||||
{$ELSE}
|
|
||||||
procedure CMGotFocus(var Message: TLMessage); message CM_ENTER;
|
procedure CMGotFocus(var Message: TLMessage); message CM_ENTER;
|
||||||
procedure CMLostFocus(var Message: TLMessage); message CM_EXIT;
|
procedure CMLostFocus(var Message: TLMessage); message CM_EXIT;
|
||||||
procedure CMMouseLeave(var Message: TLMessage); message CM_MOUSELEAVE;
|
procedure CMMouseLeave(var Message: TLMessage); message CM_MOUSELEAVE;
|
||||||
{$ENDIF}
|
|
||||||
property MarkerStyle: TMarkerStyle read FMarkerStyle write SetMarkerStyle;
|
property MarkerStyle: TMarkerStyle read FMarkerStyle write SetMarkerStyle;
|
||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
property ColorUnderCursor;
|
property ColorUnderCursor;
|
||||||
property Manual: boolean read FManual;
|
|
||||||
published
|
published
|
||||||
property SelectedColor: TColor read GetSelectedColor write SetSelectedColor;
|
property SelectedColor: TColor read GetSelectedColor write SetSelectedColor;
|
||||||
property HintFormat: string read FHintFormat write FHintFormat;
|
property HintFormat: string read FHintFormat write FHintFormat;
|
||||||
@ -67,9 +57,6 @@ type
|
|||||||
property TabStop default true;
|
property TabStop default true;
|
||||||
property Color;
|
property Color;
|
||||||
property ParentColor;
|
property ParentColor;
|
||||||
{$IFDEF DELPHI_7_UP}{$IFDEF DELPHI}
|
|
||||||
property ParentBackground default true;
|
|
||||||
{$ENDIF}{$ENDIF}
|
|
||||||
property DragCursor;
|
property DragCursor;
|
||||||
property DragMode;
|
property DragMode;
|
||||||
property DragKind;
|
property DragKind;
|
||||||
@ -94,9 +81,7 @@ type
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
{$IFDEF FPC}
|
|
||||||
IntfGraphics, fpimage,
|
IntfGraphics, fpimage,
|
||||||
{$ENDIF}
|
|
||||||
ScanLines, PalUtils, SelPropUtils;
|
ScanLines, PalUtils, SelPropUtils;
|
||||||
|
|
||||||
constructor TmbCustomPicker.Create(AOwner: TComponent);
|
constructor TmbCustomPicker.Create(AOwner: TComponent);
|
||||||
@ -107,28 +92,23 @@ begin
|
|||||||
TabStop := true;
|
TabStop := true;
|
||||||
mx := 0;
|
mx := 0;
|
||||||
my := 0;
|
my := 0;
|
||||||
mdx := 0;
|
|
||||||
mdy := 0;
|
|
||||||
FHintFormat := 'Hex #%hex'#10#13'RGB[%r, %g, %b]'#10#13'HSL[%hslH, %hslS, %hslL]'#10#13'HSV[%hsvH, %hsvS, %hsvV]'#10#13'CMYK[%c, %m, %y, %k]'#10#13'L*a*b*[%cieL, %cieA, %cieB]'#10#13'XYZ[%cieX, %cieY, %cieZ]';
|
FHintFormat := 'Hex #%hex'#10#13'RGB[%r, %g, %b]'#10#13'HSL[%hslH, %hslS, %hslL]'#10#13'HSV[%hsvH, %hsvS, %hsvV]'#10#13'CMYK[%c, %m, %y, %k]'#10#13'L*a*b*[%cieL, %cieA, %cieB]'#10#13'XYZ[%cieX, %cieY, %cieZ]';
|
||||||
FWebSafe := false;
|
FWebSafe := false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TmbCustomPicker.CMGotFocus(
|
procedure TmbCustomPicker.CMGotFocus(var Message: TLMessage);
|
||||||
var Message: {$IFDEF FPC}TLMessage{$ELSE}TCMGotFocus{$ENDIF} );
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TmbCustomPicker.CMLostFocus(
|
procedure TmbCustomPicker.CMLostFocus(var Message: TLMessage);
|
||||||
var Message: {$IFDEF FPC}TLMessage{$ELSE}TCMLostFocus{$ENDIF} );
|
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TmbCustomPicker.CMMouseLeave(
|
procedure TmbCustomPicker.CMMouseLeave(var Message: TLMessage);
|
||||||
var Message: {$IFDEF FPC}TLMessage{$ELSE}TMessage{$ENDIF});
|
|
||||||
begin
|
begin
|
||||||
mx := 0;
|
mx := 0;
|
||||||
my := 0;
|
my := 0;
|
||||||
@ -195,29 +175,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TmbCustomPicker.MouseDown(Button: TMouseButton; Shift: TShiftState;
|
|
||||||
X, Y: Integer);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
mx := x;
|
|
||||||
my := y;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TmbCustomPicker.MouseMove(Shift: TShiftState; X, Y: Integer);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
mx := x;
|
|
||||||
my := y;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TmbCustomPicker.MouseUp(Button: TMouseButton; Shift: TShiftState;
|
|
||||||
X, Y: Integer);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
mx := x;
|
|
||||||
my := y;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TmbCustomPicker.SetMarkerStyle(s: TMarkerStyle);
|
procedure TmbCustomPicker.SetMarkerStyle(s: TMarkerStyle);
|
||||||
begin
|
begin
|
||||||
if FMarkerStyle <> s then
|
if FMarkerStyle <> s then
|
||||||
|
Reference in New Issue
Block a user