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

List:       kde-commits
Subject:    [calligra] krita/plugins/colorspaces/extensions: Using the traits according to the Colorspace
From:       Sahil Nagpal <nagpal.sahil01 () gmail ! com>
Date:       2013-09-30 16:14:10
Message-ID: E1VQg6s-0007Wy-9p () scm ! kde ! org
[Download RAW message or body]

Git commit eb8a808d212f940eb16d938a31b2c74dc2f17d64 by Sahil Nagpal.
Committed on 30/09/2013 at 16:12.
Pushed by sahilnagpal into branch 'master'.

Using the traits according to the Colorspace

M  +6    -6    krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cpp

http://commits.kde.org/calligra/eb8a808d212f940eb16d938a31b2c74dc2f17d64

diff --git a/krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cpp \
b/krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cpp index \
                d79de72..35cd9a5 100644
--- a/krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cpp
+++ b/krita/plugins/colorspaces/extensions/kis_hsv_adjustment.cpp
@@ -76,10 +76,10 @@ void clamp<float>(float* r, float* g, float* b)
 }
 
 
-template<typename _channel_type_>
+template<typename _channel_type_,typename traits>
 class KisHSVAdjustment : public KoColorTransformation
 {
-    typedef KoBgrTraits<_channel_type_> RGBTrait;
+    typedef traits RGBTrait;
     typedef typename RGBTrait::Pixel RGBPixel;
 
 public:
@@ -250,17 +250,17 @@ KoColorTransformation* \
KisHSVAdjustmentFactory::createTransformation(const KoCol  return 0;
     }
     if (colorSpace->colorDepthId() == Integer8BitsColorDepthID) {
-        adj = new KisHSVAdjustment< quint8 >();
+        adj = new KisHSVAdjustment< quint8, KoBgrTraits < quint8 > >();
     } else if (colorSpace->colorDepthId() == Integer16BitsColorDepthID) {
-        adj = new KisHSVAdjustment< quint16 >();
+        adj = new KisHSVAdjustment< quint16, KoBgrTraits < quint16 > >();
     }
 #ifdef HAVE_OPENEXR
     else if (colorSpace->colorDepthId() == Float16BitsColorDepthID) {
-        adj = new KisHSVAdjustment< half >();
+        adj = new KisHSVAdjustment< half, KoRgbTraits < half > >();
     }
 #endif
     else if (colorSpace->colorDepthId() == Float32BitsColorDepthID) {
-        adj = new KisHSVAdjustment< float >();
+        adj = new KisHSVAdjustment< float, KoRgbTraits < float > >();
     } else {
         kError() << "Unsupported color space " << colorSpace->id() << " in \
KisHSVAdjustmentFactory::createTransformation";  return 0;


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

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