You've already forked lazarus-ccr
the copy, paste, delete, save, open functions has be completed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1534 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -189,7 +189,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TRGB32Bitmap.CreateFromBitmap(ABitmap: TRasterImage);
|
constructor TRGB32Bitmap.CreateFromBitmap(ABitmap: TRasterImage);
|
||||||
var
|
{var
|
||||||
Image: TLazIntfImage;
|
Image: TLazIntfImage;
|
||||||
begin
|
begin
|
||||||
Image := ABitmap.CreateIntfImage;
|
Image := ABitmap.CreateIntfImage;
|
||||||
@ -198,6 +198,10 @@ begin
|
|||||||
finally
|
finally
|
||||||
Image.Free;
|
Image.Free;
|
||||||
end;
|
end;
|
||||||
|
end; }
|
||||||
|
begin
|
||||||
|
Create(ABitmap.Width, ABitmap.Height);
|
||||||
|
Canvas.Draw(0,0,ABitmap);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor TRGB32Bitmap.Destroy;
|
destructor TRGB32Bitmap.Destroy;
|
||||||
|
@ -47,9 +47,9 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="lazimageeditor"/>
|
<UnitName Value="lazimageeditor"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="3"/>
|
<TopLine Value="2"/>
|
||||||
<CursorPos X="102" Y="16"/>
|
<CursorPos X="11" Y="26"/>
|
||||||
<UsageCount Value="55"/>
|
<UsageCount Value="59"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
@ -58,23 +58,23 @@
|
|||||||
<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="1129"/>
|
<TopLine Value="1030"/>
|
||||||
<CursorPos X="14" Y="1141"/>
|
<CursorPos X="5" Y="1046"/>
|
||||||
<UsageCount Value="55"/>
|
<UsageCount Value="59"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
<Unit2>
|
<Unit2>
|
||||||
<Filename Value="picturectrls.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<UnitName Value="PictureCtrls"/>
|
<UnitName Value="PictureCtrls"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="2"/>
|
||||||
<EditorIndex Value="3"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1089"/>
|
<TopLine Value="1157"/>
|
||||||
<CursorPos X="7" Y="1102"/>
|
<CursorPos X="15" Y="1170"/>
|
||||||
<UsageCount Value="24"/>
|
<UsageCount Value="26"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
@ -169,19 +169,21 @@
|
|||||||
<Unit12>
|
<Unit12>
|
||||||
<Filename Value="T:\fpclaz\laz\lcl\graphics.pp"/>
|
<Filename Value="T:\fpclaz\laz\lcl\graphics.pp"/>
|
||||||
<UnitName Value="Graphics"/>
|
<UnitName Value="Graphics"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="2116"/>
|
<TopLine Value="1404"/>
|
||||||
<CursorPos X="27" Y="2142"/>
|
<CursorPos X="27" Y="1404"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="picturemanager.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<UnitName Value="PictureManager"/>
|
<UnitName Value="PictureManager"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="1"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="304"/>
|
<TopLine Value="233"/>
|
||||||
<CursorPos X="36" Y="324"/>
|
<CursorPos X="40" Y="250"/>
|
||||||
<UsageCount Value="25"/>
|
<UsageCount Value="27"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
@ -278,7 +280,7 @@
|
|||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="34"/>
|
<TopLine Value="34"/>
|
||||||
<CursorPos X="72" Y="5"/>
|
<CursorPos X="72" Y="5"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="22"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit25>
|
</Unit25>
|
||||||
<Unit26>
|
<Unit26>
|
||||||
@ -302,19 +304,19 @@
|
|||||||
<UnitName Value="BmpRGBGraph"/>
|
<UnitName Value="BmpRGBGraph"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="114"/>
|
<TopLine Value="100"/>
|
||||||
<CursorPos X="38" Y="385"/>
|
<CursorPos X="15" Y="122"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="18"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit28>
|
</Unit28>
|
||||||
<Unit29>
|
<Unit29>
|
||||||
<Filename Value="rgbdrawutils.pas"/>
|
<Filename Value="rgbdrawutils.pas"/>
|
||||||
<UnitName Value="RGBDrawUtils"/>
|
<UnitName Value="RGBDrawUtils"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="3"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="494"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="11" Y="506"/>
|
<CursorPos X="36" Y="15"/>
|
||||||
<UsageCount Value="15"/>
|
<UsageCount Value="17"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit29>
|
</Unit29>
|
||||||
<Unit30>
|
<Unit30>
|
||||||
@ -331,13 +333,10 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="PictureDialog"/>
|
<UnitName Value="PictureDialog"/>
|
||||||
<EditorIndex Value="1"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="71"/>
|
<TopLine Value="71"/>
|
||||||
<CursorPos X="43" Y="86"/>
|
<CursorPos X="43" Y="86"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="13"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
<LoadedDesigner Value="True"/>
|
|
||||||
</Unit31>
|
</Unit31>
|
||||||
<Unit32>
|
<Unit32>
|
||||||
<Filename Value="T:\fpclaz\laz\lcl\forms.pp"/>
|
<Filename Value="T:\fpclaz\laz\lcl\forms.pp"/>
|
||||||
@ -350,124 +349,124 @@
|
|||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="653" Column="26" TopLine="632"/>
|
<Caret Line="108" Column="65" TopLine="82"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="rgbdrawutils.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="507" Column="10" TopLine="488"/>
|
<Caret Line="191" Column="31" TopLine="177"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="1198" Column="97" TopLine="1191"/>
|
<Caret Line="193" Column="38" TopLine="177"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="14" Column="94" TopLine="10"/>
|
<Caret Line="277" Column="31" TopLine="263"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="35" Column="34" TopLine="14"/>
|
<Caret Line="279" Column="58" TopLine="263"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="72" Column="18" TopLine="51"/>
|
<Caret Line="282" Column="31" TopLine="263"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="73" Column="18" TopLine="52"/>
|
<Caret Line="287" Column="9" TopLine="263"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="120" Column="19" TopLine="99"/>
|
<Caret Line="391" Column="46" TopLine="371"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<Caret Line="121" Column="19" TopLine="100"/>
|
<Caret Line="163" Column="26" TopLine="147"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="241" Column="29" TopLine="220"/>
|
<Caret Line="1044" Column="14" TopLine="1032"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturemanager.pas"/>
|
||||||
<Caret Line="242" Column="29" TopLine="221"/>
|
<Caret Line="88" Column="19" TopLine="72"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<Caret Line="278" Column="26" TopLine="257"/>
|
<Caret Line="521" Column="33" TopLine="506"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="333" Column="35" TopLine="312"/>
|
<Caret Line="1044" Column="14" TopLine="1032"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="337" Column="9" TopLine="316"/>
|
<Caret Line="1038" Column="14" TopLine="1030"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="340" Column="35" TopLine="319"/>
|
<Caret Line="295" Column="28" TopLine="279"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="344" Column="9" TopLine="323"/>
|
<Caret Line="1038" Column="20" TopLine="1012"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="396" Column="5" TopLine="372"/>
|
<Caret Line="1046" Column="1" TopLine="1016"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="629" Column="32" TopLine="608"/>
|
<Caret Line="1229" Column="1" TopLine="1198"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="771" Column="16" TopLine="750"/>
|
<Caret Line="1" Column="1" TopLine="1"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="772" Column="16" TopLine="751"/>
|
<Caret Line="295" Column="28" TopLine="269"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="861" Column="47" TopLine="840"/>
|
<Caret Line="1038" Column="20" TopLine="1012"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="897" Column="49" TopLine="876"/>
|
<Caret Line="1046" Column="27" TopLine="1016"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="898" Column="44" TopLine="877"/>
|
<Caret Line="1044" Column="11" TopLine="1028"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="927" Column="50" TopLine="906"/>
|
<Caret Line="23" Column="77" TopLine="20"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="928" Column="45" TopLine="846"/>
|
<Caret Line="295" Column="28" TopLine="269"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="main.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="1141" Column="14" TopLine="1129"/>
|
<Caret Line="1038" Column="20" TopLine="1024"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="picturemanager.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="89" Column="65" TopLine="78"/>
|
<Caret Line="1046" Column="23" TopLine="1024"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="picturemanager.pas"/>
|
<Filename Value="main.pas"/>
|
||||||
<Caret Line="94" Column="20" TopLine="78"/>
|
<Caret Line="1044" Column="24" TopLine="1030"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="picturemanager.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<Caret Line="324" Column="36" TopLine="304"/>
|
<Caret Line="198" Column="22" TopLine="182"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="picturectrls.pas"/>
|
<Filename Value="picturectrls.pas"/>
|
||||||
<Caret Line="191" Column="20" TopLine="175"/>
|
<Caret Line="1170" Column="15" TopLine="1157"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -23,6 +23,9 @@ begin
|
|||||||
// show new picture dialog
|
// show new picture dialog
|
||||||
MainForm.Show;
|
MainForm.Show;
|
||||||
//MainForm.FileNewExecute(nil);
|
//MainForm.FileNewExecute(nil);
|
||||||
|
if ParamCount > 0 then
|
||||||
|
MainForm.OpenImageFile(ParamStr(1))
|
||||||
|
else
|
||||||
MainForm.FileNewOnStart;
|
MainForm.FileNewOnStart;
|
||||||
|
|
||||||
Application.Run;
|
Application.Run;
|
||||||
|
@ -1281,9 +1281,9 @@
|
|||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
object checkFuzzy: TCheckBox
|
object checkFuzzy: TCheckBox
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 23
|
Height = 19
|
||||||
Top = 9
|
Top = 9
|
||||||
Width = 24
|
Width = 20
|
||||||
OnChange = checkFuzzyChange
|
OnChange = checkFuzzyChange
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
|
@ -728,8 +728,8 @@ LazarusResources.Add('TMainForm','FORMDATA',[
|
|||||||
+'ht'#2' '#6'Layout'#7#8'tlCenter'#11'ParentColor'#8#0#0#6'TPanel'#15'PanelTo'
|
+'ht'#2' '#6'Layout'#7#8'tlCenter'#11'ParentColor'#8#0#0#6'TPanel'#15'PanelTo'
|
||||||
+'lerance2'#4'Left'#3#134#2#6'Height'#2'"'#3'Top'#2#0#5'Width'#2#30#5'Align'#7
|
+'lerance2'#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'#12'ClientHeight'#2'"'#11'ClientWidth'#2
|
+#6'alLeft'#10'BevelOuter'#7#6'bvNone'#12'ClientHeight'#2'"'#11'ClientWidth'#2
|
||||||
+#30#8'TabOrder'#2#5#0#9'TCheckBox'#10'checkFuzzy'#4'Left'#2#4#6'Height'#2#23
|
+#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#24#8'OnChange'#7#16'checkFuzzyChange'#8'TabOrder'#2#0
|
+#3'Top'#2#9#5'Width'#2#20#8'OnChange'#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
|
+#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'alClient'#10'BevelOuter'#7#9'bvLowered'#8'T'
|
+'i'#5'Width'#3#22#3#5'Align'#7#8'alClient'#10'BevelOuter'#7#9'bvLowered'#8'T'
|
||||||
+'abOrder'#2#3#0#0#9'TMainMenu'#8'MainMenu'#6'Images'#7#16'ImageListActions'#4
|
+'abOrder'#2#3#0#0#9'TMainMenu'#8'MainMenu'#6'Images'#7#16'ImageListActions'#4
|
||||||
|
@ -292,6 +292,7 @@ type
|
|||||||
procedure UpdateAll;
|
procedure UpdateAll;
|
||||||
public
|
public
|
||||||
procedure FileNewOnStart;
|
procedure FileNewOnStart;
|
||||||
|
procedure OpenImageFile(FileName: string);
|
||||||
property ActivePicture: TPictureBitmap read GetActivePicture;
|
property ActivePicture: TPictureBitmap read GetActivePicture;
|
||||||
property ActivePicturePage: TPicturePage read GetActivePicturePage;
|
property ActivePicturePage: TPicturePage read GetActivePicturePage;
|
||||||
property ActivePictureEdit: TPictureEdit read GetActivePictureEdit;
|
property ActivePictureEdit: TPictureEdit read GetActivePictureEdit;
|
||||||
@ -1023,7 +1024,7 @@ end;
|
|||||||
|
|
||||||
procedure TMainForm.FileNewOnStart;
|
procedure TMainForm.FileNewOnStart;
|
||||||
begin
|
begin
|
||||||
Pictures.New(640, 480, clTeal);
|
Pictures.New(520, 390, $F1EFDA);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMainForm.FileOpenExecute(Sender: TObject);
|
procedure TMainForm.FileOpenExecute(Sender: TObject);
|
||||||
@ -1033,10 +1034,16 @@ begin
|
|||||||
if OpenPictureDialog.Execute then
|
if OpenPictureDialog.Execute then
|
||||||
begin
|
begin
|
||||||
for I := 0 to Pred(OpenPictureDialog.Files.Count) do
|
for I := 0 to Pred(OpenPictureDialog.Files.Count) do
|
||||||
Pictures.Load(OpenPictureDialog.Files[I]);
|
//Pictures.Load(OpenPictureDialog.Files[I]);
|
||||||
|
OpenImageFile(OpenPictureDialog.Files[I]);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TMainForm.OpenImageFile(FileName: string);
|
||||||
|
begin
|
||||||
|
Pictures.Load(FileName);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TMainForm.FileSaveAsExecute(Sender: TObject);
|
procedure TMainForm.FileSaveAsExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if SavePictureDialog.Execute then
|
if SavePictureDialog.Execute then
|
||||||
|
@ -521,8 +521,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomPictureView.SavePicture(const FileName: String);
|
procedure TCustomPictureView.SavePicture(const FileName: String);
|
||||||
|
var Pic: TPicture;
|
||||||
begin
|
begin
|
||||||
Picture.SaveToFile(FileName);
|
Pic := TPicture.Create;
|
||||||
|
//Picture.SaveToFile(UTF8Decode(FileName));
|
||||||
|
Pic.Bitmap.Width := Picture.Width;
|
||||||
|
Pic.Bitmap.Height := Picture.Height;
|
||||||
|
Pic.Bitmap.Canvas.Draw(0,0,Picture);
|
||||||
|
Pic.SaveToFile(FileName);
|
||||||
|
Pic.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCustomPictureView.ExportPictureAsLazarusResource(const AFileName,
|
procedure TCustomPictureView.ExportPictureAsLazarusResource(const AFileName,
|
||||||
|
@ -31,7 +31,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, Controls, Graphics, ExtCtrls, ComCtrls,
|
Classes, SysUtils, LResources, Controls, Graphics, ExtCtrls, ComCtrls,
|
||||||
Forms, PictureCtrls;
|
Forms, PictureCtrls, RGBDrawUtils;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -235,20 +235,25 @@ end;
|
|||||||
procedure TPictureManager.Load(const FileName: String);
|
procedure TPictureManager.Load(const FileName: String);
|
||||||
var
|
var
|
||||||
NewPage: TPicturePage;
|
NewPage: TPicturePage;
|
||||||
Icon: TIcon;
|
Icon: TCustomRGBBitmapCore;
|
||||||
I: Integer;
|
I: Integer;
|
||||||
|
Pic: TPicture;
|
||||||
begin
|
begin
|
||||||
if SameText(ExtractFileExt(FileName), '.ico') then
|
//if SameText(ExtractFileExt(FileName), '.ico') then
|
||||||
begin
|
//begin
|
||||||
Icon := TIcon.Create;
|
Icon := TCustomRGBBitmapCore.Create;
|
||||||
try
|
try
|
||||||
// First image in std bitmap
|
// First image in std bitmap
|
||||||
Icon.LoadFromFile(FileName);
|
// Icon.LoadFromFile(FileName);
|
||||||
|
Pic := TPicture.Create;
|
||||||
|
Pic.LoadFromFile(FileName);
|
||||||
|
Icon.Width:=Pic.Width;
|
||||||
|
Icon.Height:=Pic.Height;
|
||||||
|
Icon.Canvas.Draw(0,0,Pic.Graphic);
|
||||||
// other images
|
// other images
|
||||||
for I := 0 to Pred(Icon.Count) do
|
//for I := 0 to Pred(Icon.Count) do
|
||||||
begin
|
begin
|
||||||
Icon.Current := I;
|
// Icon.Current := I;
|
||||||
NewPage := CreatePage(Icon);
|
NewPage := CreatePage(Icon);
|
||||||
NewPage.Parent := Self;
|
NewPage.Parent := Self;
|
||||||
ActivePage := NewPage;
|
ActivePage := NewPage;
|
||||||
@ -257,15 +262,16 @@ begin
|
|||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
Icon.Free;
|
Icon.Free;
|
||||||
|
Pic.Free;
|
||||||
end;
|
end;
|
||||||
end
|
{end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
NewPage := CreatePage(FileName);
|
NewPage := CreatePage(FileName);
|
||||||
NewPage.Parent := Self;
|
NewPage.Parent := Self;
|
||||||
ActivePage := NewPage;
|
ActivePage := NewPage;
|
||||||
Change;
|
Change;
|
||||||
end;
|
end; }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TPictureManager.Save;
|
procedure TPictureManager.Save;
|
||||||
|
Reference in New Issue
Block a user