[Libreoffice-commits] .: 3 commits - cppcanvas/source vcl/source vcl/unx
Thorsten Behrens
thorsten at kemper.freedesktop.org
Mon Nov 21 07:37:49 PST 2011
cppcanvas/source/mtfrenderer/transparencygroupaction.cxx | 15 +++++++++++++++
vcl/source/gdi/gradient.cxx | 3 +--
vcl/unx/generic/printer/printerinfomanager.cxx | 8 ++++----
3 files changed, 20 insertions(+), 6 deletions(-)
New commits:
commit d4d79be21e16be9e77518cd223865bb2eb4f91ed
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Mon Nov 21 16:33:07 2011 +0100
Fix radial gradient offset
Seems this got broken with the Gradient::GetBoundRect() common code
extraction - actually return what was calculated (fixes part of
n#714787).
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 38d8ba4..ad18106 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -276,7 +276,6 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
}
else
{
-
if( GetStyle() == GRADIENT_SQUARE || GetStyle() == GRADIENT_RECT )
{
const double fAngle = nAngle * F_PI1800;
@@ -332,7 +331,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
aRect.Top() = rCenter.Y() - ( aSize.Height() >> 1 );
aRect.SetSize( aSize );
- rBoundRect = rRect;
+ rBoundRect = aRect;
}
}
commit 7ddc69623db91317edff6aaca44e5edd43804578
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Mon Nov 21 16:34:27 2011 +0100
Make dbglevel=3 compile again in vcl
diff --git a/vcl/unx/generic/printer/printerinfomanager.cxx b/vcl/unx/generic/printer/printerinfomanager.cxx
index 0cd00db..2de6891 100644
--- a/vcl/unx/generic/printer/printerinfomanager.cxx
+++ b/vcl/unx/generic/printer/printerinfomanager.cxx
@@ -1049,23 +1049,23 @@ void PrinterInfoManager::fillFontSubstitutions( PrinterInfo& rInfo ) const
if( nSubstitute != -1 )
{
rInfo.m_aFontSubstitutions[ it->m_nID ] = nSubstitute;
- #if OSL_DEBUG_LEVEL > 2
+#if OSL_DEBUG_LEVEL > 2
FastPrintFontInfo aInfo;
rFontManager.getFontFastInfo( nSubstitute, aInfo );
fprintf( stderr,
"substitute %s %s %d %d\n"
" -> %s %s %d %d\n",
rtl::OUStringToOString( it->m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
- it->m_eItalic == italic::Upright ? "r" : it->m_eItalic == italic::Oblique ? "o" : it->m_eItalic == italic::Italic ? "i" : "u",
+ it->m_eItalic == ITALIC_NONE ? "r" : it->m_eItalic == ITALIC_OBLIQUE ? "o" : it->m_eItalic == ITALIC_NORMAL ? "i" : "u",
it->m_eWeight,
it->m_eWidth,
rtl::OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
- aInfo.m_eItalic == italic::Upright ? "r" : aInfo.m_eItalic == italic::Oblique ? "o" : aInfo.m_eItalic == italic::Italic ? "i" : "u",
+ aInfo.m_eItalic == ITALIC_NONE ? "r" : aInfo.m_eItalic == ITALIC_OBLIQUE ? "o" : aInfo.m_eItalic == ITALIC_NORMAL ? "i" : "u",
aInfo.m_eWeight,
aInfo.m_eWidth
);
- #endif
+#endif
}
}
}
commit 828abf1e060d2ba385547b09c0eff61dfa6ea377
Author: Thorsten Behrens <tbehrens at suse.com>
Date: Mon Nov 21 16:34:50 2011 +0100
Revive gradient clipping debug visualization code.
diff --git a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
index 93f83e7..cc7aa1a 100644
--- a/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
+++ b/cppcanvas/source/mtfrenderer/transparencygroupaction.cxx
@@ -465,6 +465,21 @@ namespace cppcanvas
rendering::RenderState aLocalState( maState );
::canvas::tools::setRenderStateTransform(aLocalState, aTransform);
+#if OSL_DEBUG_LEVEL > 2
+ aLocalState.Clip.clear();
+ aLocalState.DeviceColor =
+ ::vcl::unotools::colorToDoubleSequence(
+ ::Color( 0x80FF0000 ),
+ mpCanvas->getUNOCanvas()->getDevice()->getDeviceColorSpace() );
+
+ if( maState.Clip.is() )
+ mpCanvas->getUNOCanvas()->fillPolyPolygon( maState.Clip,
+ mpCanvas->getViewState(),
+ aLocalState );
+
+ aLocalState.DeviceColor = maState.DeviceColor;
+#endif
+
if( ::rtl::math::approxEqual(mnAlpha, 1.0) )
{
// no further alpha changes necessary -> draw directly
More information about the Libreoffice-commits
mailing list