I am just now becoming acquainted with the roScreen component and its interfaces. I am trying to make a channel where there is a video playing on the left side of the screen and a menu on the right side were you can select different feeds. However, I have a problem where after using the roscreen clear function to set the background color, the video appears behind the background, where it can be heard, but not seen. What can I do to fix this?
Don’t use Clear(), use DrawRect() and specify the coordinates avoiding the video section of the screen.
You can definitely use Clear(). Just make sure you call SetAlphaEnable(True) on the screen, and that you’re passing in a 0 alpha value on the color you’re Clear()'ing with.
screen = CreateObject("roScreen", True)
.
.
.
' Enable alpha on the screen
screen.SetAlphaEnable(True)
' Clear the screen, so the video can be seen behind
screen.Clear(&H00000000) ' &H00000000 = 0 = fully transparent black
' Draw your other screen elements
.
.
.
screen.SwapBuffers()
Also, make sure you’ve called SetDestinationRect() on your roVideoPlayer object to specify where the video should be displayed.
Also, if you want a solid background with the Video appearing “on top” of the background, I would suggest, in Photoshop, create a transparent layer, past your solid background to a layer on top, cut out a hole the size of the video, and save as a transparent .PNG.
- Joel
