Author Topic: Background.png gets rendered useless when stretching is applied  (Read 8003 times)

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
When you have created a background image, and all values and attributes in the skin.xml are set perfectly, it will display bit-perfect in the skin.

For example, if you use this picture:



The result will be:



Which is o.k. (except for the background of the track text)


But as soon as you select a slightly larger font for the player, and then stretching activates, the result doesn't look anything like the original anymore:




After lots of testing I found out that when stretching is getting activated, vertical stretching works fine and follows the settings made, but horizontally only the most left vertical line of pixels is used to smear out over the whole width of the player panel.

It's easier to see what happens when using this slightly altered backgound image:



When not stretched, the result is this, which is correct:




But selecting a larger font and so activating stretching results in this:




Is this a rendering issue within MusicBee? It behaves the same with v2 and v3.
Or could there be something wrong with my skin.xml?
I have always wondered that I never could get stretchX1 and stretchX2 doing anything at all.
Last Edit: November 29, 2015, 12:16:34 PM by hiccup

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
@Steven,

Could you please give some feedback on this? Even if it is very brief?
I intend to create a new skin which will be very dependent on this subject.
Finding and analyzing this issue cost me lots of time and effort, and of course I don't want to spend more on it if it's not being confirmed and/or addressed by you.

P.S.
Other skinners not encountering this specific issue at all are of course also very welcome to reply.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368
After lots of testing I found out that when stretching is getting activated, vertical stretching works fine and follows the settings made, but horizontally only the most left vertical line of pixels is used to smear out over the whole width of the player panel.
i dont see how that can be true. It should never smear horizontally and only vertically. I will add something it tell MB to repeat the pattern instead of stretching vertically

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368
to have the background image repeated rather than stretched, set the values to -1
<element id="Panel">
  <images stretchY1="-1" stretchY2="-1"

the musicbee.exe file is updated on the current musicbee3 link

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
Thanks for this, but regrettably it doesn't seem to work.

I pm'ed you a link to the skin from the screenshots that I am using to try and get this working.
There are two lines with 'stretchx' elements in the skin.xml
Changing the ones in line 16 to -1 doesn't accomplish anything, and changing the ones in line 149 makes skincreator crash.



hiccup

  • Sr. Member
  • ****
  • Posts: 7904
i have uploaded the change

Now when stretchX is set to -1, indeed the background image isn't corrupted anymore.
But the area beneath the track text still is:



Have you been able to confirm that the stretchX function as intended does indeed not work?
Nor for the background, nor for the trackinfopanel?

Is that something you consider looking to fix?


And a reminder, the 'enlarge progress bar' still also functions for bitmapped skin, which I imagine shouldn't.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368
its stretchY1 and only done for the panel background
i will have a look at the track text to see if thats possible

hiccup

  • Sr. Member
  • ****
  • Posts: 7904
its stretchY1 and only done for the panel background

I always assumed it was intended to work like this:

When from this example you want only the green part to be stretched, you would set:
Y1=1 Y2=2 X1=3 X2=4

So that is not the way it is supposed to work?


Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368
what you call smearing is nothing to do with stretching the horizontal axis, infact the image is not stretched that way at all - its repeated.
Could you send me the XMLC file?

hiccup

  • Sr. Member
  • ****
  • Posts: 7904

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34368
the track text is addressed for the next update.
Because you are not using -1 on the y stretch setting there is some very small vertical distortion for the panel background. However i see that because you are using borders you cant use -1 anyway