[Approved] Support for keepaspectratio in Coverflow (1 Viewer)

ajp8164

Portal Pro
January 9, 2008
575
1,166
Atlanta, GA
Home Country
United States of America United States of America
Windows scaling issue fixed in 27303. Mantis is 3358. Please help verify. Thanks!
 

ajp8164

Portal Pro
January 9, 2008
575
1,166
Atlanta, GA
Home Country
United States of America United States of America
Is this similar to what you are looking for?

View attachment 75769

I added thumbZoom and changed Zoom to ZoomFromTop AND changed the image-alignment:

Code:
          //pCard.Zoom = !pItem.IsFolder;
          pCard.ZoomFromTop = !pItem.IsFolder && _zoom;
          pCard.ImageAlignment = Alignment.ALIGN_CENTER;
          pCard.ImageVAlignment = VAlignment.ALIGN_MIDDLE;

Before anything is added/modified, you should talk to Andy (ajp8164) as he may have comments to how this is implemented - perhaps he has more fixes to it.

There's a basic problem with how images are rendered with flipY (reflection below the image). In GUIImage the algorithm for drawing the reflection computes (hard coded) the top of the reflection to be at the y position of the bottom of the main image.

+------+ <= main image top; y position of main image
|------|
|------|
+------+ <= main image bottom; reflection image top; computed y position of reflection (hard codeed computation)
|------|
~~~~~~~~


There is no allowance for there to be a gap between the bottom of the main image and the top of the reflection; they butt up against each other. The impact to coverflow is that unless the image is located such that the main image is aligned with its bottom at the same y as the frame bottom then the reflection appears in the middle of the frame - this is not visually pleasing.

There are three ways I can think of to solve this problem:
  1. Allow the possibility of a gap to exist between the bottom of the main image and the top of the reflection so that the reflection is positioned properly below the bottom of the frame.
  2. Allow the frame to be resized on an image by image basis (coverflow with different size images) so that reflection appears below the frame.
  3. Position the main image vertically so that the main image bottom is always at the y position of the bottom of the frame.
Not sure which is the best or what the technical complexity of either implementation would be (though I suspect that (3) would be simplest to implement).

The Mac OSX coverflow implements (3). It gives the appearance that the images in the coverflow are different sizes when the unfilled background of the image is transparent (the frames are all the same size and the content does not fill the frame - though the Mac OSX coverflow does not have a "dvd case" frame, the frame is not at all visible). In most cases we want to have a "dvd case"-type frame and I think that the most visually appealing implementation is for all of the frames to be the same size. With this in mind then either (1) or (3) is the best option.

I believe these problems also exist for filmstrip(?)

Thoughts?
 

pilehave

Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #13
    Thanks for looking into this Andy, really appreciated :)

    As for the flipY, I'm not sure I understand the difference between 1) and 3), but it sounds to me, like the reflection should be at the bottom of the frame. I suppose that the virtual "floor" begins, where the frame stops.

    Your ASCII graphics is the way I think it should be...

    I think you are right about filmstrip being "wrong" as well, but I guess it isn't noticed because there is no thumbZoom attribute there (yet).

    I'll check out the latest SVN and enjoy your fixes first, then we can discuss filmstrip ;)
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #14
    So, should we add support for keepaspectratio? I can see that it is not in the fix Andy committed.

    Does anyone else have an opinion on how reflection should be positioned (regarding post #12 just above my comment)?
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #15
    Right, I added keepaspectratio and thumbZoom AND I aligned the posters to the bottom. This is what I think looks more natural, BUT a skinner could very well choose to do something different.

    My proposal is, to allow a new property to align the image top, middle and bottom. That would make everybody happy, right?

    Similar to this screenshot:

    poster_aligned_bottom.jpg
     

    ajp8164

    Portal Pro
    January 9, 2008
    575
    1,166
    Atlanta, GA
    Home Country
    United States of America United States of America
    Right, I added keepaspectratio and thumbZoom AND I aligned the posters to the bottom. This is what I think looks more natural, BUT a skinner could very well choose to do something different.

    My proposal is, to allow a new property to align the image top, middle and bottom. That would make everybody happy, right?

    Similar to this screenshot:

    View attachment 76161

    Very nice looking... is this also using the camera positioning?

    :D
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    • Thread starter
    • Moderator
    • #18
    Right, I added keepaspectratio and thumbZoom AND I aligned the posters to the bottom. This is what I think looks more natural, BUT a skinner could very well choose to do something different.

    My proposal is, to allow a new property to align the image top, middle and bottom. That would make everybody happy, right?

    Similar to this screenshot:

    View attachment 76161

    Very nice looking... is this also using the camera positioning?

    :D

    Unfortunately not, but I'm sure You'll provide us with a patch for that in 1.3.0 ;)
     

    ajp8164

    Portal Pro
    January 9, 2008
    575
    1,166
    Atlanta, GA
    Home Country
    United States of America United States of America
    Hi, so is there any final patch for this to look at? :)

    Dunno; I am under the impression that @pilehave (or someone) had a patch that they were putting forth. If there is a patch and it cannot make it into 1.2 you can post it here (or PM me with it) and I'll put it on my 1.3 branch and update the thread cataloging 1.3 coming changes...

    :D
     

    Users who are viewing this thread

    Top Bottom