Commit 1c6fb39b authored by Halla Rempt's avatar Halla Rempt
Browse files

Initialize KoColor to black, as per apidox

Lab(0) is blue, not black.
parent 675b2c98
...@@ -50,9 +50,9 @@ public: ...@@ -50,9 +50,9 @@ public:
KoColor::KoColor() KoColor::KoColor()
: d(new Private()) : d(new Private())
{ {
d->colorSpace = KoColorSpaceRegistry::instance()->lab16(0); d->colorSpace = KoColorSpaceRegistry::instance()->rgb16(0);
d->data = new quint8[d->colorSpace->pixelSize()]; d->data = new quint8[d->colorSpace->pixelSize()];
memset(d->data, 0, d->colorSpace->pixelSize()); d->colorSpace->fromQColor(Qt::black, d->data);
d->colorSpace->setOpacity(d->data, OPACITY_OPAQUE_U8, 1); d->colorSpace->setOpacity(d->data, OPACITY_OPAQUE_U8, 1);
} }
...@@ -62,10 +62,9 @@ KoColor::KoColor(const KoColorSpace * colorSpace) ...@@ -62,10 +62,9 @@ KoColor::KoColor(const KoColorSpace * colorSpace)
Q_ASSERT(colorSpace); Q_ASSERT(colorSpace);
d->colorSpace = KoColorSpaceRegistry::instance()->permanentColorspace(colorSpace); d->colorSpace = KoColorSpaceRegistry::instance()->permanentColorspace(colorSpace);
d->data = new quint8[d->colorSpace->pixelSize()]; d->data = new quint8[d->colorSpace->pixelSize()];
memset(d->data, 0, d->colorSpace->pixelSize()); d->colorSpace->fromQColor(Qt::black, d->data);
} }
KoColor::~KoColor() KoColor::~KoColor()
{ {
delete d; delete d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment