SRL Archive - OSR Help

Clearing Smart Debug...


Sir R. M8gic1an

2010-05-05 07:28:29

Well.. I've been trying to clear the SmartDebug in several ways, but am still failing to succeed. Not too surprised considering I've never attempted something like it before.


//clearing SmartDebug
SetTransparentColor(drawing, clBlack);
FastDrawClear(drawing, clBlack);

This gives me an access error on setting transparency.

Not being able to set transparency, I don't know how else to approach it.. I've tried several refresh methods, but none of them worked..

Any ideas.. ? Anyone who actually knows how to do this?

~RM

Quickmarch

2010-05-05 07:50:54

Meh, this is how I do it:


function SmartDrawBitmap(BMP, x, y: Integer): Boolean;
var
SmartCan: TCanvas;

begin
if not SmartActive then Exit;
try
SmartCan := GetBitmapCanvas(BMP);
SmartCan.Handle := SmartGetDebugDC;
SafeDrawBitmap(BMP, SmartCan, x, y);
Result := True;
except
Result := False;
end;
end;

function SmartClearCanvas: Boolean;
var
BMP: Integer;

begin
if not SmartActive then Exit;
try
BMP := BitmapFromString(765, 503, '');
Result := SmartDrawBitmap(BMP, 0, 0);
except
Result := False;
finally
FreeBitmap(BMP);
end;
end;

Sir R. M8gic1an

2010-05-05 07:57:43

Heh, I came to the same conclusion jsut a minue ago :p


//clearing SmartDebug
CleanBMP := BitmapFromString(MSX2, MSY2, '');
SafeDrawBitmap(CleanBMP, drawing.canvas, 0, 0);

Thank you anyway :)

~RM