Your Digital Media Has Never Looked So Good

 
EnTerr
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

roParagraphScreen.AddGraphic() - what's the default fit?

Fri Aug 08, 2014 7:34 pm

roParagraphScreen has two methods for adding an image:
  • 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.
 
dcrandall
Posts: 74
Joined: Wed Jul 30, 2014 11:04 am

Re: roParagraphScreen.AddGraphic() - what's the default fit?

Mon Oct 13, 2014 2:04 pm

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?
 
User avatar
RokuKC
Posts: 315
Joined: Wed Sep 10, 2014 10:44 am
Location: Roku HQ

Re: roParagraphScreen.AddGraphic() - what's the default fit?

Mon Oct 13, 2014 6:50 pm

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
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: roParagraphScreen.AddGraphic() - what's the default fit?

Tue Oct 14, 2014 3:44 pm

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)
 
User avatar
RokuKC
Posts: 315
Joined: Wed Sep 10, 2014 10:44 am
Location: Roku HQ

Re: roParagraphScreen.AddGraphic() - what's the default fit?

Mon Oct 20, 2014 1:00 pm

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
** Valued Community Member **
Topic Author
Posts: 3834
Joined: Sun Jan 02, 2011 2:41 am

Re: roParagraphScreen.AddGraphic() - what's the default fit?

Mon Oct 20, 2014 9:22 pm

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.

Who is online

Users browsing this forum: No registered users and 16 guests