http://villavu.com/forum/showthread.php?t=53148
Entire Script ^ (In v2)
Just the function:
Simba Code:
procedure SMART_DrawBitmapWithTextMulti(Clear: Boolean; Bitmap: Integer; BmpPlacement: TPoint; TP: TStringArray; Shadow: Boolean; TxtPlacement: TPoint; Font: string; Colour: TColor);
var
I, B, H, Pic, TPH, Numb: Integer;
Offset: TPoint;
TTP: TPointArray;
Canvas: TCanvas;
begin
if (not SMART_DebugSetup) then
SMART_SetupDebug();
{if (Clear) then
SMART_ClearCanvasArea( PointToBox( Point(MSX1, MSY1) , Point(MSX2, MSY2) ) );
SMART_ClearCanvas();}
TPH := High(TP);
Offset := IntToPoint(TxtPlacement.x - BmpPlacement.x, TxtPlacement.y - BmpPlacement.y);
Pic := CopyBitmap(Bitmap);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
if Shadow then
try
FastSetPixel(Pic, TTP[b].x + 1 + Offset.x , TTP[b].y + Numb + 1 + Offset.y,131072);
except
end;
try
FastSetPixel(Pic, TTP[b].x + Offset.x, TTP[b].y + Numb + Offset.y, Colour);
except
end;
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, BmpPlacement.x, BmpPlacement.y);
FreeBitmap(Pic);
end;
How I Fix?!