basebmp/inc/basebmp/bitmapdevice.hxx | 10 ++++++++-- basebmp/source/bitmapdevice.cxx | 15 ++++++++++++++- vcl/coretext/salcoretextstyle.cxx | 2 ++ vcl/quartz/utils.cxx | 5 ++++- 4 files changed, 28 insertions(+), 4 deletions(-)
New commits: commit f01ce474c26a1931a14691ceb41adb8e09699c6d Author: Tor Lillqvist <[email protected]> Date: Thu Apr 11 19:15:35 2013 +0300 Fix documentation The value returned by getScanlineStride() is always positive even if internally the scanline stride is negative in the bottom-up case. Change-Id: Iaf394639d1e5a27d64b83f75c1d715a9860e492e diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx index 389265e..71c4a63 100644 --- a/basebmp/inc/basebmp/bitmapdevice.hxx +++ b/basebmp/inc/basebmp/bitmapdevice.hxx @@ -105,8 +105,7 @@ public: /** Query byte offset to get from scanline n to scanline n+1 - @return the scanline stride in bytes. In the case of - isTopDown()==false, this offset will be negative. + @return the scanline stride in bytes. */ sal_Int32 getScanlineStride() const; commit 3ddd6cb3889c3cfbff96a1a61a12da61547b935e Author: Tor Lillqvist <[email protected]> Date: Thu Apr 11 19:10:22 2013 +0300 Add an accessor to get the offset of a subsetted BitmapDevice Change-Id: I8a4a588287a90c6953b367bb02e075ea58f13a96 diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx index 98e0325..389265e 100644 --- a/basebmp/inc/basebmp/bitmapdevice.hxx +++ b/basebmp/inc/basebmp/bitmapdevice.hxx @@ -92,6 +92,13 @@ public: */ bool isTopDown() const; + /** Query the offset from the start of the memory buffer + + @ return the offset, which is (0,0) unless this is a subset + device. + */ + basegfx::B2IVector getOffset() const; + /** Query type of scanline memory format */ sal_Int32 getScanlineFormat() const; diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index d49a18d..c090b45 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -1105,6 +1105,11 @@ bool BitmapDevice::isTopDown() const return mpImpl->mnScanlineStride >= 0; } +basegfx::B2IVector BitmapDevice::getOffset() const +{ + return basegfx::B2IVector(mpImpl->maBounds.getMinX(), mpImpl->maBounds.getMinY()); +} + sal_Int32 BitmapDevice::getScanlineFormat() const { return mpImpl->mnScanlineFormat; commit 2729a77b49a9f5d2d827df67674c93847d5261ef Author: Tor Lillqvist <[email protected]> Date: Thu Apr 11 19:09:12 2013 +0300 Add debugging printout of subsetting information Change-Id: I6c37885823f14dcfbe750691dad27e094f46e66e diff --git a/basebmp/source/bitmapdevice.cxx b/basebmp/source/bitmapdevice.cxx index a6774d1..d49a18d 100644 --- a/basebmp/source/bitmapdevice.cxx +++ b/basebmp/source/bitmapdevice.cxx @@ -2034,13 +2034,20 @@ BitmapDeviceSharedPtr createBitmapDeviceImpl( const basegfx::B2IVector& { BitmapDeviceSharedPtr result( createBitmapDeviceImplInner( rSize, bTopDown, nScanlineFormat, pMem, pPal, pSubset, rDamage ) ); +#ifdef SAL_LOG_INFO + std::ostringstream subset; + + if (pSubset) + subset << " subset: " << pSubset->getWidth() << "x" << pSubset->getHeight() << "@(" << pSubset->getMinX() << "," << pSubset->getMinY() << ")"; + SAL_INFO( "basebmp.bitmapdevice", "createBitmapDevice: " << rSize.getX() << "x" << rSize.getY() << (bTopDown ? " top-down " : " bottom-up ") << Format::formatName(nScanlineFormat) + << subset.str() << " = " << result.get() ); - +#endif return result; } } // namespace @@ -2091,6 +2098,7 @@ BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto, const basegfx::B2IBox& rSubset ) { + SAL_INFO( "basebmp.bitmapdevice", "subsetBitmapDevice: proto=" << rProto.get() ); return createBitmapDeviceImpl( rProto->getSize(), rProto->isTopDown(), rProto->getScanlineFormat(), commit 48d3902b96581831b06565841d1dd54099428271 Author: Tor Lillqvist <[email protected]> Date: Thu Apr 11 00:11:18 2013 +0300 Log the stretch factor if different from one Change-Id: I37472b779f0e455892f4fe2cfe93023c14335400 diff --git a/vcl/coretext/salcoretextstyle.cxx b/vcl/coretext/salcoretextstyle.cxx index a429738..ca9f278 100644 --- a/vcl/coretext/salcoretextstyle.cxx +++ b/vcl/coretext/salcoretextstyle.cxx @@ -119,6 +119,8 @@ std::ostream &operator <<(std::ostream& s, CoreTextStyleInfo &rStyle) #else s << "{Font=" << rStyle.GetFont(); s << ",Color=" << rStyle.GetColor(); + if (rStyle.GetFontStretchFactor() != 1) + s << ",Stretch=" << rStyle.GetFontStretchFactor(); s << "}"; #endif return s; commit 3d2624a30117e31d264def62b74d71e1a2189b0c Author: Tor Lillqvist <[email protected]> Date: Thu Apr 11 00:10:51 2013 +0300 Log a null CGRect as "NULL" Change-Id: I94ef782a3d4cd86afe4c1e96426df771401a65d3 diff --git a/vcl/quartz/utils.cxx b/vcl/quartz/utils.cxx index e0c49e8..b2356fd 100644 --- a/vcl/quartz/utils.cxx +++ b/vcl/quartz/utils.cxx @@ -72,7 +72,10 @@ std::ostream &operator <<(std::ostream& s, CGRect &rRect) #ifndef SAL_LOG_INFO (void) rRect; #else - s << rRect.size << "@" << rRect.origin; + if (CGRectIsNull(rRect)) + s << "NULL"; + else + s << rRect.size << "@" << rRect.origin; #endif return s; } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
