summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-17 13:02:21 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-10-17 13:02:21 +0000
commitf0bb55b50a3f9caa154706fe7caea348e32f6865 (patch)
tree4565f9391bb9e009989824ebfe59c754f8563ddf /src
parent3f57862e4a5b4cde32868926860b27620d73cce7 (diff)
downloadfpGUI-f0bb55b50a3f9caa154706fe7caea348e32f6865.tar.xz
CoreLib: Fixed Canvas.StretchDraw(). I forgot to undo previous debug testing comments.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/gfxbase.pas9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas
index 3669ca94..9ae7f503 100644
--- a/src/corelib/gfxbase.pas
+++ b/src/corelib/gfxbase.pas
@@ -1277,8 +1277,8 @@ end;
procedure TfpgBaseInterpolation.Execute(x, y, w, h: integer);
begin
-// tempimage := TfpgImageBase.Create;
-// tempimage.AllocateImage(image.ColorDepth, w, image.Height);
+ tempimage := TfpgImageBase.Create;
+ tempimage.AllocateImage(image.ColorDepth, w, image.Height);
xfactor := image.Width / w;
yfactor := image.Height / h;
@@ -1296,7 +1296,7 @@ end;
destructor TfpgBaseInterpolation.Destroy;
begin
-// tempimage.Free;
+ tempimage.Free;
inherited Destroy;
end;
@@ -1399,7 +1399,10 @@ begin
dww := FWidth;
FImageDataSize := dww * FHeight * 4;
+ FImageData := nil;
GetMem(FImageData, FImageDataSize);
+ if FImageData = nil then
+ raise Exception.Create('Failed to allocate ' + IntToStr(FImageDataSize) + 'bytes of memory for FImageData');
end;
procedure TfpgImageBase.AllocateMask;