Marl, the alpha channel is a nice idea, but the font is configurable, in terms of style and colour.
Markus, your demo works perfectly for me, so I don't understand what I am doing wrong. I noticed 2 differences:
* clearScreen() followed immediately by render(). This didn't fix it for me.
* You don't move the text. Again this hasn't fixed it.
The big flashing warning sign for me is that the text gets baked to the background in the top left corner where I grabbed it from even after deleting the text.
In this screenshot you are looking at the top left of the screen. You can see the original text with a faint sprite behind it.
The funny blue swoosh is the background sprite recoloured to make the problem clear, the purple and blue is all one sprite.
The text in the centre is the "sprited" text with the blue of the background sprite showing through.
And here is the current version of the code:
sy# = 1
sx# = 1
clearScreen()
render()
idx = createText(text$)
setTextSize(idx,arrQuizMarker[mk].fontsize)
` *** Check text not too large (marker)
x# = (arrQuizMarker[mk].dimension.x * 0.9 * getVirtualWidth())
if getTextTotalWidth(idx) > x#
setTextSize(idx, arrQuizMarker[mk].fontsize * (getTextTotalWidth(idx) / x#))
endif
setTextPosition(idx, sx#, sy# )
s = createSprite(0)
setSpriteColor(s,128,128,128,128)
setSpriteSize(s, getTextTotalWidth(idx), getTextTotalHeight(idx))
setSpritePosition(s,sx#,sy#)
clearScreen()
render()
img = getImage(sx#, sy#, getTextTotalWidth(idx), getTextTotalHeight(idx))
clearScreen()
deleteText(idx)
deleteSprite(s)