You've already forked lazarus-ccr
fixed colorpalette bugs. now it works fine.
DLBitmap works fine on linux and windows now. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1581 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -16,7 +16,11 @@ type
|
|||||||
rgbtAlpha: byte;
|
rgbtAlpha: byte;
|
||||||
end;
|
end;
|
||||||
PRGBATriple = ^TRGBATriple;
|
PRGBATriple = ^TRGBATriple;
|
||||||
|
{$ifdef MSWINDOWS}
|
||||||
|
TRGBATriple = tagRGBTRIPLE;
|
||||||
|
{$else}
|
||||||
TRGBATriple = tagRGBATRIPLE;
|
TRGBATriple = tagRGBATRIPLE;
|
||||||
|
{$endif}
|
||||||
PRGBATripleArray = ^TRGBATripleArray;
|
PRGBATripleArray = ^TRGBATripleArray;
|
||||||
TRGBATripleArray = array[word] of TRGBATriple;
|
TRGBATripleArray = array[word] of TRGBATriple;
|
||||||
|
|
||||||
@@ -87,11 +91,7 @@ begin
|
|||||||
Bmp := TDLBitmap.Create;
|
Bmp := TDLBitmap.Create;
|
||||||
Bmp.Width := aBitmap.Height;
|
Bmp.Width := aBitmap.Height;
|
||||||
Bmp.Height := aBitmap.Width;
|
Bmp.Height := aBitmap.Width;
|
||||||
{$ifdef MSWINDOWS}
|
|
||||||
Bmp.PixelFormat := pf32bit;
|
|
||||||
{$else}
|
|
||||||
Bmp.PixelFormat := pf24bit;
|
Bmp.PixelFormat := pf24bit;
|
||||||
{$endif}
|
|
||||||
IntfImg1 := TLazIntfImage.Create(0, 0);
|
IntfImg1 := TLazIntfImage.Create(0, 0);
|
||||||
IntfImg1.LoadFromBitmap(Bmp.Handle, Bmp.MaskHandle);
|
IntfImg1.LoadFromBitmap(Bmp.Handle, Bmp.MaskHandle);
|
||||||
IntfImg2 := TLazIntfImage.Create(0, 0);
|
IntfImg2 := TLazIntfImage.Create(0, 0);
|
||||||
@@ -351,8 +351,6 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
try
|
try
|
||||||
if BitmapIn.PixelFormat <> pf24bit then
|
|
||||||
Exit;
|
|
||||||
with BitmapOut do
|
with BitmapOut do
|
||||||
begin
|
begin
|
||||||
Width := BitmapIn.Width;
|
Width := BitmapIn.Width;
|
||||||
@@ -433,11 +431,7 @@ end;
|
|||||||
constructor TDLBitmap.Create;
|
constructor TDLBitmap.Create;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
{$ifdef MSWINDOWS}
|
|
||||||
PixelFormat := pf32bit;
|
|
||||||
{$else}
|
|
||||||
PixelFormat := pf24bit;
|
PixelFormat := pf24bit;
|
||||||
{$endif}
|
|
||||||
FIntfImgA := TLazIntfImage.Create(0, 0);
|
FIntfImgA := TLazIntfImage.Create(0, 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@@ -65,6 +65,7 @@ type
|
|||||||
FOnColorPick: TColorMouseEvent;
|
FOnColorPick: TColorMouseEvent;
|
||||||
FRows: Integer;
|
FRows: Integer;
|
||||||
FColors: TList;
|
FColors: TList;
|
||||||
|
MX, MY: integer;
|
||||||
function GetColors(Index: Integer): TColor;
|
function GetColors(Index: Integer): TColor;
|
||||||
procedure SetButtonHeight(const AValue: Integer);
|
procedure SetButtonHeight(const AValue: Integer);
|
||||||
procedure SetButtonWidth(const AValue: Integer);
|
procedure SetButtonWidth(const AValue: Integer);
|
||||||
@@ -180,6 +181,9 @@ procedure TCustomColorPalette.MouseDown(Button: TMouseButton;
|
|||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
MX := X;
|
||||||
|
MY := Y;
|
||||||
|
|
||||||
X := X div FButtonWidth;
|
X := X div FButtonWidth;
|
||||||
Y := Y div FButtonHeight;
|
Y := Y div FButtonHeight;
|
||||||
|
|
||||||
@@ -197,7 +201,7 @@ end;
|
|||||||
procedure TCustomColorPalette.MouseUp(Button: TMouseButton;
|
procedure TCustomColorPalette.MouseUp(Button: TMouseButton;
|
||||||
Shift: TShiftState; X, Y: Integer);
|
Shift: TShiftState; X, Y: Integer);
|
||||||
begin
|
begin
|
||||||
if PickedColor <> clNone then
|
if (PickedColor <> clNone) and (MX = X) and (MY = Y) then
|
||||||
ColorPick(PickedColor, PickShift);
|
ColorPick(PickedColor, PickShift);
|
||||||
inherited;
|
inherited;
|
||||||
end;
|
end;
|
||||||
|
@@ -41,15 +41,17 @@
|
|||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item3>
|
</Item3>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="37">
|
<Units Count="38">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="lazimageeditor.pas"/>
|
<Filename Value="lazimageeditor.pas"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="lazimageeditor"/>
|
<UnitName Value="lazimageeditor"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="2"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="11" Y="26"/>
|
<CursorPos X="73" Y="11"/>
|
||||||
<UsageCount Value="62"/>
|
<UsageCount Value="62"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
@@ -58,11 +60,10 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="Main"/>
|
<UnitName Value="Main"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="988"/>
|
<TopLine Value="756"/>
|
||||||
<CursorPos X="3" Y="1007"/>
|
<CursorPos X="72" Y="769"/>
|
||||||
<UsageCount Value="62"/>
|
<UsageCount Value="62"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
@@ -70,9 +71,9 @@
|
|||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="picturectrls.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<UnitName Value="PictureCtrls"/>
|
<UnitName Value="PictureCtrls"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="5"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="822"/>
|
<TopLine Value="831"/>
|
||||||
<CursorPos X="51" Y="849"/>
|
<CursorPos X="51" Y="849"/>
|
||||||
<UsageCount Value="28"/>
|
<UsageCount Value="28"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@@ -177,7 +178,7 @@
|
|||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="picturemanager.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<UnitName Value="PictureManager"/>
|
<UnitName Value="PictureManager"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="3"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="188"/>
|
<TopLine Value="188"/>
|
||||||
<CursorPos X="62" Y="103"/>
|
<CursorPos X="62" Y="103"/>
|
||||||
@@ -243,9 +244,9 @@
|
|||||||
<Unit21>
|
<Unit21>
|
||||||
<Filename Value="bmprgbtypes.pas"/>
|
<Filename Value="bmprgbtypes.pas"/>
|
||||||
<UnitName Value="BmpRGBTypes"/>
|
<UnitName Value="BmpRGBTypes"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="7"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="23"/>
|
<TopLine Value="119"/>
|
||||||
<CursorPos X="24" Y="44"/>
|
<CursorPos X="24" Y="44"/>
|
||||||
<UsageCount Value="26"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@@ -276,9 +277,9 @@
|
|||||||
<Unit25>
|
<Unit25>
|
||||||
<Filename Value="bmprgbutils.pas"/>
|
<Filename Value="bmprgbutils.pas"/>
|
||||||
<UnitName Value="BmpRGBUtils"/>
|
<UnitName Value="BmpRGBUtils"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="6"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="34"/>
|
<TopLine Value="85"/>
|
||||||
<CursorPos X="72" Y="5"/>
|
<CursorPos X="72" Y="5"/>
|
||||||
<UsageCount Value="24"/>
|
<UsageCount Value="24"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@@ -302,10 +303,10 @@
|
|||||||
<Unit28>
|
<Unit28>
|
||||||
<Filename Value="bmprgbgraph.pas"/>
|
<Filename Value="bmprgbgraph.pas"/>
|
||||||
<UnitName Value="BmpRGBGraph"/>
|
<UnitName Value="BmpRGBGraph"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="8"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="47"/>
|
<TopLine Value="20"/>
|
||||||
<CursorPos X="59" Y="66"/>
|
<CursorPos X="76" Y="25"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="20"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit28>
|
</Unit28>
|
||||||
@@ -362,7 +363,7 @@
|
|||||||
<Unit35>
|
<Unit35>
|
||||||
<Filename Value="DLBitmap.pas"/>
|
<Filename Value="DLBitmap.pas"/>
|
||||||
<UnitName Value="DLBitmap"/>
|
<UnitName Value="DLBitmap"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="4"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="631"/>
|
<TopLine Value="631"/>
|
||||||
<CursorPos X="61" Y="336"/>
|
<CursorPos X="61" Y="336"/>
|
||||||
@@ -377,127 +378,138 @@
|
|||||||
<CursorPos X="53" Y="201"/>
|
<CursorPos X="53" Y="201"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit36>
|
</Unit36>
|
||||||
|
<Unit37>
|
||||||
|
<Filename Value="colorpalette.pas"/>
|
||||||
|
<UnitName Value="ColorPalette"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="56"/>
|
||||||
|
<CursorPos X="21" Y="68"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit37>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="248" Column="1" TopLine="229"/>
|
<Caret Line="725" Column="35" TopLine="708"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="674" Column="3" TopLine="662"/>
|
<Caret Line="286" Column="33" TopLine="270"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="687" Column="1" TopLine="675"/>
|
<Caret Line="733" Column="68" TopLine="705"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="248" Column="1" TopLine="227"/>
|
<Caret Line="1122" Column="10" TopLine="1120"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="692" Column="3" TopLine="689"/>
|
<Caret Line="1123" Column="10" TopLine="1121"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="688" Column="1" TopLine="683"/>
|
<Caret Line="1130" Column="10" TopLine="1128"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="246" Column="1" TopLine="227"/>
|
<Caret Line="473" Column="3" TopLine="460"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="248" Column="1" TopLine="227"/>
|
<Caret Line="479" Column="6" TopLine="457"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="246" Column="1" TopLine="227"/>
|
<Caret Line="795" Column="7" TopLine="763"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="95" Column="100" TopLine="89"/>
|
<Caret Line="797" Column="7" TopLine="765"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="725" Column="35" TopLine="708"/>
|
<Caret Line="799" Column="37" TopLine="767"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="286" Column="33" TopLine="270"/>
|
<Caret Line="800" Column="40" TopLine="768"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="733" Column="68" TopLine="705"/>
|
<Caret Line="4" Column="99" TopLine="1"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="1122" Column="10" TopLine="1120"/>
|
<Caret Line="463" Column="51" TopLine="431"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="1123" Column="10" TopLine="1121"/>
|
<Caret Line="479" Column="7" TopLine="447"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="1130" Column="10" TopLine="1128"/>
|
<Caret Line="5" Column="101" TopLine="1"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="473" Column="3" TopLine="460"/>
|
<Caret Line="497" Column="11" TopLine="476"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="479" Column="6" TopLine="457"/>
|
<Caret Line="501" Column="6" TopLine="475"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="795" Column="7" TopLine="763"/>
|
<Caret Line="500" Column="6" TopLine="474"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="797" Column="7" TopLine="765"/>
|
<Caret Line="1007" Column="12" TopLine="988"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="lazimageeditor.pas"/>
|
||||||
<Caret Line="799" Column="37" TopLine="767"/>
|
<Caret Line="26" Column="11" TopLine="1"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="lazimageeditor.pas"/>
|
||||||
<Caret Line="800" Column="40" TopLine="768"/>
|
<Caret Line="11" Column="30" TopLine="1"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="lazimageeditor.pas"/>
|
||||||
<Caret Line="4" Column="99" TopLine="1"/>
|
<Caret Line="26" Column="6" TopLine="1"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="lazimageeditor.pas"/>
|
||||||
<Caret Line="463" Column="51" TopLine="431"/>
|
<Caret Line="11" Column="30" TopLine="1"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="479" Column="7" TopLine="447"/>
|
<Caret Line="767" Column="1" TopLine="748"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="5" Column="101" TopLine="1"/>
|
<Caret Line="772" Column="3" TopLine="769"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="497" Column="11" TopLine="476"/>
|
<Caret Line="749" Column="1" TopLine="743"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="501" Column="6" TopLine="475"/>
|
<Caret Line="774" Column="47" TopLine="754"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="500" Column="6" TopLine="474"/>
|
<Caret Line="289" Column="1" TopLine="273"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="1007" Column="12" TopLine="988"/>
|
<Caret Line="724" Column="1" TopLine="708"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@@ -8,7 +8,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset Preview,
|
Interfaces, // this includes the LCL widgetset Preview,
|
||||||
Forms, Main, PictureManager, PictureCtrls, Test,
|
Forms, Main, PictureManager, PictureCtrls, Test,
|
||||||
NewDialog, ResizeDialog, ResizePaperDialog, PictureDialog, AboutDialog, LazColorPalette;
|
NewDialog, ResizeDialog, ResizePaperDialog, PictureDialog, AboutDialog;
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
object MainForm: TMainForm
|
object MainForm: TMainForm
|
||||||
Left = 260
|
Left = 180
|
||||||
Height = 666
|
Height = 666
|
||||||
Top = 147
|
Top = 135
|
||||||
Width = 905
|
Width = 905
|
||||||
Caption = 'Lazarus Image Editor'
|
Caption = 'Lazarus Image Editor'
|
||||||
ClientHeight = 644
|
ClientHeight = 644
|
||||||
@@ -1292,9 +1292,9 @@
|
|||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object checkFuzzy: TCheckBox
|
object checkFuzzy: TCheckBox
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 19
|
Height = 23
|
||||||
Top = 9
|
Top = 9
|
||||||
Width = 20
|
Width = 24
|
||||||
OnChange = checkFuzzyChange
|
OnChange = checkFuzzyChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TMainForm','FORMDATA',[
|
LazarusResources.Add('TMainForm','FORMDATA',[
|
||||||
'TPF0'#9'TMainForm'#8'MainForm'#4'Left'#3#4#1#6'Height'#3#154#2#3'Top'#3#147#0
|
'TPF0'#9'TMainForm'#8'MainForm'#4'Left'#3#180#0#6'Height'#3#154#2#3'Top'#3#135
|
||||||
+#5'Width'#3#137#3#7'Caption'#6#20'Lazarus Image Editor'#12'ClientHeight'#3
|
+#0#5'Width'#3#137#3#7'Caption'#6#20'Lazarus Image Editor'#12'ClientHeight'#3
|
||||||
+#132#2#11'ClientWidth'#3#137#3#12'Font.CharSet'#7#14'GB2312_CHARSET'#11'Font'
|
+#132#2#11'ClientWidth'#3#137#3#12'Font.CharSet'#7#14'GB2312_CHARSET'#11'Font'
|
||||||
+'.Height'#2#243#9'Font.Name'#6#12#229#190#174#232#189#175#233#155#133#233#187
|
+'.Height'#2#243#9'Font.Name'#6#12#229#190#174#232#189#175#233#155#133#233#187
|
||||||
+#145#10'Font.Pitch'#7#10'fpVariable'#12'Font.Quality'#7#7'fqDraft'#4'Menu'#7
|
+#145#10'Font.Pitch'#7#10'fpVariable'#12'Font.Quality'#7#7'fqDraft'#4'Menu'#7
|
||||||
@@ -733,7 +733,7 @@ LazarusResources.Add('TMainForm','FORMDATA',[
|
|||||||
+'rentColor'#8#0#0#6'TPanel'#15'PanelTolerance2'#4'Left'#3#134#2#6'Height'#2
|
+'rentColor'#8#0#0#6'TPanel'#15'PanelTolerance2'#4'Left'#3#134#2#6'Height'#2
|
||||||
+'"'#3'Top'#2#0#5'Width'#2#30#5'Align'#7#6'alLeft'#10'BevelOuter'#7#6'bvNone'
|
+'"'#3'Top'#2#0#5'Width'#2#30#5'Align'#7#6'alLeft'#10'BevelOuter'#7#6'bvNone'
|
||||||
+#12'ClientHeight'#2'"'#11'ClientWidth'#2#30#8'TabOrder'#2#5#0#9'TCheckBox'#10
|
+#12'ClientHeight'#2'"'#11'ClientWidth'#2#30#8'TabOrder'#2#5#0#9'TCheckBox'#10
|
||||||
+'checkFuzzy'#4'Left'#2#4#6'Height'#2#19#3'Top'#2#9#5'Width'#2#20#8'OnChange'
|
+'checkFuzzy'#4'Left'#2#4#6'Height'#2#23#3'Top'#2#9#5'Width'#2#24#8'OnChange'
|
||||||
+#7#16'checkFuzzyChange'#8'TabOrder'#2#0#0#0#0#0#0#6'TPanel'#13'PanelPictures'
|
+#7#16'checkFuzzyChange'#8'TabOrder'#2#0#0#0#0#0#0#6'TPanel'#13'PanelPictures'
|
||||||
+#4'Left'#2'('#6'Height'#3#5#2#3'Top'#2'i'#5'Width'#3#22#3#5'Align'#7#8'alCli'
|
+#4'Left'#2'('#6'Height'#3#5#2#3'Top'#2'i'#5'Width'#3#22#3#5'Align'#7#8'alCli'
|
||||||
+'ent'#10'BevelOuter'#7#9'bvLowered'#8'TabOrder'#2#3#0#0#9'TMainMenu'#8'MainM'
|
+'ent'#10'BevelOuter'#7#9'bvLowered'#8'TabOrder'#2#3#0#0#9'TMainMenu'#8'MainM'
|
||||||
|
@@ -286,7 +286,6 @@ type
|
|||||||
procedure ViewShowPreviewExecute(Sender: TObject);
|
procedure ViewShowPreviewExecute(Sender: TObject);
|
||||||
private
|
private
|
||||||
Pictures: TPictureManager;
|
Pictures: TPictureManager;
|
||||||
CurrentPaletteColor: TColor;
|
|
||||||
function GetActivePicture: TPictureBitmap;
|
function GetActivePicture: TPictureBitmap;
|
||||||
function GetActivePictureEdit: TPictureEdit;
|
function GetActivePictureEdit: TPictureEdit;
|
||||||
function GetActivePicturePage: TPicturePage;
|
function GetActivePicturePage: TPicturePage;
|
||||||
@@ -722,7 +721,6 @@ begin
|
|||||||
if ssMiddle in Shift then
|
if ssMiddle in Shift then
|
||||||
PaperColor := AColor;
|
PaperColor := AColor;
|
||||||
end;
|
end;
|
||||||
CurrentPaletteColor := AColor;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.PanelFillDblClick(Sender: TObject);
|
procedure TMainForm.PanelFillDblClick(Sender: TObject);
|
||||||
@@ -765,13 +763,13 @@ begin
|
|||||||
Exit;
|
Exit;
|
||||||
if Source is TColorPalette then
|
if Source is TColorPalette then
|
||||||
begin
|
begin
|
||||||
// TPanel(Sender).Color:=CurrentPaletteColor;
|
TPanel(Sender).Color:=Palette.PickedColor;
|
||||||
if Sender = PanelPaper then
|
if Sender = PanelPaper then
|
||||||
ActivePictureEdit.PaperColor := CurrentPaletteColor;
|
ActivePictureEdit.PaperColor := Palette.PickedColor;
|
||||||
if Sender = PanelFill then
|
if Sender = PanelFill then
|
||||||
ActivePictureEdit.FillColor := CurrentPaletteColor;
|
ActivePictureEdit.FillColor := Palette.PickedColor;
|
||||||
if Sender = PanelOutline then
|
if Sender = PanelOutline then
|
||||||
ActivePictureEdit.OutlineColor := CurrentPaletteColor;
|
ActivePictureEdit.OutlineColor := Palette.PickedColor;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user