Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Fitting text alignment under roScreen

Function createOverlayBox(x, y,w,h,a)

font_registry = CreateObject("roFontRegistry")
font = font_registry.GetDefaultFont(19, true, false)
m.screen.DrawRect(x,y, w, h, &hFFFFFFFF)

End Function

in above code i am using roScreen and there is black ractangle is behind my text., which is drawing good but problem is that text is not fitting inside rect it's not wrapping here, because text length is bigger than rect.
is there any solution like imageCanvas(Text Attribute alignment)
0 Kudos
1 Reply
Level 9

Re: Fitting text alignment under roScreen

You'll need to measure the text and clip it yourself. The code here might help: viewtopic.php?f=34&t=64824&p=415822
My Channels: - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos