fixed compilation

git-svn-id: trunk@8687 -
This commit is contained in:
vincents 2006-02-02 15:17:35 +00:00
parent 34ada0cc60
commit 63080cbd35
3 changed files with 47 additions and 45 deletions

View File

@ -1,49 +1,50 @@
object Form1: TForm1
Left = 291
Height = 541
Top = 163
Width = 498
HorzScrollBar.Page = 497
VertScrollBar.Page = 540
ActiveControl = Button1
Caption = 'Fade in - Example for TLazIntfImage'
ClientHeight = 541
ClientWidth = 498
OnCreate = Form1Create
OnDestroy = Form1Destroy
PixelsPerInch = 75
HorzScrollBar.Page = 497
VertScrollBar.Page = 540
Left = 291
Height = 541
Top = 163
Width = 498
PixelsPerInch = 96
object Button1: TButton
Anchors = [akBottom]
BorderSpacing.OnChange = nil
Caption = 'Fade in'
OnClick = Button1Click
TabOrder = 0
Left = 85
Height = 25
Top = 466
Width = 328
Anchors = [akBottom]
BorderSpacing.InnerBorder = 2
Caption = 'Fade in'
OnClick = Button1Click
TabOrder = 0
end
object Button2: TButton
Anchors = [akBottom]
Caption = 'Rotate by >>'
OnClick = Button2Click
TabOrder = 1
Left = 87
Height = 25
Top = 498
Width = 324
Anchors = [akBottom]
BorderSpacing.InnerBorder = 2
Caption = 'Rotate by >>'
OnClick = Button2Click
TabOrder = 1
end
object Edit1: TEdit
BorderSpacing.OnChange = nil
AnchorSideLeft.Control = Button2
AnchorSideTop.Control = Button2
AnchorSideTop.Side = asrCenter
Left = 97
Height = 23
Top = 499
Width = 32
BorderSpacing.Left = 5
BorderSpacing.Around = 5
TabOrder = 2
Text = '90'
AnchorSideLeft.Control = Button2
AnchorSideTop.Control = Button2
AnchorSideTop.Side = asrCenter
Left = 421
Height = 23
Top = 499
Width = 32
end
end

View File

@ -1,18 +1,19 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#7'Caption'#6'#Fade in - Example for TLazIntfImage'
+#12'ClientHeight'#3#29#2#11'ClientWidth'#3#242#1#8'OnCreate'#7#11'Form1Creat'
+'e'#9'OnDestroy'#7#12'Form1Destroy'#13'PixelsPerInch'#2'K'#18'HorzScrollBar.'
+'Page'#3#241#1#18'VertScrollBar.Page'#3#28#2#4'Left'#3'#'#1#6'Height'#3#29#2
+#3'Top'#3#163#0#5'Width'#3#242#1#0#7'TButton'#7'Button1'#7'Anchors'#11#8'akB'
+'ottom'#0#22'BorderSpacing.OnChange'#13#7'Caption'#6#7'Fade in'#7'OnClick'#7
+#12'Button1Click'#8'TabOrder'#2#0#4'Left'#2'U'#6'Height'#2#25#3'Top'#3#210#1
+#5'Width'#3'H'#1#0#0#7'TButton'#7'Button2'#7'Anchors'#11#8'akBottom'#0#7'Cap'
+'tion'#6#12'Rotate by >>'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#1#4'Le'
+'ft'#2'W'#6'Height'#2#25#3'Top'#3#242#1#5'Width'#3'D'#1#0#0#5'TEdit'#5'Edit1'
+#22'BorderSpacing.OnChange'#13#18'BorderSpacing.Left'#2#5#20'BorderSpacing.A'
+'round'#2#5#8'TabOrder'#2#2#4'Text'#6#2'90'#22'AnchorSideLeft.Control'#7#7'B'
+'utton2'#21'AnchorSideTop.Control'#7#7'Button2'#18'AnchorSideTop.Side'#7#9'a'
+'srCenter'#4'Left'#3#165#1#6'Height'#2#23#3'Top'#3#243#1#5'Width'#2' '#0#0#0
'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
+'ActiveControl'#7#7'Button1'#7'Caption'#6'#Fade in - Example for TLazIntfIma'
+'ge'#12'ClientHeight'#3#29#2#11'ClientWidth'#3#242#1#8'OnCreate'#7#11'Form1C'
+'reate'#9'OnDestroy'#7#12'Form1Destroy'#13'PixelsPerInch'#2'`'#0#7'TButton'#7
+'Button1'#4'Left'#2'U'#6'Height'#2#25#3'Top'#3#210#1#5'Width'#3'H'#1#7'Ancho'
+'rs'#11#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#7'Fade '
+'in'#7'OnClick'#7#12'Button1Click'#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'
+#4'Left'#2'W'#6'Height'#2#25#3'Top'#3#242#1#5'Width'#3'D'#1#7'Anchors'#11#8
+'akBottom'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#12'Rotate by >>'
+#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#1#0#0#5'TEdit'#5'Edit1'#22'Anch'
+'orSideLeft.Control'#7#7'Button2'#21'AnchorSideTop.Control'#7#7'Button2'#18
+'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2'a'#6'Height'#2#23#3'Top'#3#243
+#1#5'Width'#2' '#18'BorderSpacing.Left'#2#5#20'BorderSpacing.Around'#2#5#8'T'
+'abOrder'#2#2#4'Text'#6#2'90'#0#0#0
]);

View File

@ -26,7 +26,7 @@ type
procedure Rotate(ABitmap: TBitmap; aCanvas : TCanvas; x, y, Angle : integer);
public
ABitmap: TBitmap;
SampleBitmapABitmap: TBitmap;
end;
var
@ -38,23 +38,23 @@ implementation
procedure TForm1.Button1Click(Sender: TObject);
begin
FadeIn(ABitmap,120,120);
FadeIn(SampleBitmapABitmap,120,120);
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Rotate(ABitmap,Canvas,120,120,StrToIntDef(Edit1.Text,90));
Rotate(SampleBitmapABitmap,Canvas,120,120,StrToIntDef(Edit1.Text,90));
end;
procedure TForm1.Form1Create(Sender: TObject);
begin
ABitmap:=TBitmap.Create;
ABitmap.LoadFromFile('../../images/lazarus.xpm');
SampleBitmapABitmap:=TBitmap.Create;
SampleBitmapABitmap.LoadFromFile('../../images/lazarus.xpm');
end;
procedure TForm1.Form1Destroy(Sender: TObject);
begin
ABitmap.Free;
SampleBitmapABitmap.Free;
end;
procedure TForm1.FadeIn(ABitmap: TBitmap; x, y: integer);
@ -197,7 +197,7 @@ begin
for px:=0 to SrcIntfImg.Width-1 do
begin
CurColor:=SrcIntfImg.Colors[px,py];
ToX:=Px; ToY:=py;
RotatePts(ToX,ToY);