how about we have a SMART_DrawTextEx which also has the Clear parameter, it could be used to quickly and easily clear the canvas when someone starts their proggy
Current:
Simba Code:
{*******************************************************************************
procedure SMART_DrawText(x, y: Integer; font, Text: string; Color: TColor);
Contributors: Jukka
Description: Draws a TBox onto the SMART Debug canvas
*******************************************************************************}
procedure SMART_DrawText(x, y: Integer; font, Text: string; Color:TColor);
var
i, height: integer;
tpa: tpointarray;
begin
tpa := LoadTextTPA(text,font,height);
for i:= 0 to high(tpa) do
begin
tpa[i].x := tpa[i].x + x;
tpa[i].y := tpa[i].y + y;
end;
SMART_DrawDotsEx(false, tpa, Color);
end;
My suggestion:
Simba Code:
{*******************************************************************************
procedure SMART_DrawTextEx(Clear: Boolean; x, y: Integer; font, Text: string; Color: TColor);
Contributors: Jukka, Shuttleu
Description: Draws text onto the SMART Debug canvas at position x, y
*******************************************************************************}
procedure SMART_DrawTextEx(Clear: Boolean; x, y: Integer; font, Text: string; Color:TColor);
var
i, height: integer;
tpa: tpointarray;
begin
tpa := LoadTextTPA(text,font,height);
for i:= 0 to high(tpa) do
begin
tpa[i].x := tpa[i].x + x;
tpa[i].y := tpa[i].y + y;
end;
SMART_DrawDotsEx(Clear, tpa, Color);
end;
{*******************************************************************************
procedure SMART_DrawText(x, y: Integer; font, Text: string; Color: TColor);
Contributors: Shuttleu
Description: Draws text onto the SMART Debug canvas at position x, y
*******************************************************************************}
procedure SMART_DrawText(x, y: Integer; font, Text: string; Color:TColor);
begin
SMARTDrawTextEx(False, x, y, font, Text, Color);
end;
~shut