Commit b7891474 authored by Halla Rempt's avatar Halla Rempt
Browse files

Make style consistent

svn path=/trunk/koffice/; revision=853122
parent a3b2e7da
......@@ -26,11 +26,11 @@
#include "kis_hsv_adjustment.h"
typedef KGenericFactory<ExtensionsPlugin> ExtensionsPluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_colorspaces_extensions, ExtensionsPluginFactory( "krita" ) )
K_EXPORT_COMPONENT_FACTORY(krita_colorspaces_extensions, ExtensionsPluginFactory("krita"))
ExtensionsPlugin::ExtensionsPlugin(QObject *parent, const QStringList &)
{
Q_UNUSED( parent );
Q_UNUSED(parent);
KoColorTransformationFactoryRegistry::addColorTransformationFactory(new KisHSVAdjustmentFactory);
}
......
......@@ -22,12 +22,13 @@
#include <QObject>
class ExtensionsPlugin : public QObject {
class ExtensionsPlugin : public QObject
{
Q_OBJECT
public:
ExtensionsPlugin(QObject *parent, const QStringList &);
virtual ~ExtensionsPlugin();
public:
ExtensionsPlugin(QObject *parent, const QStringList &);
virtual ~ExtensionsPlugin();
};
#endif
......@@ -37,12 +37,12 @@
#define SCALE_FROM_FLOAT( v ) KoColorSpaceMaths< float, _channel_type_>::scaleToA( v )
template<typename _channel_type_>
void clamp( float* r, float* g, float* b);
void clamp(float* r, float* g, float* b);
#define FLOAT_CLAMP( v ) * v = (*v < 0.0) ? 0.0 : ( (*v>1.0) ? 1.0 : *v )
template<>
void clamp<quint8>( float* r, float* g, float* b)
void clamp<quint8>(float* r, float* g, float* b)
{
FLOAT_CLAMP(r);
FLOAT_CLAMP(g);
......@@ -50,7 +50,7 @@ void clamp<quint8>( float* r, float* g, float* b)
}
template<>
void clamp<quint16>( float* r, float* g, float* b)
void clamp<quint16>(float* r, float* g, float* b)
{
FLOAT_CLAMP(r);
FLOAT_CLAMP(g);
......@@ -59,7 +59,7 @@ void clamp<quint16>( float* r, float* g, float* b)
#ifdef HAVE_OPENEXR
template<>
void clamp<half>( float* r, float* g, float* b)
void clamp<half>(float* r, float* g, float* b)
{
Q_UNUSED(r);
Q_UNUSED(g);
......@@ -68,7 +68,7 @@ void clamp<half>( float* r, float* g, float* b)
#endif
template<>
void clamp<float>( float* r, float* g, float* b)
void clamp<float>(float* r, float* g, float* b)
{
Q_UNUSED(r);
Q_UNUSED(g);
......@@ -76,65 +76,59 @@ void clamp<float>( float* r, float* g, float* b)
}
template<typename _channel_type_>
class KisHSVAdjustment : public KoColorTransformation {
class KisHSVAdjustment : public KoColorTransformation
{
typedef KoRgbTraits<_channel_type_> RGBTrait;
typedef typename RGBTrait::Pixel RGBPixel;
public:
KisHSVAdjustment()
{
}
public:
KisHSVAdjustment() {
}
public:
void transform(const quint8 *srcU8, quint8 *dstU8, qint32 nPixels) const
{
const RGBPixel* src = reinterpret_cast<const RGBPixel*>(srcU8);
RGBPixel* dst = reinterpret_cast<RGBPixel*>(dstU8);
float h,s,v,r,g,b;
while( nPixels > 0)
{
RGBToHSV( SCALE_TO_FLOAT( src->red), SCALE_TO_FLOAT(src->green), SCALE_TO_FLOAT(src->blue), &h, &s,&v );
h += m_adj_h;
if(h > 360) h -= 360;
if(h < 0 ) h += 360;
s += m_adj_s;
v += m_adj_v;
HSVToRGB( h, s, v, &r, &g, &b);
clamp< _channel_type_ >( &r, &g, &b);
dst->red = SCALE_FROM_FLOAT( r );
dst->green = SCALE_FROM_FLOAT( g );
dst->blue = SCALE_FROM_FLOAT( b );
dst->alpha = src->alpha;
--nPixels;
++src;
++dst;
}
public:
void transform(const quint8 *srcU8, quint8 *dstU8, qint32 nPixels) const {
const RGBPixel* src = reinterpret_cast<const RGBPixel*>(srcU8);
RGBPixel* dst = reinterpret_cast<RGBPixel*>(dstU8);
float h, s, v, r, g, b;
while (nPixels > 0) {
RGBToHSV(SCALE_TO_FLOAT(src->red), SCALE_TO_FLOAT(src->green), SCALE_TO_FLOAT(src->blue), &h, &s, &v);
h += m_adj_h;
if (h > 360) h -= 360;
if (h < 0) h += 360;
s += m_adj_s;
v += m_adj_v;
HSVToRGB(h, s, v, &r, &g, &b);
clamp< _channel_type_ >(&r, &g, &b);
dst->red = SCALE_FROM_FLOAT(r);
dst->green = SCALE_FROM_FLOAT(g);
dst->blue = SCALE_FROM_FLOAT(b);
dst->alpha = src->alpha;
--nPixels;
++src;
++dst;
}
}
virtual void setParameters(const QHash<QString, QVariant> & parameters)
{
virtual void setParameters(const QHash<QString, QVariant> & parameters) {
if(parameters.contains("h"))
{
if (parameters.contains("h")) {
m_adj_h = parameters["h"].toDouble();
}
if(parameters.contains("s"))
{
if (parameters.contains("s")) {
m_adj_s = parameters["s"].toDouble();
}
if(parameters.contains("v"))
{
if (parameters.contains("v")) {
m_adj_v = parameters["v"].toDouble();
}
}
private:
double m_adj_h, m_adj_s, m_adj_v;
private:
double m_adj_h, m_adj_s, m_adj_v;
};
KisHSVAdjustmentFactory::KisHSVAdjustmentFactory() : KoColorTransformationFactory("hsv_adjustment", i18n("HSV Adjustment") )
KisHSVAdjustmentFactory::KisHSVAdjustmentFactory() : KoColorTransformationFactory("hsv_adjustment", i18n("HSV Adjustment"))
{
}
......@@ -142,37 +136,31 @@ KisHSVAdjustmentFactory::KisHSVAdjustmentFactory() : KoColorTransformationFactor
QList< QPair< KoID, KoID > > KisHSVAdjustmentFactory::supportedModels() const
{
QList< QPair< KoID, KoID > > l;
l.append( QPair< KoID, KoID >( RGBAColorModelID , Integer8BitsColorDepthID ) );
l.append( QPair< KoID, KoID >( RGBAColorModelID , Integer16BitsColorDepthID ) );
l.append( QPair< KoID, KoID >( RGBAColorModelID , Float16BitsColorDepthID ) );
l.append( QPair< KoID, KoID >( RGBAColorModelID , Float32BitsColorDepthID ) );
l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer8BitsColorDepthID));
l.append(QPair< KoID, KoID >(RGBAColorModelID , Integer16BitsColorDepthID));
l.append(QPair< KoID, KoID >(RGBAColorModelID , Float16BitsColorDepthID));
l.append(QPair< KoID, KoID >(RGBAColorModelID , Float32BitsColorDepthID));
return l;
}
KoColorTransformation* KisHSVAdjustmentFactory::createTransformation(const KoColorSpace* colorSpace, QHash<QString, QVariant> parameters) const
{
KoColorTransformation * adj;
if ( colorSpace->colorModelId() != RGBAColorModelID)
{
if (colorSpace->colorModelId() != RGBAColorModelID) {
kError() << "Unsupported color space " << colorSpace->id() << " in KisHSVAdjustmentFactory::createTransformation";
return 0;
}
if ( colorSpace->colorDepthId() == Integer8BitsColorDepthID )
{
if (colorSpace->colorDepthId() == Integer8BitsColorDepthID) {
adj = new KisHSVAdjustment< quint8 >();
}
else if( colorSpace->colorDepthId() == Integer16BitsColorDepthID )
{
} else if (colorSpace->colorDepthId() == Integer16BitsColorDepthID) {
adj = new KisHSVAdjustment< quint16 >();
}
#ifdef HAVE_OPENEXR
else if( colorSpace->colorDepthId() == Float16BitsColorDepthID )
{
else if (colorSpace->colorDepthId() == Float16BitsColorDepthID) {
adj = new KisHSVAdjustment< half >();
}
#endif
else if( colorSpace->colorDepthId() == Float32BitsColorDepthID )
{
else if (colorSpace->colorDepthId() == Float32BitsColorDepthID) {
adj = new KisHSVAdjustment< float >();
} else {
kError() << "Unsupported color space " << colorSpace->id() << " in KisHSVAdjustmentFactory::createTransformation";
......
......@@ -17,12 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
#ifndef _KIS_HSV_ADJUSTEMENT_H_
#define _KIS_HSV_ADJUSTEMENT_H_
#ifndef _KIS_HSV_ADJUSTMENT_H_
#define _KIS_HSV_ADJUSTMENT_H_
#include "KoColorTransformationFactory.h"
class KisHSVAdjustmentFactory : public KoColorTransformationFactory {
class KisHSVAdjustmentFactory : public KoColorTransformationFactory
{
public:
KisHSVAdjustmentFactory();
......
......@@ -29,23 +29,23 @@
#include "kis_gray_u16_colorspace.h"
typedef KGenericFactory<GRAYU16Plugin> GRAYU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( krita_gray_u16_plugin, GRAYU16PluginFactory( "krita" ) )
K_EXPORT_COMPONENT_FACTORY(krita_gray_u16_plugin, GRAYU16PluginFactory("krita"))
GRAYU16Plugin::GRAYU16Plugin(QObject *parent, const QStringList &)
: QObject(parent)
: QObject(parent)
{
KoColorSpaceRegistry * f = KoColorSpaceRegistry::instance();
KoColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory();
f->add(csf);
KoColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace( KoColorSpaceRegistry::instance()->profileByName(csf->defaultProfile())->clone() );
KoColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(KoColorSpaceRegistry::instance()->profileByName(csf->defaultProfile())->clone());
Q_CHECK_PTR(colorSpaceGRAYU16);
KoHistogramProducerFactoryRegistry::instance()->add(
new KoBasicHistogramProducerFactory<KoBasicU16HistogramProducer>
(KoID("GRAYA16HISTO", i18n("GRAY/Alpha16 Histogram")), colorSpaceGRAYU16) );
new KoBasicHistogramProducerFactory<KoBasicU16HistogramProducer>
(KoID("GRAYA16HISTO", i18n("GRAY/Alpha16 Histogram")), colorSpaceGRAYU16));
}
......
......@@ -30,14 +30,14 @@
KisGrayU16ColorSpace ::KisGrayU16ColorSpace(KoColorProfile *p) :
KoLcmsColorSpace<GrayU16Traits>("GRAYU16", i18n("Grayscale (16-bit integer/channel)"), TYPE_GRAY_16, icSigGrayData, p)
KoLcmsColorSpace<GrayU16Traits>("GRAYU16", i18n("Grayscale (16-bit integer/channel)"), TYPE_GRAY_16, icSigGrayData, p)
{
addChannel(new KoChannelInfo(i18n("Gray"), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT16));
init();
addCompositeOp( new KoCompositeOpOver<GrayU16Traits>( this ) );
addCompositeOp( new KoCompositeOpErase<GrayU16Traits>( this ) );
addCompositeOp(new KoCompositeOpOver<GrayU16Traits>(this));
addCompositeOp(new KoCompositeOpErase<GrayU16Traits>(this));
}
KoColorSpace* KisGrayU16ColorSpace::clone() const
......@@ -46,18 +46,18 @@ KoColorSpace* KisGrayU16ColorSpace::clone() const
}
void KisGrayU16ColorSpace::colorToXML( const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const
void KisGrayU16ColorSpace::colorToXML(const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const
{
const GrayU16Traits::channels_type* p = reinterpret_cast<const GrayU16Traits::channels_type*>( pixel );
QDomElement labElt = doc.createElement( "Gray" );
labElt.setAttribute("g", KoColorSpaceMaths< GrayU16Traits::channels_type, qreal>::scaleToA( p[0]) );
labElt.setAttribute("space", profile()->name() );
colorElt.appendChild( labElt );
const GrayU16Traits::channels_type* p = reinterpret_cast<const GrayU16Traits::channels_type*>(pixel);
QDomElement labElt = doc.createElement("Gray");
labElt.setAttribute("g", KoColorSpaceMaths< GrayU16Traits::channels_type, qreal>::scaleToA(p[0]));
labElt.setAttribute("space", profile()->name());
colorElt.appendChild(labElt);
}
void KisGrayU16ColorSpace::colorFromXML( quint8* pixel, const QDomElement& elt) const
void KisGrayU16ColorSpace::colorFromXML(quint8* pixel, const QDomElement& elt) const
{
GrayU16Traits::channels_type* p = reinterpret_cast<GrayU16Traits::channels_type*>( pixel );
GrayU16Traits::channels_type* p = reinterpret_cast<GrayU16Traits::channels_type*>(pixel);
p[0] = KoColorSpaceMaths< qreal, GrayU16Traits::channels_type >::scaleToA(elt.attribute("g").toDouble());
}
......@@ -15,8 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef KIS_STRATEGY_COLORSPACE_GRAYSCALE_U16_H_
#define KIS_STRATEGY_COLORSPACE_GRAYSCALE_U16_H_
#ifndef KIS_GRAY_U16_COLORSPACE_H_
#define KIS_GRAY_U16_COLORSPACE_H_
#include <QColor>
#include <klocale.h>
......@@ -25,35 +25,56 @@
#include <KoColorSpaceTraits.h>
#include <KoColorModelStandardIds.h>
typedef KoColorSpaceTrait<quint16, 1, -1> GrayU16Traits;
typedef KoColorSpaceTrait < quint16, 1, -1 > GrayU16Traits;
class KRITA_GRAY_U16_EXPORT KisGrayU16ColorSpace : public KoLcmsColorSpace<GrayU16Traits>
{
public:
KisGrayU16ColorSpace( KoColorProfile *p);
virtual bool willDegrade(ColorSpaceIndependence ) const { return false; }
virtual KoID colorModelId() const { return GrayColorModelID; }
virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; }
virtual KoColorSpace* clone() const;
virtual void colorToXML( const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const;
virtual void colorFromXML( quint8* pixel, const QDomElement& elt) const;
public:
KisGrayU16ColorSpace(KoColorProfile *p);
virtual bool willDegrade(ColorSpaceIndependence) const {
return false;
}
virtual KoID colorModelId() const {
return GrayColorModelID;
}
virtual KoID colorDepthId() const {
return Integer16BitsColorDepthID;
}
virtual KoColorSpace* clone() const;
virtual void colorToXML(const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const;
virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const;
};
class KisGrayU16ColorSpaceFactory : public KoLcmsColorSpaceFactory
{
public:
KisGrayU16ColorSpaceFactory() : KoLcmsColorSpaceFactory(TYPE_GRAY_16, icSigGrayData)
{}
virtual QString id() const { return "GRAY16"; }
virtual QString name() const { return i18n("Grayscale (16-bit integer/channel)"); }
virtual bool userVisible() const { return false; }
virtual KoID colorModelId() const { return GrayColorModelID; }
virtual KoID colorDepthId() const { return Integer16BitsColorDepthID; }
virtual int referenceDepth() const { return 16; }
KisGrayU16ColorSpaceFactory() : KoLcmsColorSpaceFactory(TYPE_GRAY_16, icSigGrayData) {}
virtual QString id() const {
return "GRAY16";
}
virtual QString name() const {
return i18n("Grayscale (16-bit integer/channel)");
}
virtual bool userVisible() const {
return false;
}
virtual KoID colorModelId() const {
return GrayColorModelID;
}
virtual KoID colorDepthId() const {
return Integer16BitsColorDepthID;
}
virtual int referenceDepth() const {
return 16;
}
virtual KoColorSpace *createColorSpace( const KoColorProfile *p) const { return new KisGrayU16ColorSpace( p->clone() ); }
virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const {
return new KisGrayU16ColorSpace(p->clone());
}
virtual QString defaultProfile() const { return "gray built-in - (lcms internal)"; }
virtual QString defaultProfile() const {
return "gray built-in - (lcms internal)";
}
};
#endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
......@@ -28,10 +28,10 @@
#ifndef KRITA_GRAY_U16_EXPORT
# if defined(MAKE_KRITA_GRAY_U16_PLUGIN_LIB)
/* We are building this library */
/* We are building this library */
# define KRITA_GRAY_U16_EXPORT KDE_EXPORT
# else
/* We are using this library */
/* We are using this library */
# define KRITA_GRAY_U16_EXPORT KDE_IMPORT
# endif
#endif
......
......@@ -36,11 +36,11 @@
#include "kis_gray_colorspace.h"
typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( kritagrayplugin, GrayPluginFactory( "krita" ) )
K_EXPORT_COMPONENT_FACTORY(kritagrayplugin, GrayPluginFactory("krita"))
GrayPlugin::GrayPlugin(QObject *parent, const QStringList &)
: QObject(parent)
: QObject(parent)
{
KoColorSpaceRegistry * f = KoColorSpaceRegistry::instance();
......@@ -48,10 +48,10 @@ GrayPlugin::GrayPlugin(QObject *parent, const QStringList &)
f->add(csFactory);
KoColorSpace * colorSpaceGrayA =
new KisGrayColorSpace( KoColorSpaceRegistry::instance()->profileByName(csFactory->defaultProfile())->clone());
new KisGrayColorSpace(KoColorSpaceRegistry::instance()->profileByName(csFactory->defaultProfile())->clone());
KoHistogramProducerFactoryRegistry::instance()->add(
new KoBasicHistogramProducerFactory<KoBasicU8HistogramProducer>
(KoID("GRAYA8HISTO", i18n("GRAY/Alpha8 Histogram")), colorSpaceGrayA) );
(KoID("GRAYA8HISTO", i18n("GRAY/Alpha8 Histogram")), colorSpaceGrayA));
}
GrayPlugin::~GrayPlugin()
......
......@@ -30,15 +30,15 @@
#include "compositeops/KoCompositeOpOver.h"
#include "compositeops/KoCompositeOpErase.h"
KisGrayColorSpace ::KisGrayColorSpace( KoColorProfile *p) :
KoLcmsColorSpace<GrayU8Traits>("GRAYU8", i18n("Grayscale without alpha (8-bit integer/channel)"), TYPE_GRAY_8, icSigGrayData, p)
KisGrayColorSpace ::KisGrayColorSpace(KoColorProfile *p) :
KoLcmsColorSpace<GrayU8Traits>("GRAYU8", i18n("Grayscale without alpha (8-bit integer/channel)"), TYPE_GRAY_8, icSigGrayData, p)
{
addChannel(new KoChannelInfo(i18n("Gray"), 0, KoChannelInfo::COLOR, KoChannelInfo::UINT8));
init();
addCompositeOp( new KoCompositeOpOver<GrayU8Traits>( this ) );
addCompositeOp( new KoCompositeOpErase<GrayU8Traits>( this ) );
addCompositeOp(new KoCompositeOpOver<GrayU8Traits>(this));
addCompositeOp(new KoCompositeOpErase<GrayU8Traits>(this));
}
KoColorSpace* KisGrayColorSpace::clone() const
......@@ -47,18 +47,18 @@ KoColorSpace* KisGrayColorSpace::clone() const
}
void KisGrayColorSpace::colorToXML( const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const
void KisGrayColorSpace::colorToXML(const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const
{
const GrayU8Traits::channels_type* p = reinterpret_cast<const GrayU8Traits::channels_type*>( pixel );
QDomElement labElt = doc.createElement( "Gray" );
labElt.setAttribute("g", KoColorSpaceMaths< GrayU8Traits::channels_type, qreal>::scaleToA( p[0]) );
labElt.setAttribute("space", profile()->name() );
colorElt.appendChild( labElt );
const GrayU8Traits::channels_type* p = reinterpret_cast<const GrayU8Traits::channels_type*>(pixel);
QDomElement labElt = doc.createElement("Gray");
labElt.setAttribute("g", KoColorSpaceMaths< GrayU8Traits::channels_type, qreal>::scaleToA(p[0]));
labElt.setAttribute("space", profile()->name());
colorElt.appendChild(labElt);
}
void KisGrayColorSpace::colorFromXML( quint8* pixel, const QDomElement& elt) const
void KisGrayColorSpace::colorFromXML(quint8* pixel, const QDomElement& elt) const
{
GrayU8Traits::channels_type* p = reinterpret_cast<GrayU8Traits::channels_type*>( pixel );
GrayU8Traits::channels_type* p = reinterpret_cast<GrayU8Traits::channels_type*>(pixel);
p[0] = KoColorSpaceMaths< qreal, GrayU8Traits::channels_type >::scaleToA(elt.attribute("g").toDouble());
}
......@@ -25,38 +25,56 @@
#include <KoColorSpaceTraits.h>
#include <KoColorModelStandardIds.h>
typedef KoColorSpaceTrait<quint8, 1, -1> GrayU8Traits;
typedef KoColorSpaceTrait < quint8, 1, -1 > GrayU8Traits;
class KRITA_GRAY_U8_EXPORT KisGrayColorSpace : public KoLcmsColorSpace<GrayU8Traits>
{
public:
KisGrayColorSpace( KoColorProfile *p);
virtual bool willDegrade(ColorSpaceIndependence ) const { return false; }
virtual KoID colorModelId() const { return GrayColorModelID; }
virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; }
virtual KoColorSpace* clone() const;
virtual void colorToXML( const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const;
virtual void colorFromXML( quint8* pixel, const QDomElement& elt) const;
public:
KisGrayColorSpace(KoColorProfile *p);
virtual bool willDegrade(ColorSpaceIndependence) const {
return false;
}
virtual KoID colorModelId() const {
return GrayColorModelID;
}
virtual KoID colorDepthId() const {
return Integer8BitsColorDepthID;
}
virtual KoColorSpace* clone() const;
virtual void colorToXML(const quint8* pixel, QDomDocument& doc, QDomElement& colorElt) const;
virtual void colorFromXML(quint8* pixel, const QDomElement& elt) const;
};
class KisGrayColorSpaceFactory : public KoLcmsColorSpaceFactory
{
public:
KisGrayColorSpaceFactory() : KoLcmsColorSpaceFactory(TYPE_GRAY_8, icSigGrayData)
{}
virtual QString id() const { return "GRAY"; }
virtual QString name() const { return i18n("Grayscale (8-bit integer/channel)"); }
virtual KoID colorModelId() const { return GrayColorModelID; }
virtual KoID colorDepthId() const { return Integer8BitsColorDepthID; }
virtual int referenceDepth() const { return 8; }
virtual bool userVisible() const { return false; }
KisGrayColorSpaceFactory() : KoLcmsColorSpaceFactory(TYPE_GRAY_8, icSigGrayData) {}
virtual QString id() const {
return "GRAY";
}
virtual QString name() const {
return i18n("Grayscale (8-bit integer/channel)");
}
virtual KoID colorModelId() const {
return GrayColorModelID;
}
virtual KoID colorDepthId() const {
return Integer8BitsColorDepthID;
}
virtual int referenceDepth() const {
return 8;
}
virtual bool userVisible() const {
return false;
}
virtual KoColorSpace *createColorSpace( const KoColorProfile *p) const
{
return new KisGrayColorSpace( p->clone() );
virtual KoColorSpace *createColorSpace(const KoColorProfile *p) const {
return new KisGrayColorSpace(p->clone());
}
virtual QString defaultProfile() const { return "gray built-in - (lcms internal)"; }
virtual QString defaultProfile() const {
return "gray built-in - (lcms internal)";
}
};
#endif // KIS_STRATEGY_COLORSPACE_GRAYSCALE_H_
......@@ -28,10 +28,10 @@
#ifndef KRITA_GRAY_U8_EXPORT
# if defined(MAKE_KRITAGRAYSCALE_LIB)
/* We are building this library */
/* We are building this library */
# define KRITA_GRAY_U8_EXPORT KDE_EXPORT