I have an image that I want to put text on. I first clear the location of any old text by drawing a box over it and then drawing the new text. This is theory. In practise this does not work. The box is drawn OVER the text, even though the text is drawn afterwards...
asset=11000
if GetImageExists(asset) then deleteimage(asset)
w=getimagewidth(e)
h=GetImageHeight(e)
copyimage(asset,e,0,0,w,h)
SetRenderToImage(asset,0)
vw=GetVirtualWidth()
vh=getvirtualheight()
SetVirtualResolution(w,h)
createtext(e,excel[0,row,col])
SetTextColor(e,255,0,0,255)
settextsize(e,cellheight*0.75)
SetTextmaxwidth(e,rowwidth)
SetTextAlignment(e,1)
SetTextPosition(e,(col+1)*rowwidth-rowwidth/2,row*cellheight+(cellheight-gettextsize(e))/2)
DrawBox(col*rowwidth+ruimte,row*cellheight+ruimte,(col+1)*rowwidth,(row+1)*cellheight,makecolor(255,255,255),makecolor(255,255,255),makecolor(255,0,255),makecolor(255,0,255),1)
drawtext(e)
deletetext(e)
SetRenderToScreen()
SetVirtualResolution(vw,vh)
deleteimage(e)
copyimage(e,asset,0,0,w,h)
SetSpriteImage(e,e)
Dutch