[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/kdetv
From:       Dirk Ziegelmeier <dziegel () gmx ! de>
Date:       2005-08-21 12:27:29
Message-ID: 1124627249.041796.21873.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 451651 by dziegel:

Fix aspect ratio correction for non-rectangular displays


 M  +22 -0     ChangeLog  
 M  +22 -6     libkdetv/kdetvview.cpp  


--- trunk/extragear/multimedia/kdetv/ChangeLog #451650:451651
@@ -1,3 +1,25 @@
+2005-08-18 19:47  dziegel
+
+	* : Update kdetv.spec
+
+2005-08-14 19:56  dziegel
+
+	* : Finalize renaming of kv4lsetup to kdetvv4lsetup BUGS: 104543
+
+2005-08-14 19:42  dziegel
+
+	* : rename kv4lsetup to kdetvv4lsetup to avoid collision with
+	  avifile lib
+
+2005-08-14 19:17  dziegel
+
+	* : prepare 0.8.8
+
+2005-08-14 18:40  dziegel
+
+	* : Enable colorkey autopainting. Should fix problems with
+	  nonworking video display after using xine/mplayer on some systems.
+
 2005-08-02 07:34  taupter
 
 	* : BUGFIX: Fix run-time error: kdetv: symbol lookup error:
--- trunk/extragear/multimedia/kdetv/libkdetv/kdetvview.cpp #451650:451651
@@ -30,6 +30,7 @@
 #include <qpaintdevice.h>
 #include <qpaintdevicemetrics.h>
 
+
 KdetvView::KdetvView(QWidget *parent, const char *name) 
     : QWidget(parent,name ? name : "kdetv_view")
 {
@@ -79,14 +80,29 @@
     QPaintDeviceMetrics \
m(QApplication::desktop()->screen((QApplication::desktop()->screenNumber(this))));  
     /*
-    kdDebug() << "Screen dpix x dpiy: "
-              << m.logicalDpiY() << "x" << m.logicalDpiX()
-              << " -> aspect correction factor: "
-              << (float)m.logicalDpiX()/(float)m.logicalDpiY()
-              << endl;
+      Aspect ratio calculation (QPaintDeviceMetrics calls):
+      
+                  RESOLUTIONx      width()
+      WIDTHpix = ------------- = -----------
+                  WIDTHx,phy      widthMM()
+      
+                   RESOLUTIONy      height()
+      HEIGHTpix = ------------- = ------------
+                   HEIGHTy,phy     heightMM()
+      
+      
+                   width() * heightMM()
+      ASPECTpix = ----------------------
+                   height() * widthMM()
+      
+      
+                       desiredASPECT
+      ASPECTlogical = ---------------
+                         ASPECTpix
     */
 
-    float ar = aspectRatio * ((float)m.logicalDpiX()/(float)m.logicalDpiY());
+    float aspectPix = ((float)m.width() * (float)m.heightMM()) / ((float)m.height() \
* (float)m.widthMM()); +    float ar        = aspectRatio / aspectPix;
 
     if (am == AR_BEST_FIT) {
         if( (int)(height() * ar) <= width() ) {


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic