ooo-build r15576 - in trunk: . patches/dev300



Author: thorstenb
Date: Thu Mar 19 14:48:58 2009
New Revision: 15576
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15576&view=rev

Log:
    * patches/dev300/apply:
    * patches/dev300/canvas-colorspace-fix.diff: fix stupid
    cairocanvas colorspace miscalculation (fixes wrong colors during
    OGL transition)



Added:
   trunk/patches/dev300/canvas-colorspace-fix.diff
Modified:
   trunk/ChangeLog
   trunk/patches/dev300/apply

Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply	(original)
+++ trunk/patches/dev300/apply	Thu Mar 19 14:48:58 2009
@@ -2834,6 +2834,7 @@
 
 slideshow-colorspace-fix.diff, thorsten
 slideshow-cutblack.diff, thorsten
+canvas-colorspace-fix.diff, thorsten
 
 unoxml-boost-workaround.diff, thorsten
 

Added: trunk/patches/dev300/canvas-colorspace-fix.diff
==============================================================================
--- (empty file)
+++ trunk/patches/dev300/canvas-colorspace-fix.diff	Thu Mar 19 14:48:58 2009
@@ -0,0 +1,42 @@
+diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
+index 3b3571a..15245f4 100644
+--- canvas/source/cairo/cairo_canvashelper.cxx
++++ canvas/source/cairo/cairo_canvashelper.cxx
+@@ -1640,12 +1640,12 @@ namespace cairocanvas
+                 rendering::RGBColor* pOut( aRes.getArray() );
+                 for( sal_Size i=0; i<nLen; i+=4 )
+                 {
+-                    const sal_Int8 nAlpha(pIn[3]);
+-                    if( nAlpha )
++                    const double fAlpha((sal_uInt8)pIn[3]);
++                    if( fAlpha )
+                         *pOut++ = rendering::RGBColor(
+-                            vcl::unotools::toDoubleColor(pIn[2]/nAlpha),
+-                            vcl::unotools::toDoubleColor(pIn[1]/nAlpha),
+-                            vcl::unotools::toDoubleColor(pIn[0]/nAlpha));
++                            pIn[2]/fAlpha,
++                            pIn[1]/fAlpha,
++                            pIn[0]/fAlpha);
+                     else
+                         *pOut++ = rendering::RGBColor(0,0,0);
+                     pIn += 4;
+@@ -1665,13 +1665,13 @@ namespace cairocanvas
+                 rendering::ARGBColor* pOut( aRes.getArray() );
+                 for( sal_Size i=0; i<nLen; i+=4 )
+                 {
+-                    const sal_Int8 nAlpha(pIn[3]);
+-                    if( nAlpha )
++                    const double fAlpha((sal_uInt8)pIn[3]);
++                    if( fAlpha )
+                         *pOut++ = rendering::ARGBColor(
+-                            vcl::unotools::toDoubleColor(nAlpha),
+-                            vcl::unotools::toDoubleColor(pIn[2]/nAlpha),
+-                            vcl::unotools::toDoubleColor(pIn[1]/nAlpha),
+-                            vcl::unotools::toDoubleColor(pIn[0]/nAlpha));
++                            fAlpha/255.0,
++                            pIn[2]/fAlpha,
++                            pIn[1]/fAlpha,
++                            pIn[0]/fAlpha);
+                     else
+                         *pOut++ = rendering::ARGBColor(0,0,0,0);
+                     pIn += 4;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]