[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    koffice/plugins/pictureshape
From:       Carlos Licea <carlos_licea () hotmail ! com>
Date:       2010-05-05 22:13:24
Message-ID: 20100505221324.00C3DAC8B0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1123359 by clicea:

Add the Watermark effect, is not perfect: the dark colors tend to get too bright
instead of washed out, but is a good start.

 M  +1 -0      CMakeLists.txt  
 M  +6 -3      PictureShape.cpp  
 A             WatermarkFilterEffect.cpp   [License: GPL (v3+)]
 A             WatermarkFilterEffect.h   [License: GPL (v3+)]


--- trunk/koffice/plugins/pictureshape/CMakeLists.txt #1123358:1123359
@@ -12,6 +12,7 @@
     ChangeImageCommand.cpp
     GreyscaleFilterEffect.cpp
     MonoFilterEffect.cpp
+    WatermarkFilterEffect.cpp
 )
 
 kde4_add_plugin(pictureshape ${pictureshape_LIB_SRCS})
--- trunk/koffice/plugins/pictureshape/PictureShape.cpp #1123358:1123359
@@ -39,6 +39,7 @@
 #include <KoFilterEffectStack.h>
 #include "GreyscaleFilterEffect.h"
 #include "MonoFilterEffect.h"
+#include "WatermarkFilterEffect.h"
 
 QString generate_key(qint64 key, const QSize & size)
 {
@@ -245,7 +246,7 @@
     KoStyleStack &styleStack = context.odfLoadingContext().styleStack();
     styleStack.save();
     context.odfLoadingContext().fillStyleStack(element, KoXmlNS::draw, "style-name", "graphic");
-//     styleStack.setTypeProperties("graphic");
+    styleStack.setTypeProperties("graphic");
 
     //FIXME: are there other applicable properties?
     if( styleStack.hasProperty(KoXmlNS::draw, "color-mode") ) {
@@ -256,9 +257,10 @@
         else if( colorMode == "mono" ) {
             setMode(Mono);
         }
-//         else if( colorMode == "watermark" )
-//             ;
+        else if( colorMode == "watermark" ) {
+            setMode(Watermark);
     }
+    }
 
     styleStack.restore();
     return true;
@@ -283,6 +285,7 @@
                 filterMode = new MonoFilterEffect();
                 break;
             default:
+                filterMode = new WatermarkFilterEffect();
                 break;
         }
         if( filterMode )
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic