RENJITHVR4
9 years agoVisitor
ROKU 4 :: Position problem with Roimagecanvas
Hi, I have a problem. I have used Roimagecanvas for the custom keyboard with a login screen. Here I'm using Roku 3 and Roku 4.
When the app loaded on the Roku 3, the positions are correct. But Roku 4 is not the same. The positions are changed.
From Roku 4 settings the Display type is 1080p HD TV
And I printed displaySize, then
For keypad layer position , I have following
And this is the layer.
Now the problem is
In Roku 3, the positions are correct.
But, In Roku 4 , All are changed. So Roimagecanvas will effect with resolutions? How can I render the layers with respect to current Display Type (1080p or 720P) ?
When the app loaded on the Roku 3, the positions are correct. But Roku 4 is not the same. The positions are changed.
deviceInfo = CreateObject("roDeviceInfo")
uiResolution = deviceInfo.GetUIResolution()
displaySize = deviceInfo.GetDisplaySize()
Width = displaySize.w
Height = displaySize.h
From Roku 4 settings the Display type is 1080p HD TV
And I printed displaySize, then
<Component: roAssociativeArray> =
{
h: 1080
w: 1920
}
For keypad layer position , I have following
keypadPos = { x: int(.1*width), y: int(.287*Height), w: int(.23*width), h: int(.52*Height)}
And this is the layer.
this.canvas.SetLayer(3, { url: "pkg:/locale/default/images/KB/login/$abc3.png", TargetRect: keypadPos }
Now the problem is
In Roku 3, the positions are correct.
But, In Roku 4 , All are changed. So Roimagecanvas will effect with resolutions? How can I render the layers with respect to current Display Type (1080p or 720P) ?