lazintfimage example: fixed loading a bitmap

git-svn-id: trunk@16256 -
This commit is contained in:
vincents 2008-08-26 17:58:03 +00:00
parent f442e6ce92
commit c84f7ed855
4 changed files with 30 additions and 30 deletions

View File

@ -1,21 +1,22 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <PathDelim Value="\"/>
<Version Value="5"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
<SaveClosedFiles Value="False"/> <SaveClosedFiles Value="False"/>
<SaveOnlyProjectUnits Value="True"/> <SaveOnlyProjectUnits Value="True"/>
</Flags> </Flags>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value="./"/> <IconPath Value=".\"/>
<TargetFileExt Value=""/> <TargetFileExt Value=""/>
<Title Value="Fade In - Example for TLazIntfImage"/> <Title Value="Fade In - Example for TLazIntfImage"/>
<ActiveEditorIndexAtStart Value="1"/> <ActiveEditorIndexAtStart Value="2"/>
</General> </General>
<PublishOptions> <PublishOptions>
<Version Value="2"/> <Version Value="2"/>
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
<IgnoreBinaries Value="False"/> <IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
@ -23,7 +24,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="1"> <RequiredPackages Count="1">
@ -39,28 +40,30 @@
<UnitName Value="FadeIn1"/> <UnitName Value="FadeIn1"/>
<CursorPos X="8" Y="11"/> <CursorPos X="8" Y="11"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="4"/> <EditorIndex Value="1"/>
<UsageCount Value="20"/> <UsageCount Value="65"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
<Filename Value="mainunit1.pas"/> <Filename Value="mainunit1.pas"/>
<ComponentName Value="Form1"/> <ComponentName Value="Form1"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceBaseClass Value="Form"/>
<ResourceFilename Value="mainunit1.lrs"/> <ResourceFilename Value="mainunit1.lrs"/>
<UnitName Value="MainUnit1"/> <UnitName Value="MainUnit1"/>
<CursorPos X="30" Y="234"/> <CursorPos X="57" Y="52"/>
<TopLine Value="215"/> <TopLine Value="212"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="20"/> <UsageCount Value="65"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit1> </Unit1>
</Units> </Units>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/>
<SearchPaths> <SearchPaths>
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/> <SrcPath Value="$(LazarusDir)\lcl\;$(LazarusDir)\lcl\interfaces\$(LCLWidgetType)\"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<Generate Value="Faster"/> <Generate Value="Faster"/>

View File

@ -3,22 +3,19 @@ object Form1: TForm1
Height = 541 Height = 541
Top = 163 Top = 163
Width = 498 Width = 498
HorzScrollBar.Page = 497
VertScrollBar.Page = 540
ActiveControl = Button1 ActiveControl = Button1
Caption = 'Fade in - Example for TLazIntfImage' Caption = 'Fade in - Example for TLazIntfImage'
ClientHeight = 541 ClientHeight = 541
ClientWidth = 498 ClientWidth = 498
OnCreate = Form1Create OnCreate = Form1Create
OnDestroy = Form1Destroy OnDestroy = Form1Destroy
PixelsPerInch = 96 LCLVersion = '0.9.25'
object Button1: TButton object Button1: TButton
Left = 85 Left = 85
Height = 25 Height = 25
Top = 466 Top = 466
Width = 328 Width = 328
Anchors = [akBottom] Anchors = [akBottom]
Caption = 'Fade in' Caption = 'Fade in'
OnClick = Button1Click OnClick = Button1Click
TabOrder = 0 TabOrder = 0
@ -29,7 +26,6 @@ object Form1: TForm1
Top = 498 Top = 498
Width = 324 Width = 324
Anchors = [akBottom] Anchors = [akBottom]
Caption = 'Rotate by >>' Caption = 'Rotate by >>'
OnClick = Button2Click OnClick = Button2Click
TabOrder = 1 TabOrder = 1

View File

@ -1,16 +1,17 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'#'#1#6'Height'#3#29#2#3'Top'#3#163#0#5'Wi' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'#'#1#6'Height'#3#29#2#3'Top'#3#163#0#5'Wi'
+'dth'#3#242#1#18'HorzScrollBar.Page'#3#241#1#18'VertScrollBar.Page'#3#28#2#13 +'dth'#3#242#1#13'ActiveControl'#7#7'Button1'#7'Caption'#6'#Fade in - Example'
+'ActiveControl'#7#7'Button1'#7'Caption'#6'#Fade in - Example for TLazIntfIma' +' for TLazIntfImage'#12'ClientHeight'#3#29#2#11'ClientWidth'#3#242#1#8'OnCre'
+'ge'#12'ClientHeight'#3#29#2#11'ClientWidth'#3#242#1#8'OnCreate'#7#11'Form1C' +'ate'#7#11'Form1Create'#9'OnDestroy'#7#12'Form1Destroy'#10'LCLVersion'#6#6'0'
+'reate'#9'OnDestroy'#7#12'Form1Destroy'#13'PixelsPerInch'#2'`'#0#7'TButton'#7 +'.9.25'#0#7'TButton'#7'Button1'#4'Left'#2'U'#6'Height'#2#25#3'Top'#3#210#1#5
+'Button1'#4'Left'#2'U'#6'Height'#2#25#3'Top'#3#210#1#5'Width'#3'H'#1#7'Ancho' +'Width'#3'H'#1#7'Anchors'#11#8'akBottom'#0#7'Caption'#6#7'Fade in'#7'OnClick'
+'rs'#11#8'akBottom'#0#7'Caption'#6#7'Fade in'#7'OnClick'#7#12'Button1Click'#8 +#7#12'Button1Click'#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#2'W'#6
+'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#2'W'#6'Height'#2#25#3'Top'#3 +'Height'#2#25#3'Top'#3#242#1#5'Width'#3'D'#1#7'Anchors'#11#8'akBottom'#0#7'C'
+#242#1#5'Width'#3'D'#1#7'Anchors'#11#8'akBottom'#0#7'Caption'#6#12'Rotate by' +'aption'#6#12'Rotate by >>'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#1#0#0
+' >>'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#1#0#0#5'TEdit'#5'Edit1'#22 +#5'TEdit'#5'Edit1'#22'AnchorSideLeft.Control'#7#7'Button2'#21'AnchorSideTop.'
+'AnchorSideLeft.Control'#7#7'Button2'#21'AnchorSideTop.Control'#7#7'Button2' +'Control'#7#7'Button2'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'a'#6
+#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'a'#6'Height'#2#23#3'Top'#3 +'Height'#2#23#3'Top'#3#243#1#5'Width'#2' '#18'BorderSpacing.Left'#2#5#20'Bor'
+#243#1#5'Width'#2' '#18'BorderSpacing.Left'#2#5#20'BorderSpacing.Around'#2#5 +'derSpacing.Around'#2#5#8'TabOrder'#2#2#4'Text'#6#2'90'#0#0#0
+#8'TabOrder'#2#2#4'Text'#6#2'90'#0#0#0
]); ]);

View File

@ -49,7 +49,7 @@ end;
procedure TForm1.Form1Create(Sender: TObject); procedure TForm1.Form1Create(Sender: TObject);
begin begin
SampleBitmapABitmap:=TBitmap.Create; SampleBitmapABitmap:=TBitmap.Create;
SampleBitmapABitmap.LoadFromFile('../../images/lazarus.xpm'); SampleBitmapABitmap.LoadFromFile('..\..\images\lazarusform.bmp');
end; end;
procedure TForm1.Form1Destroy(Sender: TObject); procedure TForm1.Form1Destroy(Sender: TObject);