Franju
2012-05-07 16:50:56
? What title says ^
2012-05-07 16:50:56
2012-05-07 16:51:41
2012-05-07 16:53:44
2012-05-07 16:56:27
2012-05-07 16:58:12
From: riwu
use bitmaps. You can easily find a script and learn from it. Also pls dont post the same qns in more than 1 section ;)
2012-05-07 17:04:51
2012-05-07 18:41:56
2012-05-07 20:23:48
2012-05-07 21:14:07
program PaintStuff;
{$define SMART}
{$i srl/srl.simba}
{$i SRL/SRL/misc/paintsmart.simba}
Procedure PrintOnSmart(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
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);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1,8388736);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
Procedure DoThePainting;
begin
PrintOnSmart(['A painted canvas', 'by Flight'], Point(40, 50), 255);
end;
begin
Smart_Server := 86;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL; //This must be called before any canvas painting
DoThePainting; [B]Trace this backwards.[/B]
end. 2012-05-08 03:53:02