summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/outdev.hxx14
-rw-r--r--vcl/source/outdev/font.cxx2
-rw-r--r--vcl/source/outdev/map.cxx17
3 files changed, 11 insertions, 22 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 5dab75f230d4..82b3180d212f 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -1718,6 +1718,7 @@ public:
@returns Height in units of device pixels.
*/
SAL_DLLPRIVATE tools::Long ImplLogicHeightToDevicePixel( tools::Long nHeight ) const;
+ SAL_DLLPRIVATE double ImplLogicHeightToDeviceFontHeight(tools::Long nHeight) const;
/** Convert device pixels to a width in logical units.
@@ -1838,19 +1839,6 @@ private:
*/
SAL_DLLPRIVATE tools::Long ImplLogicYToDevicePixel( tools::Long nY ) const;
- /** Convert logical height to device pixels, with exact sub-pixel value.
-
- To get the \em exact pixel height, it must calculate the Y-DPI of the device and the
- map scaling factor.
-
- @param fLogicHeight Exact height in logical units.
-
- @returns Exact height in pixels - returns as a float to provide for subpixel value.
- */
- SAL_DLLPRIVATE float ImplFloatLogicHeightToDevicePixel( float fLogicHeight ) const;
- ///@}
-
-
/** @name Native Widget Rendering functions
These all just call through to the private mpGraphics functions of the same name.
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index b2c501185b26..e8887169497e 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -864,7 +864,7 @@ bool OutputDevice::ImplNewFont() const
// convert to pixel height
// TODO: replace integer based aSize completely with subpixel accurate type
- float fExactHeight = ImplFloatLogicHeightToDevicePixel( static_cast<float>(maFont.GetFontHeight()) );
+ float fExactHeight = ImplLogicHeightToDeviceFontHeight(maFont.GetFontHeight());
Size aSize = ImplLogicToDevicePixel( maFont.GetFontSize() );
if ( !aSize.Height() )
{
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index bb4683f37a19..b6269916ad33 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -337,14 +337,6 @@ tools::Long OutputDevice::ImplLogicHeightToDevicePixel( tools::Long nHeight ) co
return ImplLogicToPixel(nHeight, mnDPIY, maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY);
}
-float OutputDevice::ImplFloatLogicHeightToDevicePixel( float fLogicHeight) const
-{
- if( !mbMap)
- return fLogicHeight;
- float fPixelHeight = (fLogicHeight * mnDPIY * maMapRes.mnMapScNumY) / maMapRes.mnMapScDenomY;
- return fPixelHeight;
-}
-
tools::Long OutputDevice::ImplDevicePixelToLogicWidth( tools::Long nWidth ) const
{
if ( !mbMap )
@@ -1894,6 +1886,15 @@ double OutputDevice::ImplLogicWidthToDeviceFontWidth(tools::Long nWidth) const
maMapRes.mnMapScNumX, maMapRes.mnMapScDenomX);
}
+double OutputDevice::ImplLogicHeightToDeviceFontHeight(tools::Long nHeight) const
+{
+ if (!mbMap)
+ return nHeight;
+
+ return ImplLogicToPixel(static_cast<double>(nHeight), mnDPIY,
+ maMapRes.mnMapScNumY, maMapRes.mnMapScDenomY);
+}
+
DevicePoint OutputDevice::ImplLogicToDeviceFontCoordinate(const Point& rPoint) const
{
if (!mbMap)