Commit 7829c8f8 authored by Boudewijn Rempt's avatar Boudewijn Rempt

* Fix after-deselect-selection-reappears-if-select-tool-is-used again bug

* Fix apidox errors & add some more documentation (at least, _I_ don't
  get any errors anymore)
* Update the TODO (it's smaller now!)
* Tools now have an empty widget if they don't have a widget -- still need
  to fix the captioning for non-paint tools.
* Add a primitive dcop interface to KisColorSpace. It should now be possible
  to write a dcop client that inverts a paint device but I don't know how to
  do that.

svn path=/trunk/koffice/; revision=476894
parent 6fa259bc
...@@ -45,7 +45,7 @@ messages: rc.cpp ...@@ -45,7 +45,7 @@ messages: rc.cpp
$(XGETTEXT) i18ndata rc.cpp `find . -name \*.cc -o -name \*.h` ui/kis_aboutdata.h -o $(podir)/krita.pot $(XGETTEXT) i18ndata rc.cpp `find . -name \*.cc -o -name \*.h` ui/kis_aboutdata.h -o $(podir)/krita.pot
rm -f i18ndata rm -f i18ndata
DOXYGEN_EXCLUDE = CImg.h DOXYGEN_EXCLUDE = CImg.h colorspaces plugins kritacolor/colorspaces core/tiles
include $(top_srcdir)/admin/Doxyfile.am include $(top_srcdir)/admin/Doxyfile.am
kde_services_DATA = kritapart.desktop kde_services_DATA = kritapart.desktop
......
...@@ -3,7 +3,6 @@ Code organization ...@@ -3,7 +3,6 @@ Code organization
* Separate all interfaces from the implementations and place them in krita/sdk. Use these interfaces for DCOP. * Separate all interfaces from the implementations and place them in krita/sdk. Use these interfaces for DCOP.
Problem: what to do when it is useful for plugins to derive from a base class with some default functionality. Composition Problem: what to do when it is useful for plugins to derive from a base class with some default functionality. Composition
with delegation here? Go through patterns book. with delegation here? Go through patterns book.
* Separate the core Krita image library from the part; place the former in krita/libkrita and the latter in krita/kritapart
Bugs Bugs
* On opening a second image after loading first image but not changing it, * On opening a second image after loading first image but not changing it,
...@@ -30,7 +29,6 @@ Transform tool (CBR) ...@@ -30,7 +29,6 @@ Transform tool (CBR)
Integration Integration
(BSAR, akademy)
* A krita document embedded in KWord has the wrong scaling and transparency * A krita document embedded in KWord has the wrong scaling and transparency
* A krita document embedded in another document prints at the wrong place * A krita document embedded in another document prints at the wrong place
* Embedded KOffice objects don't paint themselves correctly * Embedded KOffice objects don't paint themselves correctly
...@@ -143,15 +141,6 @@ User Interface ...@@ -143,15 +141,6 @@ User Interface
* Add history docker * Add history docker
* Convert the layer & channel box to a qlistbox; enable the channel box. * Convert the layer & channel box to a qlistbox; enable the channel box.
* Use OpenGL if available to composite checkerboard with image so
while scrolling the checks can stay in place, and the partially
transparent image move. This maybe needs Qt 4. OpenGL can also be
used to bumpmap images on a height-field canvas.
we now have a checkered background layer that we composite everything
on, but in future we should composite the image first, and then render
it onto a background image -- or not, if another KOffice app wants it
rendered with transparency. But that'd probably better wait until Qt 4,
where it would be a hardware accelerated snip.
* Doing a copy of a selection, but having the wrong layer selected gives * Doing a copy of a selection, but having the wrong layer selected gives
me an empty selection (all transparent). Pressing paste should say so me an empty selection (all transparent). Pressing paste should say so
(popup) instead of creating a new useless layer. (popup) instead of creating a new useless layer.
......
...@@ -113,7 +113,6 @@ public: ...@@ -113,7 +113,6 @@ public:
private: private:
void visit(KisPainter& gc, KisPaintDeviceImplSP dev, Q_INT32 opacity) void visit(KisPainter& gc, KisPaintDeviceImplSP dev, Q_INT32 opacity)
{ {
// kdDebug() << "\tpainting device " << dev->name() << ", " << dev->colorSpace()->id().name() << "\n";
Q_INT32 w = m_rc.width(); Q_INT32 w = m_rc.width();
Q_INT32 h = m_rc.height(); Q_INT32 h = m_rc.height();
Q_INT32 dx = m_rc.x(); Q_INT32 dx = m_rc.x();
......
...@@ -487,7 +487,7 @@ KisImage::KisImage(const KisImage& rhs) : QObject(), KShared(rhs) ...@@ -487,7 +487,7 @@ KisImage::KisImage(const KisImage& rhs) : QObject(), KShared(rhs)
KisImageIface *KisImage::dcopObject() DCOPObject * KisImage::dcopObject()
{ {
if (!m_dcop) { if (!m_dcop) {
m_dcop = new KisImageIface(this); m_dcop = new KisImageIface(this);
......
...@@ -43,7 +43,6 @@ class KisColorSpace; ...@@ -43,7 +43,6 @@ class KisColorSpace;
class KisNameServer; class KisNameServer;
class KisUndoAdapter; class KisUndoAdapter;
class KisPainter; class KisPainter;
class DCOPObject;
class KCommand; class KCommand;
class KisCompositeOp; class KisCompositeOp;
class KisColor; class KisColor;
...@@ -60,7 +59,7 @@ public: ...@@ -60,7 +59,7 @@ public:
KisImage(KisUndoAdapter * adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name); KisImage(KisUndoAdapter * adapter, Q_INT32 width, Q_INT32 height, KisColorSpace * colorSpace, const QString& name);
KisImage(const KisImage& rhs); KisImage(const KisImage& rhs);
virtual ~KisImage(); virtual ~KisImage();
virtual KisImageIface *dcopObject(); virtual DCOPObject *dcopObject();
public: public:
typedef enum enumPaintFlags { typedef enum enumPaintFlags {
...@@ -313,7 +312,7 @@ private: ...@@ -313,7 +312,7 @@ private:
KisUndoAdapter *m_adapter; KisUndoAdapter *m_adapter;
//KisGuideMgr m_guides; //KisGuideMgr m_guides;
KisImageIface *m_dcop; DCOPObject *m_dcop;
vKisAnnotationSP m_annotations; vKisAnnotationSP m_annotations;
......
...@@ -88,3 +88,20 @@ DCOPRef KisImageIface::activeDevice() ...@@ -88,3 +88,20 @@ DCOPRef KisImageIface::activeDevice()
"KisPaintDeviceImplIface"); "KisPaintDeviceImplIface");
} }
DCOPRef KisImageIface::colorSpace() const
{
KisColorSpace * cs = m_img->colorSpace();
if ( !cs )
return DCOPRef();
else
return DCOPRef( kapp->dcopClient()->appId(),
cs->dcopObject()->objId(),
"KisColorSpaceIface" );
}
void KisImageIface::setColorSpace(DCOPRef colorSpace)
{
// XXX: Figure out how to get the correct object from
// the dcopref
}
...@@ -45,12 +45,23 @@ k_dcop: ...@@ -45,12 +45,23 @@ k_dcop:
void rotateCCW(); void rotateCCW();
void rotateCW(); void rotateCW();
void rotate180(); void rotate180();
void rotate(double angle); void rotate(double angle);
/** /**
* Get the active painting device. * Get the active painting device.
*/ */
DCOPRef activeDevice(); DCOPRef activeDevice();
/**
* Get the colorspace of this image
*/
DCOPRef colorSpace() const;
/**
* Set the colorspace of this image
*/
void setColorSpace(DCOPRef colorSpace);
private: private:
......
...@@ -19,12 +19,14 @@ ...@@ -19,12 +19,14 @@
*/ */
#include <kapplication.h> #include <kapplication.h>
#include <dcopclient.h>
#include "kis_paint_device_iface.h" #include "kis_paint_device_iface.h"
#include "kis_colorspace_iface.h"
#include "kis_colorspace.h"
#include "kis_paint_device_impl.h" #include "kis_paint_device_impl.h"
#include <dcopclient.h>
KisPaintDeviceImplIface::KisPaintDeviceImplIface( KisPaintDeviceImpl * parent ) KisPaintDeviceImplIface::KisPaintDeviceImplIface( KisPaintDeviceImpl * parent )
: DCOPObject(parent->name().utf8()) : DCOPObject(parent->name().utf8())
{ {
...@@ -56,7 +58,7 @@ Q_INT32 KisPaintDeviceImplIface::nChannels() const ...@@ -56,7 +58,7 @@ Q_INT32 KisPaintDeviceImplIface::nChannels() const
QByteArray KisPaintDeviceImplIface::readBytes(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h) QByteArray KisPaintDeviceImplIface::readBytes(Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h)
{ {
QByteArray b (w * h * m_parent->pixelSize()); QByteArray b (w * h * m_parent->pixelSize());
m_parent->readBytes((Q_UINT8*)b.data(), x, y, w, h); m_parent->readBytes((Q_UINT8*)b.data(), x, y, w, h);
return b; return b;
} }
...@@ -65,3 +67,20 @@ void KisPaintDeviceImplIface::writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y, ...@@ -65,3 +67,20 @@ void KisPaintDeviceImplIface::writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y,
{ {
m_parent->writeBytes((Q_UINT8*)bytes.data(), x, y, w, h); m_parent->writeBytes((Q_UINT8*)bytes.data(), x, y, w, h);
} }
DCOPRef KisPaintDeviceImplIface::colorSpace() const
{
KisColorSpace * cs = m_parent->colorSpace();
if ( !cs )
return DCOPRef();
else
return DCOPRef( kapp->dcopClient()->appId(),
cs->dcopObject()->objId(),
"KisColorSpaceIface" );
}
void KisPaintDeviceImplIface::setColorSpace(DCOPRef)
{
// XXX: Figure out how to get the correct object from
// the dcopref
}
/* This file is part of the KDE project /*
* This file is part of the KDE project
*
* Copyright (C) 2005 Boudewijn Rempt <boud@valdyas.org> * Copyright (C) 2005 Boudewijn Rempt <boud@valdyas.org>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -15,7 +17,6 @@ ...@@ -15,7 +17,6 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/ */
#ifndef _KIS_PAINT_DEVICE_IFACE_H #ifndef _KIS_PAINT_DEVICE_IFACE_H
#define _KIS_PAINT_DEVICE_IFACE_H #define _KIS_PAINT_DEVICE_IFACE_H
...@@ -68,6 +69,16 @@ k_dcop: ...@@ -68,6 +69,16 @@ k_dcop:
*/ */
void writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h); void writeBytes(QByteArray bytes, Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h);
/**
* Get the colorspace of this image
*/
DCOPRef colorSpace() const;
/**
* Set the colorspace of this image
*/
void setColorSpace(DCOPRef colorSpace);
private: private:
......
...@@ -372,22 +372,22 @@ KisPaintDeviceImpl::KisPaintDeviceImpl(const KisPaintDeviceImpl& rhs) : QObject( ...@@ -372,22 +372,22 @@ KisPaintDeviceImpl::KisPaintDeviceImpl(const KisPaintDeviceImpl& rhs) : QObject(
{ {
if (this != &rhs) { if (this != &rhs) {
m_owner = 0; m_owner = 0;
m_dcop = rhs.m_dcop; m_dcop = rhs.m_dcop;
if (rhs.m_datamanager) { if (rhs.m_datamanager) {
m_datamanager = new KisDataManager(*rhs.m_datamanager); m_datamanager = new KisDataManager(*rhs.m_datamanager);
Q_CHECK_PTR(m_datamanager); Q_CHECK_PTR(m_datamanager);
} }
m_extentIsValid = rhs.m_extentIsValid; m_extentIsValid = rhs.m_extentIsValid;
m_visible = rhs.m_visible; m_visible = rhs.m_visible;
m_x = rhs.m_x; m_x = rhs.m_x;
m_y = rhs.m_y; m_y = rhs.m_y;
m_name = rhs.m_name; m_name = rhs.m_name;
m_compositeOp = rhs.m_compositeOp; m_compositeOp = rhs.m_compositeOp;
m_colorSpace = rhs.m_colorSpace; m_colorSpace = rhs.m_colorSpace;
m_hasSelection = false; m_hasSelection = false;
m_selection = 0; m_selection = 0;
m_pixelSize = rhs.m_pixelSize; m_pixelSize = rhs.m_pixelSize;
m_nChannels = rhs.m_nChannels; m_nChannels = rhs.m_nChannels;
} }
} }
...@@ -819,8 +819,13 @@ void KisPaintDeviceImpl::emitSelectionChanged(const QRect& r) { ...@@ -819,8 +819,13 @@ void KisPaintDeviceImpl::emitSelectionChanged(const QRect& r) {
} }
KisSelectionSP KisPaintDeviceImpl::selection(){ KisSelectionSP KisPaintDeviceImpl::selection()
if (!m_selection) { {
// If there either is no selection yet,
// or there is a selection but it has been deselected
// create a new selection
// otherwise, make do with the current selection
if (!m_selection || (m_selection && m_selectionDeselected)) {
m_selection = new KisSelection(this, "layer selection for: " + name()); m_selection = new KisSelection(this, "layer selection for: " + name());
Q_CHECK_PTR(m_selection); Q_CHECK_PTR(m_selection);
m_selection -> setVisible(true); m_selection -> setVisible(true);
...@@ -829,6 +834,7 @@ KisSelectionSP KisPaintDeviceImpl::selection(){ ...@@ -829,6 +834,7 @@ KisSelectionSP KisPaintDeviceImpl::selection(){
} }
m_hasSelection = true; m_hasSelection = true;
m_selectionDeselected = false;
return m_selection; return m_selection;
} }
...@@ -842,7 +848,16 @@ bool KisPaintDeviceImpl::hasSelection() ...@@ -842,7 +848,16 @@ bool KisPaintDeviceImpl::hasSelection()
void KisPaintDeviceImpl::deselect() void KisPaintDeviceImpl::deselect()
{ {
m_hasSelection = false; if (m_selection && m_hasSelection) {
m_hasSelection = false;
m_selectionDeselected = true;
}
}
void KisPaintDeviceImpl::reselect()
{
m_hasSelection = true;
m_selectionDeselected = false;
} }
void KisPaintDeviceImpl::addSelection(KisSelectionSP selection) { void KisPaintDeviceImpl::addSelection(KisSelectionSP selection) {
......
...@@ -364,6 +364,9 @@ public: ...@@ -364,6 +364,9 @@ public:
/** Deselect the selection for this paintdevice. */ /** Deselect the selection for this paintdevice. */
void deselect(); void deselect();
/** Reinstates the old selection */
void reselect();
/** Clear the selected pixels from the paint device */ /** Clear the selected pixels from the paint device */
void clearSelection(); void clearSelection();
...@@ -412,10 +415,12 @@ private: ...@@ -412,10 +415,12 @@ private:
// Whether the selection is active // Whether the selection is active
bool m_hasSelection; bool m_hasSelection;
bool m_selectionDeselected;
// Contains the actual selection. For now, there can be only // Contains the actual selection. For now, there can be only
// one selection per layer. XXX: is this a limitation? // one selection per layer. XXX: is this a limitation?
KisSelectionSP m_selection; KisSelectionSP m_selection;
DCOPObject * m_dcop; DCOPObject * m_dcop;
}; };
......
...@@ -42,7 +42,7 @@ class KisPaintBox; ...@@ -42,7 +42,7 @@ class KisPaintBox;
/** /**
* This class keeps information that can be used in the painting process, for example by * This class keeps information that can be used in the painting process, for example by
* bruses. * brushes.
**/ **/
class KRITACORE_EXPORT KisPaintInformation { class KRITACORE_EXPORT KisPaintInformation {
public: public:
......
/**
@mainpage Krita Image manipulation and paint application
Krita is an advanced and modular paint and image manipulation
application.
Krita is built around two core libraries: kritacolor and kritaimage.
The kritacolor library abstracts colorspaces and color
transformations. Colorspaces provide functions to manipulate pixels. The
kritcolor library loads colorspace plugins to extend the range of
available colorspaces.
The kritaimage library abstracts the storage, creation, inspection
and manipulation of pixels stored in a rectangular area. It provides
layers, filters, iterators and painters. Filters and paint operations
are provided as service plugins loaded through the appropriate trader
queries.
Both libraries are used by the user interface, which is a KOffice
part. the user interface loads tools and other plugins.
*/
...@@ -14,6 +14,8 @@ endif ...@@ -14,6 +14,8 @@ endif
libkritacolor_la_SOURCES = \ libkritacolor_la_SOURCES = \
kis_color.cc \ kis_color.cc \
kis_colorspace.cc \ kis_colorspace.cc \
kis_colorspace_iface.cc \
kis_colorspace_iface.skel \
kis_composite_op.cc \ kis_composite_op.cc \
kis_profile.cc \ kis_profile.cc \
kis_histogram_producer.cc \ kis_histogram_producer.cc \
......
...@@ -62,11 +62,18 @@ class KisAbstractColorSpace : public KisColorSpace { ...@@ -62,11 +62,18 @@ class KisAbstractColorSpace : public KisColorSpace {
public: public:
/**
* @param id The unique human and machine readable identifiation of this colorspace
* @param cmType the lcms type indentification for this colorspace, may be 0
* @param colorSpaceSignature the icc identification for this colorspace, may be 0
* @param parent the registry that owns this instance
* @param profile the profile this colorspace uses for transforms
*/
KisAbstractColorSpace(const KisID & id, KisAbstractColorSpace(const KisID & id,
DWORD cmType, DWORD cmType,
icColorSpaceSignature colorSpaceSignature, icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * parent, KisColorSpaceFactoryRegistry * parent,
KisProfile *p); KisProfile *profile);
void init(); void init();
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
class KisBasicHistogramProducer : public KisHistogramProducer { class KisBasicHistogramProducer : public KisHistogramProducer {
public: public:
KisBasicHistogramProducer(const KisID& id, int channels, int nrOfBins, KisColorSpace *cs); KisBasicHistogramProducer(const KisID& id, int channels, int nrOfBins, KisColorSpace *colorSpace);
virtual ~KisBasicHistogramProducer() {} virtual ~KisBasicHistogramProducer() {}
virtual void clear(); virtual void clear();
...@@ -82,24 +82,24 @@ protected: ...@@ -82,24 +82,24 @@ protected:
class KisBasicU8HistogramProducer : public KisBasicHistogramProducer { class KisBasicU8HistogramProducer : public KisBasicHistogramProducer {
public: public:
KisBasicU8HistogramProducer(const KisID& id, KisColorSpace *cs); KisBasicU8HistogramProducer(const KisID& id, KisColorSpace *colorSpace);
virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs); virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace);
virtual QString positionToString(double pos) const; virtual QString positionToString(double pos) const;
virtual double maximalZoom() const { return 1.0; } virtual double maximalZoom() const { return 1.0; }
}; };
class KisBasicU16HistogramProducer : public KisBasicHistogramProducer { class KisBasicU16HistogramProducer : public KisBasicHistogramProducer {
public: public:
KisBasicU16HistogramProducer(const KisID& id, KisColorSpace *cs); KisBasicU16HistogramProducer(const KisID& id, KisColorSpace *colorSpace);
virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs); virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace);
virtual QString positionToString(double pos) const; virtual QString positionToString(double pos) const;
virtual double maximalZoom() const; virtual double maximalZoom() const;
}; };
class KisBasicF32HistogramProducer : public KisBasicHistogramProducer { class KisBasicF32HistogramProducer : public KisBasicHistogramProducer {
public: public:
KisBasicF32HistogramProducer(const KisID& id, KisColorSpace *cs); KisBasicF32HistogramProducer(const KisID& id, KisColorSpace *colorSpace);
virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs); virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace);
virtual QString positionToString(double pos) const; virtual QString positionToString(double pos) const;
virtual double maximalZoom() const; virtual double maximalZoom() const;
}; };
...@@ -107,8 +107,8 @@ public: ...@@ -107,8 +107,8 @@ public:
#if HAVE_OPENEXR #if HAVE_OPENEXR
class KisBasicF16HalfHistogramProducer : public KisBasicHistogramProducer { class KisBasicF16HalfHistogramProducer : public KisBasicHistogramProducer {
public: public:
KisBasicF16HalfHistogramProducer(const KisID& id, KisColorSpace *cs); KisBasicF16HalfHistogramProducer(const KisID& id, KisColorSpace *colorSpace);
virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *cs); virtual void addRegionToBin(Q_UINT8 * pixels, Q_UINT8 * selectionMask, Q_UINT32 nPixels, KisColorSpace *colorSpace);
virtual QString positionToString(double pos) const; virtual QString positionToString(double pos) const;
virtual double maximalZoom() const; virtual double maximalZoom() const;
}; };
...@@ -122,11 +122,11 @@ public: ...@@ -122,11 +122,11 @@ public:
*/ */
template<class T> class KisBasicHistogramProducerFactory : public KisHistogramProducerFactory { template<class T> class KisBasicHistogramProducerFactory : public KisHistogramProducerFactory {
public: public:
KisBasicHistogramProducerFactory(const KisID& id, KisColorSpace *cs) KisBasicHistogramProducerFactory(const KisID& id, KisColorSpace *colorSpace)
: KisHistogramProducerFactory(id), m_cs(cs) {} : KisHistogramProducerFactory(id), m_cs(colorSpace) {}
virtual ~KisBasicHistogramProducerFactory() {} virtual ~KisBasicHistogramProducerFactory() {}
virtual KisHistogramProducerSP generate() { return new T(id(), m_cs); } virtual KisHistogramProducerSP generate() { return new T(id(), m_cs); }
virtual bool isCompatibleWith(KisColorSpace* cs) const { return cs -> id() == m_cs -> id(); } virtual bool isCompatibleWith(KisColorSpace* colorSpace) const { return colorSpace -> id() == m_cs -> id(); }
protected: protected:
KisColorSpace *m_cs; KisColorSpace *m_cs;
}; };
......
...@@ -33,46 +33,46 @@ ...@@ -33,46 +33,46 @@
class KisColor { class KisColor {
public: public:
// Create an empty KisColor. It will be valid, but also black and transparent /// Create an empty KisColor. It will be valid, but also black and transparent
KisColor(); KisColor();
virtual ~KisColor(); virtual ~KisColor();
// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor /// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor
// is assumed to have the current monitor profile. /// is assumed to have the current monitor profile.
KisColor(const QColor & color, KisColorSpace * colorSpace); KisColor(const QColor & color, KisColorSpace * colorSpace);
// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor /// Create a KisColor from a QColor. The QColor is immediately converted to native. The QColor
// is assumed to have the current monitor profile. /// is assumed to have the current monitor profile.
KisColor(const QColor & color, Q_UINT8 alpha, KisColorSpace * colorSpace); KisColor(const QColor & color, Q_UINT8 alpha, KisColorSpace * colorSpace);
// Create a KisColor using a native color strategy. The data is copied. /// Create a KisColor using a native color strategy. The data is copied.
KisColor(const Q_UINT8 * data, KisColorSpace * colorSpace);