SRL Archive - SRL Archives

DebugBitmap for Debug.scar


Cazax

2009-06-19 19:34:02

Procedure DebugBitmap(Bmp : Integer);
Var
W, H : Integer;
Begin
Try
GetBitmapSize(Bmp, W, H);
DisplayDebugImgWindow(W, H);
SafeDrawBitmap(Bmp, GetDebugCanvas, 0, 0);
Except
Writeln('Error in DebugBitmap');
End;
End;
Shows a bitmap in the debug image window(like DebugTPA).

nielsie95

2009-06-19 19:38:12

You could use SafeDrawBitmap instead of SafeCopyCanvas, but I think it's worthy of being added :)

Naum

2009-06-19 19:47:08

From: nielsie95
You could use SafeDrawBitmap instead of SafeCopyCanvas, but I think it's worthy of being added :)


SafeDrawBitmap ftw!, That would only fail when you would want to display a bitmap in the middle or something :)

Cazax

2009-06-19 19:52:39

Okay, I changed it to DrawBitmap

Nadeem

2009-06-19 19:56:46

I made one like this, except it takes the screen shot of the client and located the bitmap then fills it with red :P It makes it look like Wizzup's DebugTPA but with a bitmap.

but, nevertheless, good job! :p



~NS

Naum

2009-06-19 19:57:56

Wait a second, Da 0wner had one procedure like this called DrawImage..

ZephyrsFury

2009-06-20 13:28:44

Added, thanks. :)