mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-05 06:36:14 +02:00
added exception handling for createpixmapindirect
git-svn-id: trunk@4008 -
This commit is contained in:
parent
cb205b4d7b
commit
ecd81f2cef
@ -39,7 +39,8 @@ end;
|
|||||||
procedure TBitmap.Draw(ACanvas: TCanvas; const ARect: TRect);
|
procedure TBitmap.Draw(ACanvas: TCanvas; const ARect: TRect);
|
||||||
begin
|
begin
|
||||||
HandleNeeded;
|
HandleNeeded;
|
||||||
ACanvas.CopyRect(ARect, Self.Canvas, Rect(0, 0, Width, Height));
|
if HandleAllocated then
|
||||||
|
ACanvas.CopyRect(ARect, Self.Canvas, Rect(0, 0, Width, Height));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor TBitmap.VirtualCreate;
|
constructor TBitmap.VirtualCreate;
|
||||||
@ -188,7 +189,7 @@ var
|
|||||||
pstr : PChar;
|
pstr : PChar;
|
||||||
Begin
|
Begin
|
||||||
HandleNeeded;
|
HandleNeeded;
|
||||||
if Filename<>'' then begin
|
if (Filename<>'') and HandleAllocated then begin
|
||||||
pStr:=PChar(Filename);
|
pStr:=PChar(Filename);
|
||||||
SendIntfMessage(LM_LOADXPM,Self,pstr);
|
SendIntfMessage(LM_LOADXPM,Self,pstr);
|
||||||
end;
|
end;
|
||||||
@ -416,7 +417,7 @@ begin
|
|||||||
Reference;
|
Reference;
|
||||||
FHandle:=Value;
|
FHandle:=Value;
|
||||||
FillChar(FDIB, sizeof(FDIB), 0);
|
FillChar(FDIB, sizeof(FDIB), 0);
|
||||||
if Value <> 0 then
|
if FHandle <> 0 then
|
||||||
GetObject(FHandle, SizeOf(FDIB), @FDIB);
|
GetObject(FHandle, SizeOf(FDIB), @FDIB);
|
||||||
Changed(Self);
|
Changed(Self);
|
||||||
end;
|
end;
|
||||||
@ -528,6 +529,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.29 2003/04/03 17:42:13 mattias
|
||||||
|
added exception handling for createpixmapindirect
|
||||||
|
|
||||||
Revision 1.28 2003/03/12 14:39:29 mattias
|
Revision 1.28 2003/03/12 14:39:29 mattias
|
||||||
fixed clipping origin in stretchblt
|
fixed clipping origin in stretchblt
|
||||||
|
|
||||||
|
@ -240,8 +240,13 @@ begin
|
|||||||
FreeMem(XPM);
|
FreeMem(XPM);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FWidth:=NewWidth;
|
if HandleAllocated then begin
|
||||||
FHeight:=NewHeight;
|
FWidth:=NewWidth;
|
||||||
|
FHeight:=NewHeight;
|
||||||
|
end else begin
|
||||||
|
FWidth:=0;
|
||||||
|
FHeight:=0;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// included by graphics.pp
|
// included by graphics.pp
|
||||||
@ -249,6 +254,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.18 2003/04/03 17:42:13 mattias
|
||||||
|
added exception handling for createpixmapindirect
|
||||||
|
|
||||||
Revision 1.17 2002/12/18 17:59:12 mattias
|
Revision 1.17 2002/12/18 17:59:12 mattias
|
||||||
minor cleanup
|
minor cleanup
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user