Player APIs (BrightScript & Ja...
...
Object Reference
Presentation and Widget Object...
roRectangle
6min
this object is passed to various video and graphics widgets ( rovideoplayer , roimagewidget , rohtmlwidget , etc ) to specify their size and positioning object creation this object is created with coordinate and dimension parameters createobject("rorectangle", x as integer, y as integer, width as integer, height as integer) setrectangle() calls made by widget objects (e g roimagewidget setrectangle() ) honor the view mode or aspect ratio conversion mode set by the user if the user has set the video player for letterboxing, it will occur if the video does not fit in the new rectangle exactly rectangles with 4k video modes when the player is using a 4k video mode (e g 3840x2160x60p), rectangles still operate as if the total screen area is 1920x1080 (unless rovideomode docid\ qq734nqz0hcwni0unsdmp is enabled) they are then scaled by a factor of 2 when the video is output for example, to display a full screen 4k video, set the rorectangle instance to 0,0,1920,1080 ; to display an additional hd video in the top right quadrant of the screen, set another rorectangle instance to 960,0,960,540 note that, while 4k video is output at a 1 1 pixel ratio, graphics elements ( roimagewidget , rocanvaswidget , etc ) are upscaled to match the size of the 4k video output this occurs irrespective of the size of the original image and widget rectangle for example, an image in a 960x540 rectangle will first be downscaled to 960x540, then upscaled to 1920x1080 if you want to display images without upscaling on 4k video modes, display them in a video window using the rovideoplayer playstaticimage() method (or enable full resolution graphics) ifrectangle setx(x as integer) as void specifies a new x coordinate for the rectangle sety(y as integer) as void specifies a new y coordinate for the rectangle setwidth(width as integer) as void specifies a new width value for the rectangle setheight(height as integer) as void specifies a new height value for the rectangle getx() as integer returns the x coordinate of the rectangle gety() as integer returns the y coordinate of the rectangle getwidth() as integer returns the width of the rectangle getheight() as integer returns the height of the rectangle