* adapt example to the package

git-svn-id: trunk@5861 -
This commit is contained in:
mazen 2004-08-26 16:31:37 +00:00
parent cb9a639a21
commit 2a2c700341
4 changed files with 116 additions and 52 deletions

View File

@ -5,63 +5,75 @@
<General>
<ProjectType Value="Application"/>
<MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<ActiveEditorIndexAtStart Value="3"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="Images Example"/>
</General>
<JumpHistory Count="7" HistoryIndex="6">
<JumpHistory Count="10" HistoryIndex="9">
<Position1>
<Filename Value="mainform.pas"/>
<Caret Line="35" Column="29" TopLine="24"/>
<Caret Line="6" Column="81" TopLine="1"/>
</Position1>
<Position2>
<Filename Value="mainform.pas"/>
<Caret Line="61" Column="45" TopLine="51"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/components/images/laztga.pas"/>
<Caret Line="59" Column="22" TopLine="54"/>
</Position2>
<Position3>
<Filename Value="mainform.pas"/>
<Caret Line="67" Column="14" TopLine="56"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/include/bitmap.inc"/>
<Caret Line="247" Column="1" TopLine="990"/>
</Position3>
<Position4>
<Filename Value="mainform.pas"/>
<Caret Line="61" Column="1" TopLine="35"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/include/bitmap.inc"/>
<Caret Line="910" Column="24" TopLine="897"/>
</Position4>
<Position5>
<Filename Value="mainform.pas"/>
<Caret Line="62" Column="10" TopLine="54"/>
<Filename Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Caret Line="86" Column="31" TopLine="60"/>
</Position5>
<Position6>
<Filename Value="mainform.pas"/>
<Caret Line="146" Column="12" TopLine="120"/>
<Filename Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Caret Line="154" Column="1" TopLine="140"/>
</Position6>
<Position7>
<Filename Value="mainform.pas"/>
<Caret Line="131" Column="14" TopLine="118"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/include/bitmap.inc"/>
<Caret Line="909" Column="5" TopLine="897"/>
</Position7>
<Position8>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/intfgraphics.pas"/>
<Caret Line="1482" Column="1" TopLine="1469"/>
</Position8>
<Position9>
<Filename Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Caret Line="153" Column="1" TopLine="140"/>
</Position9>
<Position10>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/include/bitmap.inc"/>
<Caret Line="847" Column="18" TopLine="833"/>
</Position10>
</JumpHistory>
<Units Count="24">
<Units Count="29">
<Unit0>
<CursorPos X="39" Y="10"/>
<EditorIndex Value="2"/>
<EditorIndex Value="7"/>
<Filename Value="imagesexample.lpr"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<TopLine Value="1"/>
<UnitName Value="JPEGExample"/>
<UsageCount Value="33"/>
<UsageCount Value="38"/>
</Unit0>
<Unit1>
<CursorPos X="81" Y="6"/>
<CursorPos X="65" Y="61"/>
<EditorIndex Value="0"/>
<Filename Value="mainform.pas"/>
<ComponentName Value="ImagesExampleForm"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="mainform.lrs"/>
<TopLine Value="1"/>
<TopLine Value="56"/>
<UnitName Value="MainForm"/>
<UsageCount Value="33"/>
<UsageCount Value="38"/>
</Unit1>
<Unit2>
<CursorPos X="20" Y="156"/>
@ -199,13 +211,13 @@
</Unit21>
<Unit22>
<CursorPos X="2" Y="4"/>
<EditorIndex Value="1"/>
<EditorIndex Value="6"/>
<Filename Value="README.txt"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<SyntaxHighlighter Value="None"/>
<TopLine Value="1"/>
<UsageCount Value="21"/>
<UsageCount Value="26"/>
</Unit22>
<Unit23>
<CursorPos X="1" Y="468"/>
@ -213,6 +225,49 @@
<TopLine Value="1"/>
<UsageCount Value="10"/>
</Unit23>
<Unit24>
<CursorPos X="31" Y="846"/>
<EditorIndex Value="3"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/include/bitmap.inc"/>
<Loaded Value="True"/>
<TopLine Value="833"/>
<UsageCount Value="12"/>
</Unit24>
<Unit25>
<CursorPos X="20" Y="52"/>
<EditorIndex Value="1"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/components/images/laztga.pas"/>
<Loaded Value="True"/>
<TopLine Value="54"/>
<UnitName Value="LazTGA"/>
<UsageCount Value="12"/>
</Unit25>
<Unit26>
<CursorPos X="1" Y="153"/>
<EditorIndex Value="2"/>
<Filename Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Loaded Value="True"/>
<TopLine Value="140"/>
<UnitName Value="FPReadTGA"/>
<UsageCount Value="12"/>
</Unit26>
<Unit27>
<CursorPos X="1" Y="1482"/>
<EditorIndex Value="4"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/intfgraphics.pas"/>
<Loaded Value="True"/>
<TopLine Value="1469"/>
<UnitName Value="IntfGraphics"/>
<UsageCount Value="12"/>
</Unit27>
<Unit28>
<CursorPos X="1" Y="1469"/>
<EditorIndex Value="5"/>
<Filename Value="/home/neifer/FPC/Demo/src/lazarus/lcl/interfaces/gtk/gtkobject.inc"/>
<Loaded Value="True"/>
<TopLine Value="1455"/>
<UsageCount Value="12"/>
</Unit28>
</Units>
<PublishOptions>
<Version Value="2"/>
@ -228,11 +283,11 @@
</RunParams>
<RequiredPackages Count="2">
<Item1>
<PackageName Value="ImagesForLazarus"/>
</Item1>
<Item2>
<PackageName Value="LCL"/>
<MinVersion Major="1" Valid="True"/>
</Item1>
<Item2>
<PackageName Value="ImagesForLazarus"/>
</Item2>
</RequiredPackages>
</ProjectOptions>
@ -250,11 +305,19 @@
</Other>
</CompilerOptions>
<Debugging>
<BreakPoints Count="1">
<BreakPoints Count="3">
<Item1>
<Source Value="/home/satan/pascal/lazarus/lcl/interfaces/gtk2/gtk2int.pas"/>
<Line Value="34"/>
</Item1>
<Item2>
<Source Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Line Value="154"/>
</Item2>
<Item3>
<Source Value="/home/neifer/FPC/Demo/src/fpc/fcl/image/fpreadtga.pp"/>
<Line Value="153"/>
</Item3>
</BreakPoints>
</Debugging>
</CONFIG>

View File

@ -22,7 +22,8 @@ object ImagesExampleForm: TImagesExampleForm
Width = 425
object Image1: TImage
Align = alClient
Proportional = True
AutoSize = True
Center = True
Transparent = True
Height = 315
Width = 421

View File

@ -9,29 +9,29 @@ LazarusResources.Add('TImagesExampleForm','FORMDATA',[
+'akTop'#6'akLeft'#8'akBottom'#0#7'Caption'#6#3'...'#12'ClientHeight'#3';'#1
+#11'ClientWidth'#3#165#1#11'ParentColor'#9#11'ParentCtl3D'#8#8'TabOrder'#2#0
+#6'Height'#3'P'#1#5'Width'#3#169#1#0#6'TImage'#6'Image1'#5'Align'#7#8'alClie'
+'nt'#12'Proportional'#9#11'Transparent'#9#6'Height'#3';'#1#5'Width'#3#165#1#0
+#0#0#7'TButton'#14'LoadJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'C'
+'aption'#6#19'Load JPEG from file'#7'OnClick'#7#19'LoadJPEGButtonClick'#8'Ta'
+'bOrder'#2#1#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3#173#0#0
+#0#7'TButton'#14'SaveJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Cap'
+'tion'#6#20'Save as JPEG to file'#7'OnClick'#7#19'SaveJPEGButtonClick'#8'Tab'
+'Order'#2#2#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#173#0#0#0
+#7'TButton'#15'LoadImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capt'
+'ion'#6#10'Load Image'#7'OnClick'#7#20'LoadImageButtonClick'#8'TabOrder'#2#3
+#4'Left'#2#24#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3#163#0#0#0#7'TButton'#15
+'SaveImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#10'Save'
+' Image'#7'OnClick'#7#20'SaveImageButtonClick'#8'TabOrder'#2#4#4'Left'#2#24#6
+'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#163#0#0#0#18'TOpenPictureDialog'#18'O'
+'penPictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm;*.b'
+'mp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)'
+'|*.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#18'Open existing file'#6'Filter'#6
+'nt'#8'AutoSize'#9#6'Center'#9#11'Transparent'#9#6'Height'#3';'#1#5'Width'#3
+#165#1#0#0#0#7'TButton'#14'LoadJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBotto'
+'m'#0#7'Caption'#6#19'Load JPEG from file'#7'OnClick'#7#19'LoadJPEGButtonCli'
+'ck'#8'TabOrder'#2#1#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3
+#173#0#0#0#7'TButton'#14'SaveJPEGButton'#7'Anchors'#11#6'akLeft'#8'akBottom'
+#0#7'Caption'#6#20'Save as JPEG to file'#7'OnClick'#7#19'SaveJPEGButtonClick'
+#8'TabOrder'#2#2#4'Left'#3#229#0#6'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#173
+#0#0#0#7'TButton'#15'LoadImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7
+'Caption'#6#10'Load Image'#7'OnClick'#7#20'LoadImageButtonClick'#8'TabOrder'
+#2#3#4'Left'#2#24#6'Height'#2#25#3'Top'#3'Z'#1#5'Width'#3#163#0#0#0#7'TButto'
+'n'#15'SaveImageButton'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#10
+'Save Image'#7'OnClick'#7#20'SaveImageButtonClick'#8'TabOrder'#2#4#4'Left'#2
+#24#6'Height'#2#25#3'Top'#3'|'#1#5'Width'#3#163#0#0#0#18'TOpenPictureDialog'
+#18'OpenPictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm'
+';*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.'
+'xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#18'Open existing file'#6'Filte'
+'r'#6#143'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Port'
+'able Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.b'
+'mp'#11'FilterIndex'#2#0#4'left'#2'X'#3'top'#2'@'#0#0#18'TSavePictureDialog'
+#18'SavePictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm'
+';*.bmp)|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.'
+'xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#12'Save file as'#6'Filter'#6
+#143'All files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable '
+'Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#11
+'FilterIndex'#2#0#4'left'#2'X'#3'top'#2'@'#0#0#18'TSavePictureDialog'#18'Sav'
+'ePictureDialog1'#6'Filter'#6#143'All files (*)|*|Graphic (*.png;*.xpm;*.bmp'
+')|*.png;*.xpm;*.bmp|Portable Network Graphic (*.png)|*.png|Pixmap (*.xpm)|*'
+'.xpm|Bitmaps (*.bmp)|*.bmp'#5'Title'#6#12'Save file as'#6'Filter'#6#143'All'
+' files (*)|*|Graphic (*.png;*.xpm;*.bmp)|*.png;*.xpm;*.bmp|Portable Network'
+' Graphic (*.png)|*.png|Pixmap (*.xpm)|*.xpm|Bitmaps (*.bmp)|*.bmp'#11'Filte'
+'rIndex'#2#0#4'left'#2'X'#3'top'#2'p'#0#0#0
+'FilterIndex'#2#0#4'left'#2'X'#3'top'#2'p'#0#0#0
]);

View File

@ -8,7 +8,7 @@ unit ImagesForLazarus;
interface
uses
Lazpng, Lazpnm, Lazjpg, LazBMP, LazTGA, LazXPM, LazarusPackageIntf;
LazPNG, LazPNM, LazJPG, LazBMP, LazTGA, LazXPM, LazarusPackageIntf;
implementation