rbenditt
2 years agoStreaming Star
DrawText not working on Roku OS 13
I have an app where I'm drawing bitmaps using the draw2d interface. When my Roku devices were updated to the latest Roku OS 13, calls to the DrawText function no longer produce output. Everything else on the bitmap still looks good, such as DrawLine.
I have another old test device running Roku OS 11 and I can see that the same code still works as expected on it.
Here's some simplified code that illustrates the problem:
m.theBitmap = CreateObject("roBitmap", {width: 200, height: 200, AlphaEnable: true})
font_registry = CreateObject("roFontRegistry")
font = font_registry.GetDefaultFont()
theColor = &hFF0000FF ' Red
'theColor = &hFF000000 ' Red - transparent
'theColor = &h00FF00FF ' Green
'theColor = &h00FF0000 ' Green transparent
i = m.theBitmap.drawText("HELLO", 50, 50 , theColor, font)
m.theBitmap.Finish()
As you can see, I've experimented with different colors to test for a possible bug with transparency, but nothing shows up no matter what color is set. Hopefully there's a workaround or bug-fix coming so that I don't need to refactor to pure SceneGraph elements.