EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2014
07:34 PM
roParagraphScreen.AddGraphic() - what's the default fit?
roParagraphScreen has two methods for adding an image:
Where displayMode can be one of
My question is what is the default display mode that is used by AddGraphic, i.e. with no param or invalid displayMode? It is not "scale-to-fill", contrary to what doc says. Rather, for the image i have it seems to show it 1:1 (no scale) but chomps about 1/3 from top and 1/3 from bottom. It is not photo-fit either.
(*) This is extra strange: see the extra period "." at after scale-to-fit? That is exactly how it is spelled everywhere in the documentation. That spelling is nothing if not consistent. But apparently that's a typo that got copy&pasted 7 times, since parameter does not work with the dot at the end.
- AddGraphic(url as String)
- AddGraphic(url as String, displayMode as String)
Where displayMode can be one of
- "scale-to-fill" - marked "(Default)"
- "scale-to-fit." - typo*
- "zoom-to-fill"
- "photo-fit"
My question is what is the default display mode that is used by AddGraphic, i.e. with no param or invalid displayMode? It is not "scale-to-fill", contrary to what doc says. Rather, for the image i have it seems to show it 1:1 (no scale) but chomps about 1/3 from top and 1/3 from bottom. It is not photo-fit either.
(*) This is extra strange: see the extra period "." at after scale-to-fit? That is exactly how it is spelled everywhere in the documentation. That spelling is nothing if not consistent. But apparently that's a typo that got copy&pasted 7 times, since parameter does not work with the dot at the end.
5 REPLIES 5
dcrandall
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2014
02:04 PM
Re: roParagraphScreen.AddGraphic() - what's the default fit?
So, kind of a question, is there a way I could either:
a) Position the .addGraphic to not have a mystery 15-20 pixel line underneath the logo/banner?
b) Draw over the top of an roParagraphScreen with an 'roScreen' that works like I want it to?
a) Position the .addGraphic to not have a mystery 15-20 pixel line underneath the logo/banner?
b) Draw over the top of an roParagraphScreen with an 'roScreen' that works like I want it to?


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2014
06:50 PM
Re: roParagraphScreen.AddGraphic() - what's the default fit?
"EnTerr" wrote:
My question is what is the default display mode that is used by AddGraphic, i.e. with no param or invalid displayMode? It is not "scale-to-fill", contrary to what doc says. Rather, for the image i have it seems to show it 1:1 (no scale) but chomps about 1/3 from top and 1/3 from bottom. It is not photo-fit either.
You are correct... it appears that 1:1 scaling will be used in this case. If it is not documented I would not rely on that as a feature though.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2014
03:44 PM
Re: roParagraphScreen.AddGraphic() - what's the default fit?
"RokuKC" wrote:
You are correct... it appears that 1:1 scaling will be used in this case. If it is not documented I would not rely on that as a feature though.
@RokuKC - do you mean that ifParagraphScreen.AddGraphic(url as String) method should not be used?
(that's the version without displayMode param, it has existed first)
What i am trying to do is using one of the standard screens to show limited text and an image. It seems as if image on screen will be limited to about 1/3 of the available space (and there is no way to configure that) - but i am more concerned about showing the image of unknown-in-advance size on the screen rather than perfect fit.
@dcrandall -
a) i doubt there is any way to change anything about the .addGraphic() bounding box
b) you cannot use roScreen on top of any other standard screen - it's completely separate (you have to reject standard screens during roScreen lifetime)


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014
01:00 PM
Re: roParagraphScreen.AddGraphic() - what's the default fit?
"EnTerr" wrote:
@RokuKC - do you mean that ifParagraphScreen.AddGraphic(url as String) method should not be used?
(that's the version without displayMode param, it has existed first)
Sorry, I was more focused on the bit about what happens when a unrecognized display mode is passed to AddGraphic explicitly. 🙂
AddGraphic without an explicit display mode is fine and should display the image unscaled.
Passing an empty string explicitly as display mode should have the same effect, but if that is your intention I recommend calling AddGraphic without the display mode parameter.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-20-2014
09:22 PM
Re: roParagraphScreen.AddGraphic() - what's the default fit?
"RokuKC" wrote:
Sorry, I was more focused on the bit about what happens when a unrecognized display mode is passed to AddGraphic explicitly. 🙂
AddGraphic without an explicit display mode is fine and should display the image unscaled.
Passing an empty string explicitly as display mode should have the same effect, but if that is your intention I recommend calling AddGraphic without the display mode parameter.
I see, so here there is a 5th mode, "" - which is the default. "scale-to-fill" being labeled as "(Default)" was contributing to my confusion.
Thanks for re-clarifying.