1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-22 17:22:21 -05:00

Few changes.

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@82 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-09-23 00:10:40 +00:00
parent efc8843623
commit f49f0ed870

View File

@ -384,8 +384,6 @@ var
begin begin
Self.GetDimensions(w, h); Self.GetDimensions(w, h);
writeln(inttostr(xs) + ', ' + inttostr(ys) + ' : ' + inttostr(xe) + ', ' +
inttostr(ye));
ww := xe-xs; ww := xe-xs;
hh := ye-ys; hh := ye-ys;
if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then if(xs < 0) or (ys < 0) or (xe > W) or (ye > H) then
@ -422,13 +420,6 @@ begin
Bmp.LoadFromRawImage(Raw, False); Bmp.LoadFromRawImage(Raw, False);
Result := Bmp; Result := Bmp;
{
If you want to use some internal Bitmap system, BitBlt to it here.
Don't forget to free Bmp!
}
//lclintf.BitBlt(Bmps[bitmap].Canvas.Handle, 0, 0, ww + 1, hh + 1, Bmp.Canvas.Handle, xs, ys, SRCCOPY);
//Bmp.Free;
XDestroyImage(Img); XDestroyImage(Img);
XSetErrorHandler(Old_Handler); XSetErrorHandler(Old_Handler);
{$ELSE} {$ELSE}
@ -438,13 +429,6 @@ begin
end; end;
w_ArrayPtr: w_ArrayPtr:
begin begin
// Will only work if the coords are 0, 0, w, h.
// Otherwise, we will need to perform mem copy/move operations.
// Copy it to a XImage-alike structure,
// then pass it to ArrDataToRawImage.
// Basically, Copy the data slices from the array into a XImage,
// where the data IS aligned.
TempData:= GetMem((ww + 1) * (hh + 1) * sizeof(trgb32)); TempData:= GetMem((ww + 1) * (hh + 1) * sizeof(trgb32));
for y := ys to ye do for y := ys to ye do
Move(Self.ArrayPtr[y*Self.ArraySize.x],TempData[(y-ys) * (ww+1)],(ww+1) * SizeOf(TRGB32)); Move(Self.ArrayPtr[y*Self.ArraySize.x],TempData[(y-ys) * (ww+1)],(ww+1) * SizeOf(TRGB32));