diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-26 00:29:37 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-26 00:29:37 +0000 |
commit | 2785103a6bd4de55bd26d79e34d0fdd4b329a73a (patch) | |
tree | c2738b1095bfdb263da27bc1391403d829522a14 /krita/colorspaces/cmyk_u8 | |
parent | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (diff) | |
download | koffice-2785103a6bd4de55bd26d79e34d0fdd4b329a73a.tar.gz koffice-2785103a6bd4de55bd26d79e34d0fdd4b329a73a.zip |
Remove krita* in preparation for name switch from Krita to Chalk
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238361 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/colorspaces/cmyk_u8')
-rw-r--r-- | krita/colorspaces/cmyk_u8/Makefile.am | 20 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/cmyk_plugin.cc | 66 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/cmyk_plugin.h | 38 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/cmykplugin.rc | 7 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/composite.h | 76 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc | 710 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h | 126 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/kritacmykplugin.desktop | 99 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/.directory | 5 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/Makefile.am | 8 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/cr48-action-template_cmyk_empty.png | bin | 432 -> 0 bytes | |||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/crsc-action-template_cmyk_empty.svgz | bin | 1655 -> 0 bytes | |||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/white_2000x800.desktop | 100 | ||||
-rw-r--r-- | krita/colorspaces/cmyk_u8/templates/white_2000x800.kra | bin | 17590 -> 0 bytes |
14 files changed, 0 insertions, 1255 deletions
diff --git a/krita/colorspaces/cmyk_u8/Makefile.am b/krita/colorspaces/cmyk_u8/Makefile.am deleted file mode 100644 index 98e5ac52..00000000 --- a/krita/colorspaces/cmyk_u8/Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -kde_services_DATA = kritacmykplugin.desktop - -INCLUDES = -I$(srcdir)/../../sdk \ - -I$(srcdir)/../../kritacolor/color_strategy \ - -I$(srcdir)/../../kritacolor \ - $(KOFFICE_INCLUDES) \ - $(all_includes) - -kde_module_LTLIBRARIES = kritacmykplugin.la - -kritacmykplugin_la_SOURCES = cmyk_plugin.cc kis_cmyk_colorspace.cc -noinst_HEADERS = cmyk_plugin.h kis_cmyk_colorspace.h - -kritacmykplugin_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) $(LIB_QT) -lkdecore -lkdeui -lkjs -lkdefx -lkio -lkparts -llcms -kritacmykplugin_la_LIBADD = ../../kritacolor/libkritacolor.la - -kritacmykplugin_la_METASOURCES = AUTO - - -SUBDIRS=templates diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc b/krita/colorspaces/cmyk_u8/cmyk_plugin.cc deleted file mode 100644 index d216417e..00000000 --- a/krita/colorspaces/cmyk_u8/cmyk_plugin.cc +++ /dev/null @@ -1,66 +0,0 @@ -/* - * cmyk_plugin.cc -- Part of Krita - * - * Copyright (c) 2004 Boudewijn Rempt ([email protected]) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include <klocale.h> -#include <kiconloader.h> -#include <kinstance.h> -#include <kmessagebox.h> -#include <kstandarddirs.h> -#include <ktempfile.h> -#include <kdebug.h> -#include <kgenericfactory.h> - -#include <kis_debug_areas.h> -#include <kis_colorspace_factory_registry.h> -#include <kis_basic_histogram_producers.h> - -#include "cmyk_plugin.h" - -#include "kis_cmyk_colorspace.h" - -typedef KGenericFactory<CMYKPlugin> CMYKPluginFactory; -K_EXPORT_COMPONENT_FACTORY( kritacmykplugin, CMYKPluginFactory( "krita" ) ) - - -CMYKPlugin::CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &) - : KParts::Plugin(tqparent, name) -{ - setInstance(CMYKPluginFactory::instance()); - if ( tqparent->inherits("KisColorSpaceFactoryRegistry") ) - { - KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent ); - - KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0); - KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory(); - Q_CHECK_PTR(colorSpaceCMYK); - f->add(csf); - - KisHistogramProducerFactoryRegistry::instance()->add( - new KisBasicHistogramProducerFactory<KisBasicU8HistogramProducer> - (KisID("CMYKHISTO", i18n("CMYK")), colorSpaceCMYK) ); - } - -} - -CMYKPlugin::~CMYKPlugin() -{ -} - -#include "cmyk_plugin.moc" diff --git a/krita/colorspaces/cmyk_u8/cmyk_plugin.h b/krita/colorspaces/cmyk_u8/cmyk_plugin.h deleted file mode 100644 index 073a5e61..00000000 --- a/krita/colorspaces/cmyk_u8/cmyk_plugin.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2003 Boudewijn Rempt ([email protected]) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef CMYK_PLUGIN_H_ -#define CMYK_PLUGIN_H_ - -#include <kparts/plugin.h> - -/** - * A plugin wrapper around the CMYK colour space strategy. - */ -class CMYKPlugin : public KParts::Plugin -{ - Q_OBJECT - TQ_OBJECT -public: - CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &); - virtual ~CMYKPlugin(); - - -}; - -#endif // CMYK_PLUGIN_H_ diff --git a/krita/colorspaces/cmyk_u8/cmykplugin.rc b/krita/colorspaces/cmyk_u8/cmykplugin.rc deleted file mode 100644 index 915a1d0a..00000000 --- a/krita/colorspaces/cmyk_u8/cmykplugin.rc +++ /dev/null @@ -1,7 +0,0 @@ -<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -<kpartgui library="kritacmykplugin" version="1"> -<Menu name="Image"><text>&Image</text> - <Menu name="Mode"><text>&Mode</text> - <Action name="convert to RGB(A)"/> - </Menu> -</Menu></kpartgui> diff --git a/krita/colorspaces/cmyk_u8/composite.h b/krita/colorspaces/cmyk_u8/composite.h deleted file mode 100644 index 4914a7df..00000000 --- a/krita/colorspaces/cmyk_u8/composite.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2006 Boudewijn Rempt - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#ifndef COMPOSITE_CMYK -#define COMPOSITE_CMYK - -void compositeCopyCyan(TQ_INT32 stride, - TQ_UINT8 *dst, - TQ_INT32 dststride, - TQ_UINT8 *src, - TQ_INT32 srcstride, - TQ_INT32 rows, - TQ_INT32 cols, - TQ_UINT8 opacity = OPACITY_OPAQUE) -{ - compositeCopyChannel(PIXEL_CYAN, stride, dst, dststride, src, srcstride, rows, cols, opacity); -} - - -void compositeCopyMagenta(TQ_INT32 stride, - TQ_UINT8 *dst, - TQ_INT32 dststride, - TQ_UINT8 *src, - TQ_INT32 srcstride, - TQ_INT32 rows, - TQ_INT32 cols, - TQ_UINT8 opacity = OPACITY_OPAQUE) -{ - compositeCopyChannel(PIXEL_MAGENTA, stride, dst, dststride, src, srcstride, rows, cols, opacity); - -} - - -void compositeCopyYellow(TQ_INT32 stride, - TQ_UINT8 *dst, - TQ_INT32 dststride, - TQ_UINT8 *src, - TQ_INT32 srcstride, - TQ_INT32 rows, - TQ_INT32 cols, - TQ_UINT8 opacity = OPACITY_OPAQUE) -{ - compositeCopyChannel(PIXEL_YELLOW, stride, dst, dststride, src, srcstride, rows, cols, opacity); - -} - - -void compositeCopyBlack(TQ_INT32 stride, - TQ_UINT8 *dst, - TQ_INT32 dststride, - TQ_UINT8 *src, - TQ_INT32 srcstride, - TQ_INT32 rows, - TQ_INT32 cols, - TQ_UINT8 opacity = OPACITY_OPAQUE) -{ - compositeCopyChannel(PIXEL_BLACK, stride, dst, dststride, src, srcstride, rows, cols, opacity); -} - - -#endif
\ No newline at end of file diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc deleted file mode 100644 index 49256c26..00000000 --- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc +++ /dev/null @@ -1,710 +0,0 @@ -/* - * Copyright (c) 2003 Boudewijn Rempt ([email protected]) - * - * This program is free software; you can CYANistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -#include <limits.h> -#include <stdlib.h> -#include <config.h> -#include LCMS_HEADER - -#include <tqimage.h> - -#include <kdebug.h> -#include <klocale.h> - -#include "kis_cmyk_colorspace.h" -#include "kis_u8_base_colorspace.h" -#include "kis_colorspace_factory_registry.h" - -#include "kis_profile.h" -#include "kis_integer_maths.h" - -namespace cmyk { - const TQ_INT32 MAX_CHANNEL_CMYK = 4; - const TQ_INT32 MAX_CHANNEL_CMYKA = 5; -} - -KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) : - KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, tqparent, p) -{ - m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::cyan)); - m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::magenta)); - m_channels.push_back(new KisChannelInfo(i18n("Yellow"), i18n("Y"), 2, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::yellow)); - m_channels.push_back(new KisChannelInfo(i18n("Black"), i18n("K"), 3, KisChannelInfo::COLOR, KisChannelInfo::UINT8, 1, TQt::black)); - m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 4, KisChannelInfo::ALPHA, KisChannelInfo::UINT8, 1, TQt::white)); - - m_alphaPos = PIXEL_CMYK_ALPHA; - - init(); -} - -KisCmykColorSpace::~KisCmykColorSpace() -{ -} - -void KisCmykColorSpace::mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const -{ - TQ_UINT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; - - while (nColors--) - { - TQ_UINT32 alpha = (*colors)[4]; - TQ_UINT32 alphaTimesWeight = alpha * *weights; - - totalCyan += (*colors)[0] * alphaTimesWeight; - totalMagenta += (*colors)[1] * alphaTimesWeight; - totalYellow += (*colors)[2] * alphaTimesWeight; - totalK += (*colors)[3] * alphaTimesWeight; - totalAlpha += alphaTimesWeight; - - weights++; - colors++; - } - - //Q_ASSERT(newAlpha <= 255*255); - if (totalAlpha > 255*255) totalAlpha = 255*255; - - // Divide by 255. - dst[4] =(((totalAlpha + 0x80)>>8)+totalAlpha) >>8; - - if (totalAlpha > 0) { - totalCyan = totalCyan / totalAlpha; - totalMagenta = totalMagenta / totalAlpha; - totalYellow = totalYellow / totalAlpha; - totalK = totalK / totalAlpha; - } // else the values are already 0 too - - TQ_UINT32 dstCyan = totalCyan; - if (dstCyan > 255) dstCyan = 255; - dst[0] = dstCyan; - - TQ_UINT32 dstMagenta = totalMagenta; - if (dstMagenta > 255) dstMagenta = 255; - dst[1] = dstMagenta; - - TQ_UINT32 dstYellow = totalYellow; - if (dstYellow > 255) dstYellow = 255; - dst[2] = dstYellow; - - TQ_UINT32 dstK = totalK; - if (dstK > 255) dstK = 255; - dst[3] = dstK; -} - - -void KisCmykColorSpace::convolveColors(TQ_UINT8** colors, TQ_INT32* kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const -{ - TQ_INT32 totalCyan = 0, totalMagenta = 0, totalYellow = 0, totalK = 0, totalAlpha = 0; - - while (nColors--) - { - TQ_INT32 weight = *kernelValues; - - if (weight != 0) { - totalCyan += (*colors)[PIXEL_CYAN] * weight; - totalMagenta += (*colors)[PIXEL_MAGENTA] * weight; - totalYellow += (*colors)[PIXEL_YELLOW] * weight; - totalK += (*colors)[PIXEL_BLACK] * weight; - totalAlpha += (*colors)[PIXEL_CMYK_ALPHA] * weight; - } - colors++; - kernelValues++; - } - - - if (channelFlags & KisChannelInfo::FLAG_COLOR) { - dst[PIXEL_CYAN] = CLAMP((totalCyan / factor) + offset, 0, TQ_UINT8_MAX); - dst[PIXEL_MAGENTA] = CLAMP((totalMagenta / factor) + offset, 0, TQ_UINT8_MAX); - dst[PIXEL_YELLOW] = CLAMP((totalYellow / factor) + offset, 0, TQ_UINT8_MAX); - dst[PIXEL_BLACK] = CLAMP((totalK / factor) + offset, 0, TQ_UINT8_MAX); - } - if (channelFlags & KisChannelInfo::FLAG_ALPHA) { - dst[PIXEL_CMYK_ALPHA] = CLAMP((totalAlpha/ factor) + offset, 0, TQ_UINT8_MAX); - } -} - - -void KisCmykColorSpace::invertColor(TQ_UINT8 * src, TQ_INT32 nPixels) -{ - TQ_UINT32 psize = pixelSize(); - - while (nPixels--) - { - src[PIXEL_CYAN] = TQ_UINT8_MAX - src[PIXEL_CYAN]; - src[PIXEL_MAGENTA] = TQ_UINT8_MAX - src[PIXEL_MAGENTA]; - src[PIXEL_YELLOW] = TQ_UINT8_MAX - src[PIXEL_YELLOW]; - src[PIXEL_BLACK] = TQ_UINT8_MAX - src[PIXEL_BLACK]; - src += psize; - } -} - -void KisCmykColorSpace::applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels) -{ - TQ_UINT32 psize = pixelSize(); - - TQ_UINT8 * tmp = new TQ_UINT8[nPixels * psize]; - TQ_UINT8 * tmpPtr = tmp; - memcpy(tmp, dst, nPixels * psize); - - KisAbstractColorSpace::applyAdjustment(src, dst, adj, nPixels); - - // Copy the alpha, which lcms doesn't do for us, grumble. - - while (nPixels--) - { - dst[4] = tmpPtr[4]; - - tmpPtr += psize; - dst += psize; - } - - delete [] tmp; -} - -TQValueVector<KisChannelInfo *> KisCmykColorSpace::channels() const -{ - return m_channels; -} - -TQ_UINT32 KisCmykColorSpace::nChannels() const -{ - return cmyk::MAX_CHANNEL_CMYKA; -} - -TQ_UINT32 KisCmykColorSpace::nColorChannels() const -{ - return cmyk::MAX_CHANNEL_CMYK; -} - -TQ_UINT32 KisCmykColorSpace::pixelSize() const -{ - return cmyk::MAX_CHANNEL_CMYKA; -} - -void KisCmykColorSpace::getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex) -{ - if (channelIndex < (TQ_UINT32)cmyk::MAX_CHANNEL_CMYKA) { - - memset(dstPixel, 0, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8)); - - if (OPACITY_TRANSPARENT != 0) { - dstPixel[PIXEL_CMYK_ALPHA] = OPACITY_TRANSPARENT; - } - - memcpy(dstPixel + (channelIndex * sizeof(TQ_UINT8)), srcPixel + (channelIndex * sizeof(TQ_UINT8)), sizeof(TQ_UINT8)); - } -} - -void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - while (rows > 0) { - - const TQ_UINT8 *src = srcRowStart; - TQ_UINT8 *dst = dstRowStart; - const TQ_UINT8 *tqmask = tqmaskRowStart; - TQ_INT32 columns = numColumns; - - while (columns > 0) { - - TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; - - // apply the alphatqmask - if (tqmask != 0) { - TQ_UINT8 U8_tqmask = *tqmask; - - if (U8_tqmask != OPACITY_OPAQUE) { - srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); - } - tqmask++; - } - - if (srcAlpha != OPACITY_TRANSPARENT) { - - if (opacity != OPACITY_OPAQUE) { - srcAlpha = UINT8_MULT(srcAlpha, opacity); - } - - if (srcAlpha == OPACITY_OPAQUE) { - memcpy(dst, src, cmyk::MAX_CHANNEL_CMYKA * sizeof(TQ_UINT8)); - } else { - TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; - - TQ_UINT8 srcBlend; - - if (dstAlpha == OPACITY_OPAQUE) { - srcBlend = srcAlpha; - } else { - TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); - dst[PIXEL_CMYK_ALPHA] = newAlpha; - - if (newAlpha != 0) { - srcBlend = UINT8_DIVIDE(srcAlpha, newAlpha); - } else { - srcBlend = srcAlpha; - } - } - - if (srcBlend == OPACITY_OPAQUE) { - memcpy(dst, src, cmyk::MAX_CHANNEL_CMYK * sizeof(TQ_UINT8)); - } else { - dst[PIXEL_CYAN] = UINT8_BLEND(src[PIXEL_CYAN], dst[PIXEL_CYAN], srcBlend); - dst[PIXEL_MAGENTA] = UINT8_BLEND(src[PIXEL_MAGENTA], dst[PIXEL_MAGENTA], srcBlend); - dst[PIXEL_YELLOW] = UINT8_BLEND(src[PIXEL_YELLOW], dst[PIXEL_YELLOW], srcBlend); - dst[PIXEL_BLACK] = UINT8_BLEND(src[PIXEL_BLACK], dst[PIXEL_BLACK], srcBlend); - } - } - } - - columns--; - src += cmyk::MAX_CHANNEL_CMYKA; - dst += cmyk::MAX_CHANNEL_CMYKA; - } - - rows--; - srcRowStart += srcRowStride; - dstRowStart += dstRowStride; - if(tqmaskRowStart) { - tqmaskRowStart += tqmaskRowStride; - } - } -} - -#define COMMON_COMPOSITE_OP_PROLOG() \ - while (rows > 0) { \ - \ - const TQ_UINT8 *src = srcRowStart; \ - TQ_UINT8 *dst = dstRowStart; \ - TQ_INT32 columns = numColumns; \ - const TQ_UINT8 *tqmask = tqmaskRowStart; \ - \ - while (columns > 0) { \ - \ - TQ_UINT8 srcAlpha = src[PIXEL_CMYK_ALPHA]; \ - TQ_UINT8 dstAlpha = dst[PIXEL_CMYK_ALPHA]; \ - \ - srcAlpha = TQMIN(srcAlpha, dstAlpha); \ - \ - if (tqmask != 0) { \ - TQ_UINT8 U8_tqmask = *tqmask; \ - \ - if (U8_tqmask != OPACITY_OPAQUE) { \ - srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); \ -} \ - tqmask++; \ -} \ - \ - if (srcAlpha != OPACITY_TRANSPARENT) { \ - \ - if (opacity != OPACITY_OPAQUE) { \ - srcAlpha = UINT8_MULT(srcAlpha, opacity); \ -} \ - \ - TQ_UINT8 srcBlend; \ - \ - if (dstAlpha == OPACITY_OPAQUE) { \ - srcBlend = srcAlpha; \ -} else { \ - TQ_UINT8 newAlpha = dstAlpha + UINT8_MULT(OPACITY_OPAQUE - dstAlpha, srcAlpha); \ - dst[PIXEL_CMYK_ALPHA] = newAlpha; \ - \ - if (newAlpha != 0) { \ - srcBlend = UINT8_DIVIDE(srcAlpha, newAlpha); \ -} else { \ - srcBlend = srcAlpha; \ -} \ -} - -#define COMMON_COMPOSITE_OP_EPILOG() \ -} \ - \ - columns--; \ - src += cmyk::MAX_CHANNEL_CMYKA; \ - dst += cmyk::MAX_CHANNEL_CMYKA; \ -} \ - \ - rows--; \ - srcRowStart += srcRowStride; \ - dstRowStart += dstRowStride; \ - if(tqmaskRowStart) { \ - tqmaskRowStart += tqmaskRowStride; \ -} \ -} - -void KisCmykColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = UINT8_MULT(srcColor, dstColor); - - dst[channel] = UINT8_BLEND(srcColor, dstColor, srcBlend); - } - - - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = TQMIN((dstColor * (UINT8_MAX + 1u) + (srcColor / 2u)) / (1u + srcColor), UINT8_MAX); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = UINT8_MAX - UINT8_MULT(UINT8_MAX - dstColor, UINT8_MAX - srcColor); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = UINT8_MULT(dstColor, dstColor + 2u * UINT8_MULT(srcColor, UINT8_MAX - dstColor)); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = TQMIN((dstColor * (UINT8_MAX + 1u)) / (UINT8_MAX + 1u - srcColor), UINT8_MAX); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = TQMIN(((UINT8_MAX - dstColor) * (UINT8_MAX + 1u)) / (srcColor + 1u), UINT8_MAX); - if (srcColor > UINT8_MAX - srcColor) srcColor = UINT8_MAX; - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = TQMIN(srcColor, dstColor); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStride, const TQ_UINT8 *srcRowStart, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmaskRowStart, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 numColumns, TQ_UINT8 opacity) -{ - COMMON_COMPOSITE_OP_PROLOG(); - - { - for (int channel = 0; channel < cmyk::MAX_CHANNEL_CMYK; channel++) { - - TQ_UINT8 srcColor = src[channel]; - TQ_UINT8 dstColor = dst[channel]; - - srcColor = TQMAX(srcColor, dstColor); - - TQ_UINT8 newColor = UINT8_BLEND(srcColor, dstColor, srcBlend); - - dst[channel] = newColor; - } - } - - COMMON_COMPOSITE_OP_EPILOG(); -} - -void KisCmykColorSpace::compositeErase(TQ_UINT8 *dst, - TQ_INT32 dstRowSize, - const TQ_UINT8 *src, - TQ_INT32 srcRowSize, - const TQ_UINT8 *srcAlphaMask, - TQ_INT32 tqmaskRowStride, - TQ_INT32 rows, - TQ_INT32 cols, - TQ_UINT8 /*opacity*/) -{ - while (rows-- > 0) - { - const Pixel *s = reinterpret_cast<const Pixel *>(src); - Pixel *d = reinterpret_cast<Pixel *>(dst); - const TQ_UINT8 *tqmask = srcAlphaMask; - - for (TQ_INT32 i = cols; i > 0; i--, s++, d++) - { - TQ_UINT8 srcAlpha = s->alpha; - - // apply the alphatqmask - if (tqmask != 0) { - TQ_UINT8 U8_tqmask = *tqmask; - - if (U8_tqmask != OPACITY_OPAQUE) { - srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_tqmask); - } - tqmask++; - } - d->alpha = UINT8_MULT(srcAlpha, d->alpha); - } - - dst += dstRowSize; - src += srcRowSize; - if(srcAlphaMask) { - srcAlphaMask += tqmaskRowStride; - } - } -} - -void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst, - TQ_INT32 dstRowStride, - const TQ_UINT8 *src, - TQ_INT32 srcRowStride, - const TQ_UINT8 *tqmask, - TQ_INT32 tqmaskRowStride, - TQ_UINT8 opacity, - TQ_INT32 rows, - TQ_INT32 cols, - const KisCompositeOp& op) -{ - - switch (op.op()) { - case COMPOSITE_UNDEF: - // Undefined == no composition - break; - case COMPOSITE_OVER: - compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_IN: - //compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - case COMPOSITE_OUT: - //compositeOut(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_ATOP: - //compositeAtop(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_XOR: - //compositeXor(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_PLUS: - //compositePlus(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_MINUS: - //compositeMinus(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_ADD: - //compositeAdd(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_SUBTRACT: - //compositeSubtract(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_DIFF: - //compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_MULT: - compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_DIVIDE: - compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_BUMPMAP: - //compositeBumpmap(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_COPY: - compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_COPY_CYAN: - //compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_COPY_MAGENTA: - //compositeCopyMagenta(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_COPY_YELLOW: - //compositeCopyYellow(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_COPY_OPACITY: - //compositeCopyOpacity(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_CLEAR: - //compositeClear(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_DISSOLVE: - //compositeDissolve(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_DISPLACE: - //compositeDisplace(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; -#if 0 - case COMPOSITE_MODULATE: - compositeModulate(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_THRESHOLD: - compositeThreshold(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; -#endif - case COMPOSITE_NO: - // No composition. - break; - case COMPOSITE_DARKEN: - compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_LIGHTEN: - compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_HUE: - //compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_SATURATION: - //compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_VALUE: - //compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_COLOR: - //compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_COLORIZE: - //compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_LUMINIZE: - //compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity); - break; - case COMPOSITE_SCREEN: - compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_OVERLAY: - compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_ERASE: - compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_DODGE: - compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_BURN: - compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, rows, cols, opacity); - break; - case COMPOSITE_ALPHA_DARKEN: - abstractCompositeAlphaDarken<TQ_UINT8, U8Mult, Uint8ToU8, U8OpacityTest, - PIXEL_CMYK_ALPHA, cmyk::MAX_CHANNEL_CMYK, cmyk::MAX_CHANNEL_CMYKA>( - dst, dstRowStride, src, srcRowStride, tqmask, tqmaskRowStride, - rows, cols, opacity, U8Mult(), Uint8ToU8(), U8OpacityTest()); - break; - default: - break; - } -} - -KisCompositeOpList KisCmykColorSpace::userVisiblecompositeOps() const -{ - KisCompositeOpList list; - - list.append(KisCompositeOp(COMPOSITE_OVER)); - list.append(KisCompositeOp(COMPOSITE_ALPHA_DARKEN)); - list.append(KisCompositeOp(COMPOSITE_MULT)); - list.append(KisCompositeOp(COMPOSITE_BURN)); - list.append(KisCompositeOp(COMPOSITE_DODGE)); - list.append(KisCompositeOp(COMPOSITE_DIVIDE)); - list.append(KisCompositeOp(COMPOSITE_SCREEN)); - list.append(KisCompositeOp(COMPOSITE_OVERLAY)); - list.append(KisCompositeOp(COMPOSITE_DARKEN)); - list.append(KisCompositeOp(COMPOSITE_LIGHTEN)); - - return list; -} diff --git a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h b/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h deleted file mode 100644 index b02990bf..00000000 --- a/krita/colorspaces/cmyk_u8/kis_cmyk_colorspace.h +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2003 Boudewijn Rempt ([email protected]) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * 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_CMYK_H_ -#define KIS_STRATEGY_COLORSPACE_CMYK_H_ - -#include <tqcolor.h> -#include <tqmap.h> -#include <koffice_export.h> -#include "kis_global.h" -#include "kis_u8_base_colorspace.h" - -class KRITACORE_EXPORT KisCmykColorSpace : public KisU8BaseColorSpace { - -public: - - - struct Pixel { - TQ_UINT16 cyan; - TQ_UINT16 magenta; - TQ_UINT16 yellow; - TQ_UINT16 black; - TQ_UINT16 alpha; - }; -public: - KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p); - virtual ~KisCmykColorSpace(); - - - virtual bool willDegrade(ColorSpaceIndependence independence) - { - if (independence == TO_RGBA8) - return true; - else - return false; - }; - - - -public: - - virtual void mixColors(const TQ_UINT8 **colors, const TQ_UINT8 *weights, TQ_UINT32 nColors, TQ_UINT8 *dst) const; - virtual void applyAdjustment(const TQ_UINT8 *src, TQ_UINT8 *dst, KisColorAdjustment *adj, TQ_INT32 nPixels); - virtual void invertColor(TQ_UINT8 * src, TQ_INT32 nPixels); - virtual void convolveColors(TQ_UINT8** colors, TQ_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, TQ_UINT8 *dst, TQ_INT32 factor, TQ_INT32 offset, TQ_INT32 nColors) const; - // XXX: darken & intensity8? - - virtual TQValueVector<KisChannelInfo *> channels() const; - virtual TQ_UINT32 nChannels() const; - virtual TQ_UINT32 nColorChannels() const; - virtual TQ_UINT32 pixelSize() const; - virtual void getSingleChannelPixel(TQ_UINT8 *dstPixel, const TQ_UINT8 *srcPixel, TQ_UINT32 channelIndex); - - virtual KisCompositeOpList userVisiblecompositeOps() const; - -protected: - - virtual void bitBlt(TQ_UINT8 *dst, - TQ_INT32 dstRowStride, - const TQ_UINT8 *src, - TQ_INT32 srcRowStride, - const TQ_UINT8 *srcAlphaMask, - TQ_INT32 tqmaskRowStride, - TQ_UINT8 opacity, - TQ_INT32 rows, - TQ_INT32 cols, - const KisCompositeOp& op); - - void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 tqmaskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity); - -private: - - TQ_UINT8 * m_qcolordata; - - static const TQ_UINT8 PIXEL_CYAN = 0; - static const TQ_UINT8 PIXEL_MAGENTA = 1; - static const TQ_UINT8 PIXEL_YELLOW = 2; - static const TQ_UINT8 PIXEL_BLACK = 3; - static const TQ_UINT8 PIXEL_CMYK_ALPHA = 4; -}; - -class KisCmykColorSpaceFactory : public KisColorSpaceFactory -{ -public: - /** - * Krita definition for use in .kra files and internally: unchanging name + - * i18n'able description. - */ - virtual KisID id() const { return KisID("CMYK", i18n("CMYK (8-bit integer/channel)")); }; - - /** - * lcms colorspace type definition. - */ - virtual TQ_UINT32 colorSpaceType() { return TYPE_CMYK5_8; }; - - virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; }; - - virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykColorSpace(tqparent, p); }; - - virtual TQString defaultProfile() { return "Offset printing, according to ISO/DIS 12647-2:2004, OFCOM, paper type 1 or 2 = coated art, 115 g/m2, screen ruling 60 cm-1, positive-acting plates"; }; // Do not i18n -- this is from a data file -}; - -#endif // KIS_STRATEGY_COLORSPACE_CMYK_H_ diff --git a/krita/colorspaces/cmyk_u8/kritacmykplugin.desktop b/krita/colorspaces/cmyk_u8/kritacmykplugin.desktop deleted file mode 100644 index 5ae04a6f..00000000 --- a/krita/colorspaces/cmyk_u8/kritacmykplugin.desktop +++ /dev/null @@ -1,99 +0,0 @@ -[Desktop Entry] -Name=CMYK Color Model -Name[bg]=Цветови модел CMYK -Name[br]=Gobari al livioù CMYK -Name[ca]=Model de color CMYK -Name[cy]=Model Lliw CMYK -Name[da]=CMYK-farvemodel -Name[de]=CMYK-Farbmodell -Name[el]=Χρωματικό μοντέλο CMYK -Name[en_GB]=CMYK Colour Model -Name[eo]=CMYK-kolormodelo -Name[es]=Modelo de color CMYK -Name[et]=CMYK värvimudel -Name[eu]=CMYK kolore-eredua -Name[fa]=مدل رنگ CMYK -Name[fi]=CMYK-värimalli -Name[fr]=Modèle de couleurs CMYK -Name[fy]=CMYK kleur-model -Name[gl]=Modelo de Cores CMYK -Name[he]=מודל צבעים CMYK -Name[hi]=सीएमवायके रंग नमूना -Name[hu]=CMYK színmodell -Name[is]=CMYK litategund -Name[it]=Modello di colore CMYK -Name[ja]=CMYK カラーモデル -Name[km]=គំរូពណ៌ CMYK -Name[lt]=CMYK spalvų modelis -Name[ms]=Model Warna CMYK -Name[nb]=CMYK-fargemodell -Name[nds]=CMYK-Klöörmodell -Name[ne]=CMYK रङ मोडेलल -Name[nl]=CMYK-kleurmodel -Name[nn]=CMYK-fargemodell -Name[pl]=Przestrzeń barw CMYK -Name[pt]=Modelo de Cor CMYK -Name[pt_BR]=Modelo de Cor CMYK -Name[ru]=CMYK -Name[se]=CMYK-ivdnemálle -Name[sk]=Model farieb CMYK -Name[sl]=Barvni model CMYK -Name[sr]=CMYK модел боја -Name[sr@Latn]=CMYK model boja -Name[sv]=CMYK-färgmodell -Name[ta]=CMYK வண்ண முறை -Name[tr]=CMYK Renk Modeli -Name[uk]=Модель кольору CMYK -Name[uz]=CMYK rang usuli -Name[uz@cyrillic]=CMYK ранг усули -Name[zh_CN]=CMYK 色彩模型 -Name[zh_TW]=CMYK 色彩模型 -Comment=Color model for 8-bit/channel CMYK images -Comment[bg]=Цветови модел за 8 битови изображения CMYK -Comment[ca]=Model de color d'enters de 8 bits per a canal d'imatges CMYK -Comment[cy]=Model lliw ar gyfer delweddau CMYK 8-did/sianel -Comment[da]=Farvemodel for 8-bit/kanal CMYK-billeder -Comment[de]=Farbmodell für 8-bit pro Kanal CMYK-Bilder -Comment[el]=Χρωματικό μοντέλο για 8-bit/κανάλι CMYK εικόνες -Comment[en_GB]=Colour model for 8-bit/channel CMYK images -Comment[es]=Modelo de color para imágenes de 8 bits/canal CMYK -Comment[et]=8-bitiste kanalitega CMYK-piltide värvimudel -Comment[eu]=8 bit/kanaleko CMYK irudien kolore-eredua -Comment[fa]=مدل رنگ برای تصاویر CMYK مجرا/۸ بیتی -Comment[fi]=Värimalli 8-bittisille/kanavaisille CMYK-kuville -Comment[fr]=Modèle de couleurs pour des images CMYK à 8 bits/plage -Comment[fy]=Kleurmodel foar 8-bit/kanaal CMYK-ôfbeeldings -Comment[gl]=Modelo de Cores para imaxer CMYK de 8-bit/canal -Comment[he]=מודל צבעים עבור תמונות CMYK של 8 סיביות/ערוצים -Comment[hi]=8-बिट/चैनल सीएमवायके छवियों के लिए रंग नमूना -Comment[hu]=Színmodell 8 bit/csatorna CMYK képekhez -Comment[is]=Litategund fyrir 8-bita/rásir CMYK myndir -Comment[it]=Modello di colore per immagini CMYK a canale di 8 bit -Comment[ja]=8 ビット/チャンネル CMYK 画像のためのカラーモデル -Comment[km]=គំរូពណ៌សម្រាប់រូបភាព CMYK ៨ ប៊ីតក្នុងមួយឆានែល -Comment[ms]=Model warna bagi imej CMYK 8-bit/saluran -Comment[nb]=Fargemodell for CMYK-bilder med 8 bit per kanal -Comment[nds]=Klöörmodell för CMYK-Biller mit 8-Bit Heeltall per Kanaal -Comment[ne]=८-बिट/च्यानल CMYK छविहरूका लागि रङ मोडेल -Comment[nl]=Kleurmodel voor 8-bit/kanaal CMYK-afbeeldingen -Comment[nn]=Fargemodell for CMYK-bilete med 8 bit per kanal -Comment[pl]=Przestrzeń barw dla obrazków CMYK 8 bitów/kanał -Comment[pt]=Modelo de cor para imagens CMYK com 8 bits por canal -Comment[pt_BR]=Modelo de cor para imagens com 8-bits de canal CMYK -Comment[ru]=Цветовое пространство CMYK (8-бит/канал) -Comment[se]=CMYK-ivdnemálle mas lea 8 bihttá kanálas -Comment[sk]=Model farieb pre CMYK obrázky s 8 bitmi na kanál -Comment[sl]=Barvni model za slike CMYK z 8 biti/kanal -Comment[sr]=Модел боја за CMYK слике са 8 битова по каналу -Comment[sr@Latn]=Model boja za CMYK slike sa 8 bitova po kanalu -Comment[sv]=Färgmodell för 8 bitar/kanal CMYK-bilder -Comment[ta]=8/பிட்/வழி CMYK பிம்பங்களுக்கான வண்ண முறை -Comment[tr]=8-bit/kanal CMYK görüntüler için renk modeli -Comment[uk]=Модель кольору CMYK для зображень 8-біт/каналів -Comment[zh_CN]=八位/通道 CMYK 图像的色彩模型 -Comment[zh_TW]=8-bit/色頻的 CMYK 圖片色彩模型 -ServiceTypes=Krita/ColorSpace -Type=Service -X-KDE-Library=kritacmykplugin -X-Krita-Version=2 - diff --git a/krita/colorspaces/cmyk_u8/templates/.directory b/krita/colorspaces/cmyk_u8/templates/.directory deleted file mode 100644 index f69b12ea..00000000 --- a/krita/colorspaces/cmyk_u8/templates/.directory +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Name=CMYK -Name[fr]=CMJN -Name[hi]=सीएमवायके -X-KDE-DefaultTab=true diff --git a/krita/colorspaces/cmyk_u8/templates/Makefile.am b/krita/colorspaces/cmyk_u8/templates/Makefile.am deleted file mode 100644 index 7a975df8..00000000 --- a/krita/colorspaces/cmyk_u8/templates/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -templates_DATA = .directory white_2000x800.desktop -templatesdir = $(kde_datadir)/krita/templates/cmyk - -templatesrc_DATA = white_2000x800.kra -templatesrcdir = $(kde_datadir)/krita/templates/cmyk/.source - -templatesicon_ICON = AUTO -templatesicondir = $(kde_datadir)/krita/icons diff --git a/krita/colorspaces/cmyk_u8/templates/cr48-action-template_cmyk_empty.png b/krita/colorspaces/cmyk_u8/templates/cr48-action-template_cmyk_empty.png Binary files differdeleted file mode 100644 index 4e237472..00000000 --- a/krita/colorspaces/cmyk_u8/templates/cr48-action-template_cmyk_empty.png +++ /dev/null diff --git a/krita/colorspaces/cmyk_u8/templates/crsc-action-template_cmyk_empty.svgz b/krita/colorspaces/cmyk_u8/templates/crsc-action-template_cmyk_empty.svgz Binary files differdeleted file mode 100644 index a1ad0ae5..00000000 --- a/krita/colorspaces/cmyk_u8/templates/crsc-action-template_cmyk_empty.svgz +++ /dev/null diff --git a/krita/colorspaces/cmyk_u8/templates/white_2000x800.desktop b/krita/colorspaces/cmyk_u8/templates/white_2000x800.desktop deleted file mode 100644 index b1632e51..00000000 --- a/krita/colorspaces/cmyk_u8/templates/white_2000x800.desktop +++ /dev/null @@ -1,100 +0,0 @@ -[Desktop Entry] -Type=Link -URL=.source/white_2000x800.kra -Icon=template_cmyk_empty -Name=White 2000 x 800 -Name[bg]=Бяло 2000x800 -Name[br]=Gwenn 2000 x 800 -Name[ca]=Blanc 2000 x 800 -Name[cy]=Gwyn 2000 x 800 -Name[da]=Hvidt 2000 x 800 -Name[de]=Weiß 2000 x 800 -Name[el]=Λευκό 2000 x 800 -Name[es]=2000 x 800 blanco -Name[et]=Valge 2000 x 800 -Name[eu]=Zuria 2000 x 800 -Name[fa]=سفید ۸۰۰ × ۲۰۰۰ -Name[fi]=Valkoinen 2000 x 800 -Name[fr]=Image blanche 2000 x 800 -Name[fy]=Wyt 2000 x 800 -Name[ga]=Bán 2000×800 -Name[gl]=Branco 2000 x 800 -Name[he]=לבן 2000 x 800 -Name[hi]=सफेद 2000 x 800 -Name[hu]=fehér 2000 x 800 -Name[is]=Hvít 2000 x 800 -Name[it]=Bianco 2000 × 800 -Name[ja]=白 2000 x 800 -Name[km]=ពណ៌ស 2000 x 800 -Name[lt]=Baltas 2000 x 800 -Name[lv]=Balts 2000 x 800 -Name[ms]=Putih 2000 x 800 -Name[nb]=Hvit 2000 x 800 -Name[nds]=Witt 2000 x 800 -Name[ne]=सेतो २००० x ८०० -Name[nl]=Wit 2000 x 800 -Name[nn]=Kvitt 2000 × 800 -Name[pl]=Biały 2000 x 800 -Name[pt]=Branca 2000 x 800 -Name[pt_BR]=2000 x 800 em Branco -Name[ru]=Белый 2000x800 -Name[se]=Vilges 2000 × 800 -Name[sk]=Biely 2000 x 800 -Name[sl]=Bela 2000 x 800 -Name[sr]=Бела 2000 x 800 -Name[sr@Latn]=Bela 2000 x 800 -Name[sv]=Vit 2000 x 800 -Name[ta]=வெள்ளை 2000 x 800 -Name[tr]=Beyaz 2000 x 800 -Name[uk]=Біле 2000 x 800 -Name[uz]=Oq 2000 x 800 -Name[uz@cyrillic]=Оқ 2000 x 800 -Name[zh_CN]=白色 2000 x 800 -Name[zh_TW]=白色 2000 x 800 -Comment=Creates a white CMYK image of 2000 x 800 pixels. -Comment[bg]=Създаване на бяло изображения CMYK с размери 2000x800 пиксела. -Comment[ca]=Crea una imatge blanca CMYK de 2000 x 800 píxels. -Comment[cy]=Creu delwedd CMYK wen o 2000 x 800 picsel. -Comment[da]=Laver et hvidt CMYK-billede på 2000 x 800 biledpunkter. -Comment[de]=Erstellt ein weißes CMYK-Bild mit 2000 x 800 Pixeln. -Comment[el]=Δημιουργεί μία λευκή CMYK εικόνα μεγέθους 2000 x 800 εικονοστοιχείων. -Comment[es]=Crea una imagen CMYK blanca de 2000 x 800 píxeles. -Comment[et]=Loob valge CMYK-pildi mõõtmetega 2000 x 800 pikslit. -Comment[eu]=2000 x 800 pixeleko CMYK irudi zuri bat sortzen du. -Comment[fa]=یک تصویر سفید CMYK ۲۰۰۰ × ۸۰۰ تصویردانهای ایجاد میکند. -Comment[fi]=Luo valkoisen 2000 x 800 pikselin CMYK-kuvan. -Comment[fr]=Crée une image CMYK blanche de 2000 x 800 pixels. -Comment[fy]=Makket in wite CMYK-ôfbeelding oan fan 2000 x 2000 byldpunten. -Comment[gl]=Cria unha imaxe CMYK branca de 2000 x 800 pixels. -Comment[he]=יצירת תמונת CMYK לבנה בגודל 2000 x 800 פיקסלים -Comment[hi]=2000 x 800 पिक्सेल की सफेद सीएमवायके छवि बनाता है. -Comment[hu]=Létrehoz egy fehér, 2000 x 800 képpontos CMYK képet. -Comment[is]=Býr til hvíta CMYK mynd með 2000 x 800 punktum. -Comment[it]=Crea un'immagine CMYK bianca di 2000 × 800 pixel. -Comment[ja]=2000 x 800 ピクセルの CMYK 画像を作成 -Comment[km]=បង្កើតរូបភាព CMYK ពណ៌សមួយ ដែលមានទំហំ ២០០០ x ៨០០ ភីកសែល ។ -Comment[ms]=Cipta imej CMYK putih 2000 x 800 piksel. -Comment[nb]=Lager et hvitt CMYK-bilde på 2000 x 800 piksler. -Comment[nds]=Stellt en wittet CMYK-Bild mit 2000 x 800 Pixels op. -Comment[ne]=२००० x ८०० पिक्सेलको सेतो CMYK छवि सिर्जना गर्दछ । -Comment[nl]=Maakt een witte CMYK-afbeelding aan van 2000 x 2000 pixels. -Comment[nn]=Lagar eit kvitt CMYK-bilete på 2000 × 800 pikslar. -Comment[pl]=Tworzy biały obrazek CMYK o rozmiarach 2000 na 800 pikseli. -Comment[pt]=Cria uma imagem CMYK branca com 2000 x 800 pontos. -Comment[pt_BR]=Cria uma imagem CMYK em branco de 2000 x 800 pixéis. -Comment[ru]=Рисунок CMYK, 2000x800, белый фон -Comment[se]=Ráhkada CMYK-gova mas leat 2000 × 800 govvačuoggá. -Comment[sk]=Vytvorí biely obrázok CMYK s rozmermi 2000 x 800 pixelov. -Comment[sl]=Ustvari belo sliko CMYK velikosti 2000 x 800 pik. -Comment[sr]=Прави белу CMYK слику са 2000 x 800 пиксела. -Comment[sr@Latn]=Pravi belu CMYK sliku sa 2000 x 800 piksela. -Comment[sv]=Skapar en vit CMYK-bild med 2000 x 800 bildpunkter. -Comment[ta]=2000 x 800 படத்துணுக்குகளில் ஒரு வெள்ளை CMYK பிம்பத்தை உருவாக்குகிறது. -Comment[tr]=2000 x 800 piksel ebadında beyaz bir CMYK görüntü oluşturur. -Comment[uk]=Створює біле зображення CMYK 2000 x 800 пікселів. -Comment[uz]=Oʻlchami 2000 x 800 nuqta boʻlgan oq CMYK rasmni yaratish. -Comment[uz@cyrillic]=Ўлчами 2000 x 800 нуқта бўлган оқ CMYK расмни яратиш. -Comment[zh_CN]=创建 2000 x 800 像素的白色 CMYK 图像。 -Comment[zh_TW]=建立一個白色,2000 x 800 像素的 CMYK 圖片。 -X-Krita-Version=2 - diff --git a/krita/colorspaces/cmyk_u8/templates/white_2000x800.kra b/krita/colorspaces/cmyk_u8/templates/white_2000x800.kra Binary files differdeleted file mode 100644 index 7fb7a166..00000000 --- a/krita/colorspaces/cmyk_u8/templates/white_2000x800.kra +++ /dev/null |