Hello
I have just started to learn about canvases and i want to put some text on the debug screen
if i use this
SCAR Code:
bmp:=CreateBitmapFromText('Hello', UpChars, 16777215);
how would i find the width of bmp?
if i run this then it comes out fine
SCAR Code:
program canvas;
var
bmp:integer;
DebugCanvas,BmpCanvas:TCanvas;
begin
DisplayDebugImgWindow(300,300);
Bmp:=CreateBitmapFromText('Hello', UpChars, 16777215);
DebugCanvas:=getdebugcanvas;
BmpCanvas:=GetBitmapCanvas(Bmp);
Copycanvas(BmpCanvas,DebugCanvas,0,0,30,30,10,10,40,40);
end.
but if i change the string to a longer one then it will only show part of the bitmap like so
SCAR Code:
program canvas;
var
bmp:integer;
DebugCanvas,BmpCanvas:TCanvas;
begin
DisplayDebugImgWindow(300,300);
Bmp:=CreateBitmapFromText('Hello how are you today?', UpChars, 16777215);
DebugCanvas:=getdebugcanvas;
BmpCanvas:=GetBitmapCanvas(Bmp);
Copycanvas(BmpCanvas,DebugCanvas,0,0,40,30,10,10,60,40);
end.
if you dont understand what i mean then i will try to explain a bit better
if you can help m and you know how o do it then thank you
~shut