[mythtv] A couple of 16:9 questions and HDTV

Ben Bucksch linux.news at bucksch.org
Sat Aug 30 08:21:29 EDT 2003

Rick Weldon wrote:

>    m_wmult = width / 800.0;
>    m_hmult = height / 600.0;
>    m_screenwidth = width;
>    m_screenheight = height;
>m_wmult and m_hmult should be the same for 4:3 screens and different when 
>dealing with wide screens with width larger. Good thing this, as its used in  the layout calculations. But in the routines that scale the icons 
>LoadScaleImage and LoadScalePixmap the width and height multipliers are 
>different for the 16:9 case and shouldn't be. As is here:
> QImage tmp2 = tmpimage.smoothScale((int)(tmpimage.width() * wmult),
>                                           (int)(tmpimage.height() * hmult));
>my thought is to make the multiplier for both hmult. I believe this will give a round result instead of an oval for both 16:9 and 4:3 displays. As well as the right size icons.  I tried changing both to hmult and built and ran both resolutions and got correctly scaled icons. Will this work in all situations though?  If so the fix is trivial. Change wmult to hmult in the LoadScale methods.
If you go that route, I'd not use always wmult, but the smaller one of 
hmult and wmult, in the obscure case that the screen is taller than wide.

E.g. something like
double mult = MIN(wmult, hmult);

 QImage tmp2 = tmpimage.smoothScale((int)(tmpimage.width() * mult),
                                   (int)(tmpimage.height() * mult));

Seems like the right (partial) fix to me, it keeps the original aspect 
ratio of the images. Apart from one case: 4:3 screens with a resolution 
of 1280x1024.

More information about the mythtv-dev mailing list