Commit 6ff340df authored by Casper Boemann's avatar Casper Boemann

add pigment to compilation

and make it compile

svn path=/trunk/koffice/; revision=547887
parent 679eddcf
......@@ -11,6 +11,7 @@ add_subdirectory( kformula )
add_subdirectory( kopalette )
add_subdirectory( kopainter )
add_subdirectory( flake )
add_subdirectory( pigment )
# Laurent: need to detect ruby/python
MESSAGE(STATUS "KOFFICE_ENABLE_SCRIPTING :<${KOFFICE_ENABLE_SCRIPTING}>")
if(KOFFICE_ENABLE_SCRIPTING)
......
include_directories( ${KDE4_INCLUDE_DIR} ${QT_INCLUDES} )
add_subdirectory(tests)
set(pigment_SRCS
KoColor.cpp
)
......
......@@ -33,24 +33,24 @@ KoColor::KoColor(const KoColor & rhs)
{
if (this == &rhs) return;
memcpy(m_data, rhs.data(), 4);
memcpy(m_data, rhs.m_data, 4);
}
KoColor & KoColor::operator=(const KoColor & rhs)
{
memcpy(m_data, rhs.data(), 4);
memcpy(m_data, rhs.m_data, 4);
return * this;
}
// To save the user the trouble of doing color->colorSpace()->toQColor(color->data(), &c, &a, profile
void KoColor::toQColor(QColor *c) const
{
c.setRgb(m_data[0],m_data[1],m_data[2]);
c->setRgb(m_data[0],m_data[1],m_data[2]);
}
void KoColor::toQColor(QColor *c, quint8 *opacity) const
{
c.setRgb(m_data[0],m_data[1],m_data[2]);
c->setRgb(m_data[0],m_data[1],m_data[2]);
*opacity = m_data[3];
}
......
......@@ -25,7 +25,7 @@
* A KoColor describes a color in a certain colorspace.
*
*/
class PIGMENT_EXPORT KoColor {
class /*PIGMENT_EXPORT*/ KoColor {
public:
/// Create an empty KoColor. It will be valid, but also black and transparent
......@@ -40,6 +40,7 @@ public:
KoColor &operator=(const KoColor &);
/// To save the user the trouble of doing color->colorSpace()->toQColor(color->data(), &c, &a
/// The result is in display profile
void toQColor(QColor *c) const;
void toQColor(QColor *c, quint8 *opacity) const;
......
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