Changeset 865 for trunk/src/gui/image/qpixmap_s60.cpp
- Timestamp:
- May 16, 2011, 4:09:34 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.3 (added) merged: 864 /branches/vendor/nokia/qt/current merged: 863 /branches/vendor/nokia/qt/4.7.2 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/image/qpixmap_s60.cpp
r846 r865 600 600 } 601 601 602 Q_GUI_EXPORT int qt_defaultDpiX(); 603 Q_GUI_EXPORT int qt_defaultDpiY(); 604 602 605 int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const 603 606 { … … 610 613 case QPaintDevice::PdmHeight: 611 614 return cfbsBitmap->SizeInPixels().iHeight; 612 case QPaintDevice::PdmWidthMM: { 613 TInt twips = cfbsBitmap->SizeInTwips().iWidth; 614 return (int)(twips * (25.4/KTwipsPerInch)); 615 } 616 case QPaintDevice::PdmHeightMM: { 617 TInt twips = cfbsBitmap->SizeInTwips().iHeight; 618 return (int)(twips * (25.4/KTwipsPerInch)); 619 } 615 case QPaintDevice::PdmWidthMM: 616 return qRound(cfbsBitmap->SizeInPixels().iWidth * 25.4 / qt_defaultDpiX()); 617 case QPaintDevice::PdmHeightMM: 618 return qRound(cfbsBitmap->SizeInPixels().iHeight * 25.4 / qt_defaultDpiY()); 620 619 case QPaintDevice::PdmNumColors: 621 620 return TDisplayModeUtils::NumDisplayModeColors(cfbsBitmap->DisplayMode()); 622 621 case QPaintDevice::PdmDpiX: 623 case QPaintDevice::PdmPhysicalDpiX: { 624 TReal inches = cfbsBitmap->SizeInTwips().iWidth / (TReal)KTwipsPerInch; 625 TInt pixels = cfbsBitmap->SizeInPixels().iWidth; 626 return pixels / inches; 627 } 622 case QPaintDevice::PdmPhysicalDpiX: 623 return qt_defaultDpiX(); 628 624 case QPaintDevice::PdmDpiY: 629 case QPaintDevice::PdmPhysicalDpiY: { 630 TReal inches = cfbsBitmap->SizeInTwips().iHeight / (TReal)KTwipsPerInch; 631 TInt pixels = cfbsBitmap->SizeInPixels().iHeight; 632 return pixels / inches; 633 } 625 case QPaintDevice::PdmPhysicalDpiY: 626 return qt_defaultDpiY(); 634 627 case QPaintDevice::PdmDepth: 635 628 return TDisplayModeUtils::NumDisplayModeBitsPerPixel(cfbsBitmap->DisplayMode());
Note:
See TracChangeset
for help on using the changeset viewer.