example for TLazIntfImage fixed

git-svn-id: trunk@12266 -
This commit is contained in:
mattias 2007-10-01 09:05:25 +00:00
parent 86cc0508dc
commit 622c1cea5a
3 changed files with 32 additions and 32 deletions

View File

@ -1,43 +1,19 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="3"/>
<PathDelim Value="/"/>
<Version Value="5"/>
<General>
<ProjectType Value="Application"/>
<Flags>
<SaveClosedFiles Value="False"/>
<SaveOnlyProjectUnits Value="True"/>
</Flags>
<MainUnit Value="0"/>
<ActiveEditorIndexAtStart Value="0"/>
<IconPath Value="./"/>
<TargetFileExt Value=""/>
<Title Value="Fade In - Example for TLazIntfImage"/>
<ActiveEditorIndexAtStart Value="0"/>
</General>
<Units Count="2">
<Unit0>
<CursorPos X="8" Y="11"/>
<EditorIndex Value="1"/>
<Filename Value="fadein1.lpr"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<TopLine Value="1"/>
<UnitName Value="FadeIn1"/>
<UsageCount Value="20"/>
</Unit0>
<Unit1>
<CursorPos X="19" Y="59"/>
<EditorIndex Value="0"/>
<Filename Value="mainunit1.pas"/>
<ComponentName Value="Form1"/>
<IsPartOfProject Value="True"/>
<Loaded Value="True"/>
<ResourceFilename Value="mainunit1.lrs"/>
<TopLine Value="37"/>
<UnitName Value="MainUnit1"/>
<UsageCount Value="20"/>
</Unit1>
</Units>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
@ -56,9 +32,33 @@
<MinVersion Major="1" Valid="True"/>
</Item1>
</RequiredPackages>
<Units Count="2">
<Unit0>
<Filename Value="fadein1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="FadeIn1"/>
<CursorPos X="8" Y="11"/>
<TopLine Value="1"/>
<EditorIndex Value="3"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="mainunit1.pas"/>
<ComponentName Value="Form1"/>
<IsPartOfProject Value="True"/>
<ResourceFilename Value="mainunit1.lrs"/>
<UnitName Value="MainUnit1"/>
<CursorPos X="30" Y="234"/>
<TopLine Value="215"/>
<EditorIndex Value="0"/>
<UsageCount Value="20"/>
<Loaded Value="True"/>
</Unit1>
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="2"/>
<Version Value="5"/>
<SearchPaths>
<SrcPath Value="$(LazarusDir)/lcl/;$(LazarusDir)/lcl/interfaces/$(LCLWidgetType)/"/>
</SearchPaths>

View File

@ -84,7 +84,7 @@ begin
TempIntfImg.Colors[px,py]:=CurColor;
end;
end;
TempIntfImg.CreateBitmap(ImgHandle,ImgMaskHandle,false);
TempIntfImg.CreateBitmaps(ImgHandle,ImgMaskHandle,false);
TempBitmap.Handle:=ImgHandle;
TempBitmap.MaskHandle:=ImgMaskHandle;
Canvas.Draw(x,y,TempBitmap);
@ -231,7 +231,7 @@ begin
croix(px+x,py+y);
{$ENDIF}
TempIntfImg.CreateBitmap(ImgHandle,ImgMaskHandle,false);
TempIntfImg.CreateBitmaps(ImgHandle,ImgMaskHandle,false);
TempBitmap.Handle:=ImgHandle;
TempBitmap.MaskHandle:=ImgMaskHandle;
aCanvas.Draw(x-dx,y-dy,TempBitmap);

View File

@ -244,7 +244,7 @@ type
ExceptionOnError: boolean): boolean; virtual;
procedure LoadFromDevice(DC: HDC); virtual;
procedure LoadFromBitmap(ABitmap, AMaskBitmap: HBitmap; AWidth: integer = -1; AHeight: integer = -1); virtual;
procedure CreateBitmaps(var ABitmap, AMask: HBitmap; ASkipMask: boolean = False); virtual;
procedure CreateBitmaps(out ABitmap, AMask: HBitmap; ASkipMask: boolean = False); virtual;
procedure SetRawImage(const ARawImage: TRawImage; ADataOwner: Boolean = True); virtual;
procedure GetRawImage(out ARawImage: TRawImage); virtual;
procedure FillPixels(const Color: TFPColor); virtual;
@ -2979,7 +2979,7 @@ begin
SetRawImage(RawImage);
end;
procedure TLazIntfImage.CreateBitmaps(var ABitmap, AMask: HBitmap; ASkipMask: boolean);
procedure TLazIntfImage.CreateBitmaps(out ABitmap, AMask: HBitmap; ASkipMask: boolean);
begin
if not RawImage_CreateBitmaps(FRawImage, ABitmap, AMask, ASkipMask)
then raise FPImageException.Create('Failed to create handles');