Browse Source

rename the following methods:

tqparent parent
tqmask mask


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
tags/v3.5.13
tpearson 8 years ago
parent
commit
04766b207a
100 changed files with 950 additions and 950 deletions
  1. 3
    3
      chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc
  2. 3
    3
      chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h
  3. 32
    32
      chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc
  4. 16
    16
      chalk/chalkcolor/colorspaces/kis_lab_colorspace.h
  5. 39
    39
      chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc
  6. 11
    11
      chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h
  7. 2
    2
      chalk/chalkcolor/kis_abstract_colorspace.cc
  8. 8
    8
      chalk/chalkcolor/kis_abstract_colorspace.h
  9. 3
    3
      chalk/chalkcolor/kis_colorspace.h
  10. 3
    3
      chalk/chalkcolor/kis_colorspace_iface.cc
  11. 1
    1
      chalk/chalkcolor/kis_colorspace_iface.h
  12. 2
    2
      chalk/chalkcolor/kis_f16half_base_colorspace.h
  13. 2
    2
      chalk/chalkcolor/kis_f32_base_colorspace.h
  14. 2
    2
      chalk/chalkcolor/kis_u16_base_colorspace.h
  15. 2
    2
      chalk/chalkcolor/kis_u8_base_colorspace.h
  16. 4
    4
      chalk/colorspaces/cmyk_u16/cmyk_u16_plugin.cc
  17. 1
    1
      chalk/colorspaces/cmyk_u16/cmyk_u16_plugin.h
  18. 39
    39
      chalk/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc
  19. 12
    12
      chalk/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h
  20. 4
    4
      chalk/colorspaces/cmyk_u8/cmyk_plugin.cc
  21. 1
    1
      chalk/colorspaces/cmyk_u8/cmyk_plugin.h
  22. 39
    39
      chalk/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc
  23. 12
    12
      chalk/colorspaces/cmyk_u8/kis_cmyk_colorspace.h
  24. 4
    4
      chalk/colorspaces/gray_u16/gray_u16_plugin.cc
  25. 1
    1
      chalk/colorspaces/gray_u16/gray_u16_plugin.h
  26. 39
    39
      chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc
  27. 12
    12
      chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h
  28. 4
    4
      chalk/colorspaces/gray_u8/gray_plugin.cc
  29. 1
    1
      chalk/colorspaces/gray_u8/gray_plugin.h
  30. 81
    81
      chalk/colorspaces/gray_u8/kis_gray_colorspace.cc
  31. 13
    13
      chalk/colorspaces/gray_u8/kis_gray_colorspace.h
  32. 20
    20
      chalk/colorspaces/lms_f32/kis_lms_f32_colorspace.cc
  33. 5
    5
      chalk/colorspaces/lms_f32/kis_lms_f32_colorspace.h
  34. 4
    4
      chalk/colorspaces/lms_f32/lms_f32_plugin.cc
  35. 1
    1
      chalk/colorspaces/lms_f32/lms_f32_plugin.h
  36. 39
    39
      chalk/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.cc
  37. 16
    16
      chalk/colorspaces/rgb_f16half/kis_rgb_f16half_colorspace.h
  38. 4
    4
      chalk/colorspaces/rgb_f16half/rgb_f16half_plugin.cc
  39. 1
    1
      chalk/colorspaces/rgb_f16half/rgb_f16half_plugin.h
  40. 1
    1
      chalk/colorspaces/rgb_f16half/tests/kis_rgb_f16half_colorspace_tester.cc
  41. 39
    39
      chalk/colorspaces/rgb_f32/kis_rgb_f32_colorspace.cc
  42. 16
    16
      chalk/colorspaces/rgb_f32/kis_rgb_f32_colorspace.h
  43. 4
    4
      chalk/colorspaces/rgb_f32/rgb_f32_plugin.cc
  44. 1
    1
      chalk/colorspaces/rgb_f32/rgb_f32_plugin.h
  45. 1
    1
      chalk/colorspaces/rgb_f32/tests/kis_strategy_colorspace_rgb_f32_tester.cc
  46. 39
    39
      chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.cc
  47. 16
    16
      chalk/colorspaces/rgb_u16/kis_rgb_u16_colorspace.h
  48. 4
    4
      chalk/colorspaces/rgb_u16/rgb_u16_plugin.cc
  49. 1
    1
      chalk/colorspaces/rgb_u16/rgb_u16_plugin.h
  50. 1
    1
      chalk/colorspaces/rgb_u16/tests/kis_strategy_colorspace_rgb_u16_tester.cc
  51. 109
    109
      chalk/colorspaces/rgb_u8/kis_rgb_colorspace.cc
  52. 17
    17
      chalk/colorspaces/rgb_u8/kis_rgb_colorspace.h
  53. 4
    4
      chalk/colorspaces/rgb_u8/rgb_plugin.cc
  54. 1
    1
      chalk/colorspaces/rgb_u8/rgb_plugin.h
  55. 2
    2
      chalk/colorspaces/wet/kis_wet_colorspace.cc
  56. 2
    2
      chalk/colorspaces/wet/kis_wet_colorspace.h
  57. 1
    1
      chalk/colorspaces/wet/kis_wet_palette_widget.cc
  58. 1
    1
      chalk/colorspaces/wet/kis_wet_palette_widget.h
  59. 7
    7
      chalk/colorspaces/wet/kis_wetop.cc
  60. 2
    2
      chalk/colorspaces/wet/kis_wetop.h
  61. 6
    6
      chalk/colorspaces/wet/wet_plugin.cc
  62. 1
    1
      chalk/colorspaces/wet/wet_plugin.h
  63. 2
    2
      chalk/colorspaces/wet/wetphysicsfilter.cc
  64. 7
    7
      chalk/colorspaces/wetsticky/brushop/kis_wsbrushop.cc
  65. 3
    3
      chalk/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.cc
  66. 1
    1
      chalk/colorspaces/wetsticky/brushop/wsbrushpaintop_plugin.h
  67. 10
    10
      chalk/colorspaces/wetsticky/kis_wet_sticky_colorspace.cc
  68. 3
    3
      chalk/colorspaces/wetsticky/kis_wet_sticky_colorspace.h
  69. 2
    2
      chalk/colorspaces/wetsticky/kis_ws_engine_filter.cc
  70. 1
    1
      chalk/colorspaces/wetsticky/kis_ws_engine_filter.h
  71. 3
    3
      chalk/colorspaces/wetsticky/wet_sticky_plugin.cc
  72. 1
    1
      chalk/colorspaces/wetsticky/wet_sticky_plugin.h
  73. 3
    3
      chalk/colorspaces/wetsticky/ws/anim.c
  74. 6
    6
      chalk/colorspaces/wetsticky/ws/cmap.c
  75. 6
    6
      chalk/colorspaces/wetsticky/ws/x_interface.c
  76. 16
    16
      chalk/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.cc
  77. 4
    4
      chalk/colorspaces/ycbcr_u16/kis_ycbcr_u16_colorspace.h
  78. 4
    4
      chalk/colorspaces/ycbcr_u16/ycbcr_u16_plugin.cc
  79. 1
    1
      chalk/colorspaces/ycbcr_u16/ycbcr_u16_plugin.h
  80. 15
    15
      chalk/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.cc
  81. 5
    5
      chalk/colorspaces/ycbcr_u8/kis_ycbcr_u8_colorspace.h
  82. 4
    4
      chalk/colorspaces/ycbcr_u8/ycbcr_u8_plugin.cc
  83. 1
    1
      chalk/colorspaces/ycbcr_u8/ycbcr_u8_plugin.h
  84. 3
    3
      chalk/core/createdcop.py
  85. 5
    5
      chalk/core/kis_alpha_mask.cc
  86. 9
    9
      chalk/core/kis_alpha_mask.h
  87. 8
    8
      chalk/core/kis_brush.cc
  88. 5
    5
      chalk/core/kis_brush.h
  89. 2
    2
      chalk/core/kis_fill_painter.cc
  90. 1
    1
      chalk/core/kis_fill_painter.h
  91. 2
    2
      chalk/core/kis_filter.h
  92. 2
    2
      chalk/core/kis_filter_config_widget.cc
  93. 1
    1
      chalk/core/kis_filter_config_widget.h
  94. 10
    10
      chalk/core/kis_group_layer.cc
  95. 2
    2
      chalk/core/kis_group_layer.h
  96. 25
    25
      chalk/core/kis_image.cc
  97. 11
    11
      chalk/core/kis_image.h
  98. 2
    2
      chalk/core/kis_imagepipe_brush.cc
  99. 2
    2
      chalk/core/kis_imagepipe_brush.h
  100. 0
    0
      chalk/core/kis_iteratorpixeltrait.h

+ 3
- 3
chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc View File

@@ -38,9 +38,9 @@ namespace {
const TQ_UINT8 PIXEL_MASK = 0;
}

KisAlphaColorSpace::KisAlphaColorSpace(KisColorSpaceFactoryRegistry * tqparent,
KisAlphaColorSpace::KisAlphaColorSpace(KisColorSpaceFactoryRegistry * parent,
KisProfile *p) :
KisU8BaseColorSpace(KisID("ALPHA", i18n("Alpha tqmask")), TYPE_GRAY_8, icSigGrayData, tqparent, p)
KisU8BaseColorSpace(KisID("ALPHA", i18n("Alpha mask")), TYPE_GRAY_8, icSigGrayData, parent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 0, KisChannelInfo::ALPHA, KisChannelInfo::UINT8));
m_alphaPos = 0;
@@ -125,7 +125,7 @@ bool KisAlphaColorSpace::convertPixelsTo(const TQ_UINT8 *src,
}


//XXX bitblt of ColorSpaceAlpha does not take tqmask into consideration as this is probably not
//XXX bitblt of ColorSpaceAlpha does not take mask into consideration as this is probably not
// used ever
void KisAlphaColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dststride,

+ 3
- 3
chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h View File

@@ -24,12 +24,12 @@
#include "kis_u8_base_colorspace.h"

/**
* The alpha tqmask is a special color strategy that treats all pixels as
* alpha value with a colour common to the tqmask. The default color is white.
* The alpha mask is a special color strategy that treats all pixels as
* alpha value with a colour common to the mask. The default color is white.
*/
class KisAlphaColorSpace : public KisU8BaseColorSpace {
public:
KisAlphaColorSpace(KisColorSpaceFactoryRegistry * tqparent,
KisAlphaColorSpace(KisColorSpaceFactoryRegistry * parent,
KisProfile *p);
virtual ~KisAlphaColorSpace();


+ 32
- 32
chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc View File

@@ -33,10 +33,10 @@
#include "kis_color_conversions.h"
#include "kis_integer_maths.h"

KisLabColorSpace::KisLabColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p)
KisLabColorSpace::KisLabColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p)
: KisU16BaseColorSpace(KisID("LABA", i18n("L*a*b* (16-bit integer/channel)")),
COLORSPACE_SH(PT_Lab)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1),
icSigLabData, tqparent, p)
icSigLabData, parent, p)

{
m_channels.push_back(new KisChannelInfo(i18n("Lightness"), i18n("L"), CHANNEL_L * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQColor(100,100,100)));
@@ -267,19 +267,19 @@ void KisLabColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStrid
while (rows > 0) {
const Pixel *src = reinterpret_cast<const Pixel *>(srcRowStart);
Pixel *dst = reinterpret_cast<Pixel *>(dstRowStart);
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {

TQ_UINT16 srcAlpha = src->alpha;

// apply the alphatqmask
if (tqmask != 0) {
if (*tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, *tqmask);
// apply the alphamask
if (mask != 0) {
if (*mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, *mask);
}
tqmask++;
mask++;
}

if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -351,20 +351,20 @@ void KisLabColorSpace::compositeErase(TQ_UINT8 *dst,
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = srcAlphaMask;

for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
TQ_UINT16 srcAlpha = s->alpha;

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -381,7 +381,7 @@ void KisLabColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 U8_opacity,
TQ_INT32 rows,
@@ -395,7 +395,7 @@ void KisLabColorSpace::bitBlt(TQ_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -425,16 +425,16 @@ void KisLabColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
//compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
//compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride, rows, cols, U8_opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -469,22 +469,22 @@ void KisLabColorSpace::bitBlt(TQ_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
//compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
//compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
//compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
//compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
//compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
//compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -493,24 +493,24 @@ void KisLabColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
//compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
//compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
//compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
//compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
CHANNEL_ALPHA, NUM_COLOR_CHANNELS, NUM_CHANNELS>(
dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride,
dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:

+ 16
- 16
chalk/chalkcolor/colorspaces/kis_lab_colorspace.h View File

@@ -29,7 +29,7 @@

class KisLabColorSpace : public KisU16BaseColorSpace {
public:
KisLabColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
KisLabColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
virtual ~KisLabColorSpace();

public:
@@ -87,22 +87,22 @@ protected:
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 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
/*
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeHue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeSaturation(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeValue(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeColor(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
*/
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);

private:
struct Pixel {
@@ -145,7 +145,7 @@ public:

virtual icColorSpaceSignature colorSpaceSignature() { return icSigLabData; };
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisLabColorSpace(tqparent, p); };
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisLabColorSpace(parent, p); };

virtual TQString defaultProfile() { return "Lab built-in - (lcms internal)"; };
};

+ 39
- 39
chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc View File

@@ -39,9 +39,9 @@
// XXX: Maybe use TYPE_XYZ_DBL for an extra stimulating performance hit? People shouldn't depend
// on this fallback...

KisXyzColorSpace::KisXyzColorSpace(KisColorSpaceFactoryRegistry * tqparent,
KisXyzColorSpace::KisXyzColorSpace(KisColorSpaceFactoryRegistry * parent,
KisProfile *p) :
KisU16BaseColorSpace(KisID("XYZA", i18n("XYZ/Alpha")), (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)), icSigCmykData, tqparent, p)
KisU16BaseColorSpace(KisID("XYZA", i18n("XYZ/Alpha")), (COLORSPACE_SH(PT_XYZ)|CHANNELS_SH(3)|BYTES_SH(2)|EXTRA_SH(1)), icSigCmykData, parent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("X"), i18n("X"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8));
m_channels.push_back(new KisChannelInfo(i18n("Y"), i18n("Y"), 1, KisChannelInfo::COLOR, KisChannelInfo::UINT8));
@@ -125,21 +125,21 @@ void KisXyzColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStrid

const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {

TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}

if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -198,7 +198,7 @@ void KisXyzColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStrid
const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
TQ_INT32 columns = numColumns; \
const TQ_UINT8 *tqmask = maskRowStart; \
const TQ_UINT8 *mask = maskRowStart; \
\
while (columns > 0) { \
\
@@ -207,13 +207,13 @@ void KisXyzColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStrid
\
srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
if (tqmask != 0) { \
TQ_UINT8 U8_tqmask = *tqmask; \
if (mask != 0) { \
TQ_UINT8 U8_mask = *mask; \
\
if (U8_tqmask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
if (U8_mask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
} \
tqmask++; \
mask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -437,20 +437,20 @@ void KisXyzColorSpace::compositeErase(TQ_UINT8 *dst,
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = srcAlphaMask;

for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
TQ_UINT16 srcAlpha = s -> alpha;

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}
d -> alpha = UINT16_MULT(srcAlpha, d -> alpha);
}
@@ -467,7 +467,7 @@ void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 U8_opacity,
TQ_INT32 rows,
@@ -481,7 +481,7 @@ void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -510,16 +510,16 @@ void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride, rows, cols, U8_opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -554,22 +554,22 @@ void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
//compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
//compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
//compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
//compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -578,24 +578,24 @@ void KisXyzColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, xyz::MAX_CHANNEL_XYZ, xyz::MAX_CHANNEL_XYZA>(
dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride,
dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:

+ 11
- 11
chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h View File

@@ -43,7 +43,7 @@ public:
};

public:
KisXyzColorSpace(KisColorSpaceFactoryRegistry * tqparent,
KisXyzColorSpace(KisColorSpaceFactoryRegistry * parent,
KisProfile *p);
virtual ~KisXyzColorSpace();

@@ -87,16 +87,16 @@ public:
KisCompositeOpList userVisiblecompositeOps() const;

protected:
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);

private:


+ 2
- 2
chalk/chalkcolor/kis_abstract_colorspace.cc View File

@@ -63,9 +63,9 @@ class KisColorAdjustmentImpl : public KisColorAdjustment
KisAbstractColorSpace::KisAbstractColorSpace(const KisID& id,
DWORD cmType,
icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * tqparent,
KisColorSpaceFactoryRegistry * parent,
KisProfile *p)
: m_parent( tqparent )
: m_parent( parent )
, m_profile( p )
, m_id( id )
, m_cmType( cmType )

+ 8
- 8
chalk/chalkcolor/kis_abstract_colorspace.h View File

@@ -53,13 +53,13 @@ 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 tqparent the registry that owns this instance
* @param parent the registry that owns this instance
* @param profile the profile this colorspace uses for transforms
*/
KisAbstractColorSpace(const KisID & id,
DWORD cmType,
icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * tqparent,
KisColorSpaceFactoryRegistry * parent,
KisProfile *profile);

void init();
@@ -229,7 +229,7 @@ protected:

const ColorType *src = reinterpret_cast<const ColorType*>(srcRowStart);
ColorType *dst = reinterpret_cast<ColorType*>(dstRowStart);
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {
@@ -237,12 +237,12 @@ protected:
ColorType srcAlpha = src[AlphaPos];
ColorType dstAlpha = dst[AlphaPos];

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = nativeMult(srcAlpha, uint8ToNative(*tqmask));
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = nativeMult(srcAlpha, uint8ToNative(*mask));
mask++;
}

if (opacity != OPACITY_OPAQUE) {

+ 3
- 3
chalk/chalkcolor/kis_colorspace.h View File

@@ -314,14 +314,14 @@ public:
virtual void multiplyAlpha(TQ_UINT8 * pixels, TQ_UINT8 alpha, TQ_INT32 nPixels) = 0;

/**
* Applies the specified 8-bit alpha tqmask to the pixels. We assume that there are just
* Applies the specified 8-bit alpha mask to the pixels. We assume that there are just
* as many alpha values as pixels but we do not check this; the alpha values
* are assumed to be 8-bits.
*/
virtual void applyAlphaU8Mask(TQ_UINT8 * pixels, TQ_UINT8 * alpha, TQ_INT32 nPixels) = 0;

/**
* Applies the inverted 8-bit alpha tqmask to the pixels. We assume that there are just
* Applies the inverted 8-bit alpha mask to the pixels. We assume that there are just
* as many alpha values as pixels but we do not check this; the alpha values
* are assumed to be 8-bits.
*/
@@ -436,7 +436,7 @@ public:

virtual icColorSpaceSignature colorSpaceSignature() = 0;

virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *) = 0;
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *) = 0;

/**
* Returns the default icc profile for use with this colorspace. This may be ""

+ 3
- 3
chalk/chalkcolor/kis_colorspace_iface.cc View File

@@ -24,10 +24,10 @@

#include <dcopclient.h>

KisColorSpaceIface::KisColorSpaceIface( KisColorSpace * tqparent )
: DCOPObject(tqparent->id().id().latin1())
KisColorSpaceIface::KisColorSpaceIface( KisColorSpace * parent )
: DCOPObject(parent->id().id().latin1())
{
m_parent = tqparent;
m_parent = parent;
}

TQByteArray KisColorSpaceIface::invertColor(TQByteArray src, TQ_INT32 nPixels)

+ 1
- 1
chalk/chalkcolor/kis_colorspace_iface.h View File

@@ -30,7 +30,7 @@ class KisColorSpaceIface : public DCOPObject
{
K_DCOP
public:
KisColorSpaceIface( KisColorSpace * tqparent );
KisColorSpaceIface( KisColorSpace * parent );
k_dcop:

TQByteArray invertColor(TQByteArray src, TQ_INT32 nPixels);

+ 2
- 2
chalk/chalkcolor/kis_f16half_base_colorspace.h View File

@@ -63,9 +63,9 @@ class KisF16HalfBaseColorSpace : public KisAbstractColorSpace {
public:

KisF16HalfBaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * tqparent,
KisColorSpaceFactoryRegistry * parent,
KisProfile *p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p)
{
m_alphaSize = sizeof(half);
};

+ 2
- 2
chalk/chalkcolor/kis_f32_base_colorspace.h View File

@@ -58,8 +58,8 @@ class KisF32BaseColorSpace : public KisAbstractColorSpace {

public:

KisF32BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry * tqparent, KisProfile *p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p)
KisF32BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature, KisColorSpaceFactoryRegistry * parent, KisProfile *p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p)
{
m_alphaSize = sizeof(float);
};

+ 2
- 2
chalk/chalkcolor/kis_u16_base_colorspace.h View File

@@ -37,10 +37,10 @@ public:
public:

KisU16BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * tqparent,
KisColorSpaceFactoryRegistry * parent,
KisProfile *p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature,
tqparent,
parent,
p)
{
m_alphaSize = sizeof(TQ_UINT16);

+ 2
- 2
chalk/chalkcolor/kis_u8_base_colorspace.h View File

@@ -34,9 +34,9 @@ class KisU8BaseColorSpace : public KisAbstractColorSpace {
public:

KisU8BaseColorSpace(const KisID & id, DWORD cmType, icColorSpaceSignature colorSpaceSignature,
KisColorSpaceFactoryRegistry * tqparent,
KisColorSpaceFactoryRegistry * parent,
KisProfile *p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, tqparent, p)
: KisAbstractColorSpace(id, cmType, colorSpaceSignature, parent, p)
{
m_alphaSize = sizeof(TQ_UINT8);
};

+ 4
- 4
chalk/colorspaces/cmyk_u16/cmyk_u16_plugin.cc View File

@@ -34,14 +34,14 @@ typedef KGenericFactory<CMYKU16Plugin> CMYKU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_cmyk_u16_plugin, CMYKU16PluginFactory( "chalk" ) )


CMYKU16Plugin::CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
: KParts::Plugin(tqparent, name)
CMYKU16Plugin::CMYKU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKU16PluginFactory::instance());

if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );

KisColorSpace * colorSpaceCMYKU16 = new KisCmykU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykU16ColorSpaceFactory();

+ 1
- 1
chalk/colorspaces/cmyk_u16/cmyk_u16_plugin.h View File

@@ -29,7 +29,7 @@ class CMYKU16Plugin : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
CMYKU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
CMYKU16Plugin(TQObject *parent, const char *name, const TQStringList &);
virtual ~CMYKU16Plugin();

};

+ 39
- 39
chalk/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.cc View File

@@ -40,8 +40,8 @@ namespace {
const TQ_INT32 MAX_CHANNEL_CMYKA = 5;
}

KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, tqparent, p)
KisCmykU16ColorSpace::KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
KisU16BaseColorSpace(KisID("CMYKA16", i18n("CMYK (16-bit integer/channel)")), TYPE_CMYK5_16, icSigCmykData, parent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Cyan"), i18n("C"), 0 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::cyan));
m_channels.push_back(new KisChannelInfo(i18n("Magenta"), i18n("M"), 1 * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16), TQt::magenta));
@@ -216,21 +216,21 @@ void KisCmykU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS

const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {

TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}

if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -290,7 +290,7 @@ void KisCmykU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
TQ_INT32 columns = numColumns; \
const TQ_UINT8 *tqmask = maskRowStart; \
const TQ_UINT8 *mask = maskRowStart; \
\
while (columns > 0) { \
\
@@ -299,13 +299,13 @@ void KisCmykU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
\
srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
if (tqmask != 0) { \
TQ_UINT8 U8_tqmask = *tqmask; \
if (mask != 0) { \
TQ_UINT8 U8_mask = *mask; \
\
if (U8_tqmask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
if (U8_mask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
} \
tqmask++; \
mask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -528,20 +528,20 @@ void KisCmykU16ColorSpace::compositeErase(TQ_UINT8 *dst,
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = srcAlphaMask;

for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
TQ_UINT16 srcAlpha = s->alpha;

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -559,7 +559,7 @@ void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 U8_opacity,
TQ_INT32 rows,
@@ -573,7 +573,7 @@ void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -602,16 +602,16 @@ void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride, rows, cols, U8_opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_CYAN:
//compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -646,22 +646,22 @@ void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
//compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
//compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
//compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
//compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -670,24 +670,24 @@ void KisCmykU16ColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_CMYK, MAX_CHANNEL_CMYKA>(
dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride,
dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:

+ 12
- 12
chalk/colorspaces/cmyk_u16/kis_cmyk_u16_colorspace.h View File

@@ -39,7 +39,7 @@ public:
};

public:
KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
KisCmykU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
virtual ~KisCmykU16ColorSpace();

virtual bool willDegrade(ColorSpaceIndependence independence)
@@ -78,16 +78,16 @@ protected:
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 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);

private:
friend class KisCmykU16ColorSpaceTester;
@@ -115,7 +115,7 @@ public:

virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; };

virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykU16ColorSpace(tqparent, p); };
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykU16ColorSpace(parent, 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"; };
};

+ 4
- 4
chalk/colorspaces/cmyk_u8/cmyk_plugin.cc View File

@@ -39,13 +39,13 @@ typedef KGenericFactory<CMYKPlugin> CMYKPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkcmykplugin, CMYKPluginFactory( "chalk" ) )


CMYKPlugin::CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &)
: KParts::Plugin(tqparent, name)
CMYKPlugin::CMYKPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(CMYKPluginFactory::instance());
if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );

KisColorSpace * colorSpaceCMYK = new KisCmykColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisCmykColorSpaceFactory();

+ 1
- 1
chalk/colorspaces/cmyk_u8/cmyk_plugin.h View File

@@ -29,7 +29,7 @@ class CMYKPlugin : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
CMYKPlugin(TQObject *tqparent, const char *name, const TQStringList &);
CMYKPlugin(TQObject *parent, const char *name, const TQStringList &);
virtual ~CMYKPlugin();



+ 39
- 39
chalk/colorspaces/cmyk_u8/kis_cmyk_colorspace.cc View File

@@ -37,8 +37,8 @@ namespace cmyk {
const TQ_INT32 MAX_CHANNEL_CMYKA = 5;
}

KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, tqparent, p)
KisCmykColorSpace::KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
KisU8BaseColorSpace(KisID("CMYK", i18n("CMYK")), TYPE_CMYK5_8, icSigCmykData, parent, 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));
@@ -214,21 +214,21 @@ void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri

const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
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;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask);
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT8_MULT(srcAlpha, U8_mask);
}
tqmask++;
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -288,7 +288,7 @@ void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri
const TQ_UINT8 *src = srcRowStart; \
TQ_UINT8 *dst = dstRowStart; \
TQ_INT32 columns = numColumns; \
const TQ_UINT8 *tqmask = maskRowStart; \
const TQ_UINT8 *mask = maskRowStart; \
\
while (columns > 0) { \
\
@@ -297,13 +297,13 @@ void KisCmykColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri
\
srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
if (tqmask != 0) { \
TQ_UINT8 U8_tqmask = *tqmask; \
if (mask != 0) { \
TQ_UINT8 U8_mask = *mask; \
\
if (U8_tqmask != OPACITY_OPAQUE) { \
srcAlpha = UINT8_MULT(srcAlpha, U8_tqmask); \
if (U8_mask != OPACITY_OPAQUE) { \
srcAlpha = UINT8_MULT(srcAlpha, U8_mask); \
} \
tqmask++; \
mask++; \
} \
\
if (srcAlpha != OPACITY_TRANSPARENT) { \
@@ -526,20 +526,20 @@ void KisCmykColorSpace::compositeErase(TQ_UINT8 *dst,
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = 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;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_tqmask);
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, U8_mask);
}
tqmask++;
mask++;
}
d->alpha = UINT8_MULT(srcAlpha, d->alpha);
}
@@ -556,7 +556,7 @@ void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 opacity,
TQ_INT32 rows,
@@ -569,7 +569,7 @@ void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -598,16 +598,16 @@ void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride, rows, cols, opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY_CYAN:
//compositeCopyCyan(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -642,22 +642,22 @@ void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
//compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
//compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
//compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
//compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -666,24 +666,24 @@ void KisCmykColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride,
dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
rows, cols, opacity, U8Mult(), Uint8ToU8(), U8OpacityTest());
break;
default:

+ 12
- 12
chalk/colorspaces/cmyk_u8/kis_cmyk_colorspace.h View File

@@ -37,7 +37,7 @@ public:
TQ_UINT16 alpha;
};
public:
KisCmykColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
KisCmykColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
virtual ~KisCmykColorSpace();


@@ -80,16 +80,16 @@ protected:
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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, 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 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, 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 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT8 opacity);

private:

@@ -118,7 +118,7 @@ public:

virtual icColorSpaceSignature colorSpaceSignature() { return icSigCmykData; };

virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisCmykColorSpace(tqparent, p); };
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisCmykColorSpace(parent, 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
};

+ 4
- 4
chalk/colorspaces/gray_u16/gray_u16_plugin.cc View File

@@ -35,14 +35,14 @@ typedef KGenericFactory<GRAYU16Plugin> GRAYU16PluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalk_gray_u16_plugin, GRAYU16PluginFactory( "chalk" ) )


GRAYU16Plugin::GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &)
: KParts::Plugin(tqparent, name)
GRAYU16Plugin::GRAYU16Plugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GRAYU16PluginFactory::instance());

if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );

KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0);
KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory();

+ 1
- 1
chalk/colorspaces/gray_u16/gray_u16_plugin.h View File

@@ -29,7 +29,7 @@ class GRAYU16Plugin : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
GRAYU16Plugin(TQObject *tqparent, const char *name, const TQStringList &);
GRAYU16Plugin(TQObject *parent, const char *name, const TQStringList &);
virtual ~GRAYU16Plugin();

};

+ 39
- 39
chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc View File

@@ -39,8 +39,8 @@ namespace {
const TQ_INT32 MAX_CHANNEL_GRAYA = 2;
}

KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, tqparent, p)
KisGrayU16ColorSpace::KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
KisU16BaseColorSpace(KisID("GRAYA16", i18n("Grayscale (16-bit integer/channel)")), TYPE_GRAYA_16, icSigGrayData, parent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), PIXEL_GRAY * sizeof(TQ_UINT16), KisChannelInfo::COLOR, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), PIXEL_ALPHA * sizeof(TQ_UINT16), KisChannelInfo::ALPHA, KisChannelInfo::UINT16, sizeof(TQ_UINT16)));
@@ -167,21 +167,21 @@ void KisGrayU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS

const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart);
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart);
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {

TQ_UINT16 srcAlpha = src[PIXEL_ALPHA];

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}

if (srcAlpha != U16_OPACITY_TRANSPARENT) {
@@ -238,7 +238,7 @@ void KisGrayU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
const TQ_UINT16 *src = reinterpret_cast<const TQ_UINT16 *>(srcRowStart); \
TQ_UINT16 *dst = reinterpret_cast<TQ_UINT16 *>(dstRowStart); \
TQ_INT32 columns = numColumns; \
const TQ_UINT8 *tqmask = maskRowStart; \
const TQ_UINT8 *mask = maskRowStart; \
\
while (columns > 0) { \
\
@@ -247,13 +247,13 @@ void KisGrayU16ColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
\
srcAlpha = TQMIN(srcAlpha, dstAlpha); \
\
if (tqmask != 0) { \
TQ_UINT8 U8_tqmask = *tqmask; \
if (mask != 0) { \
TQ_UINT8 U8_mask = *mask; \
\
if (U8_tqmask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_tqmask)); \
if (U8_mask != OPACITY_OPAQUE) { \
srcAlpha = UINT16_MULT(srcAlpha, UINT8_TO_UINT16(U8_mask)); \
} \
tqmask++; \
mask++; \
} \
\
if (srcAlpha != U16_OPACITY_TRANSPARENT) { \
@@ -473,20 +473,20 @@ void KisGrayU16ColorSpace::compositeErase(TQ_UINT8 *dst,
{
const Pixel *s = reinterpret_cast<const Pixel *>(src);
Pixel *d = reinterpret_cast<Pixel *>(dst);
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = srcAlphaMask;

for (TQ_INT32 i = cols; i > 0; i--, s++, d++)
{
TQ_UINT16 srcAlpha = s->alpha;

// apply the alphatqmask
if (tqmask != 0) {
TQ_UINT8 U8_tqmask = *tqmask;
// apply the alphamask
if (mask != 0) {
TQ_UINT8 U8_mask = *mask;

if (U8_tqmask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_tqmask));
if (U8_mask != OPACITY_OPAQUE) {
srcAlpha = UINT16_BLEND(srcAlpha, U16_OPACITY_OPAQUE, UINT8_TO_UINT16(U8_mask));
}
tqmask++;
mask++;
}
d->alpha = UINT16_MULT(srcAlpha, d->alpha);
}
@@ -503,7 +503,7 @@ void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 U8_opacity,
TQ_INT32 rows,
@@ -517,7 +517,7 @@ void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
// Undefined == no composition
break;
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_IN:
//compositeIn(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -546,16 +546,16 @@ void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeDiff(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, 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, maskRowStride, rows, cols, U8_opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, U8_opacity);
break;
case COMPOSITE_COPY_RED:
//compositeCopyRed(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -590,22 +590,22 @@ void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
// No composition.
break;
case COMPOSITE_DARKEN:
compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_HUE:
//compositeHue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeHue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SATURATION:
//compositeSaturation(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeSaturation(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_VALUE:
//compositeValue(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeValue(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLOR:
//compositeColor(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
//compositeColor(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COLORIZE:
//compositeColorize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
@@ -614,24 +614,24 @@ void KisGrayU16ColorSpace::bitBlt(TQ_UINT8 *dst,
//compositeLuminize(pixelSize(), dst, dstRowStride, src, srcRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ALPHA_DARKEN:
abstractCompositeAlphaDarken<TQ_UINT16, U16Mult, Uint8ToU16, U16OpacityTest,
PIXEL_ALPHA, MAX_CHANNEL_GRAY, MAX_CHANNEL_GRAYA>(
dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride,
dst, dstRowStride, src, srcRowStride, mask, maskRowStride,
rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest());
break;
default:

+ 12
- 12
chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h View File

@@ -46,7 +46,7 @@ public:


public:
KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p);
KisGrayU16ColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p);
virtual ~KisGrayU16ColorSpace();

public:
@@ -76,16 +76,16 @@ protected:
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 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *tqmask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOver(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeMultiply(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDivide(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeScreen(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeOverlay(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDodge(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeBurn(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeDarken(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeLighten(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);
void compositeErase(TQ_UINT8 *dst, TQ_INT32 dstRowStride, const TQ_UINT8 *src, TQ_INT32 srcRowStride, const TQ_UINT8 *mask, TQ_INT32 maskRowStride, TQ_INT32 rows, TQ_INT32 columns, TQ_UINT16 opacity);

private:
friend class KisGrayU16ColorSpaceTester;
@@ -110,7 +110,7 @@ public:

virtual icColorSpaceSignature colorSpaceSignature() { return icSigGrayData; };

virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) { return new KisGrayU16ColorSpace(tqparent, p); };
virtual KisColorSpace *createColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) { return new KisGrayU16ColorSpace(parent, p); };

virtual TQString defaultProfile() { return "gray built-in - (lcms internal)"; };
};

+ 4
- 4
chalk/colorspaces/gray_u8/gray_plugin.cc View File

@@ -37,16 +37,16 @@ typedef KGenericFactory<GrayPlugin> GrayPluginFactory;
K_EXPORT_COMPONENT_FACTORY( chalkgrayplugin, GrayPluginFactory( "chalkcore" ) )


GrayPlugin::GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &)
: KParts::Plugin(tqparent, name)
GrayPlugin::GrayPlugin(TQObject *parent, const char *name, const TQStringList &)
: KParts::Plugin(parent, name)
{
setInstance(GrayPluginFactory::instance());

// This is not a gui plugin; only load it when the doc is created.
if ( tqparent->inherits("KisColorSpaceFactoryRegistry") )
if ( parent->inherits("KisColorSpaceFactoryRegistry") )
{

KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( tqparent );
KisColorSpaceFactoryRegistry * f = dynamic_cast<KisColorSpaceFactoryRegistry*>( parent );

// .22 gamma grayscale or something like that. Taken from the lcms tutorial...
LPGAMMATABLE Gamma = cmsBuildGamma(256, 2.2);

+ 1
- 1
chalk/colorspaces/gray_u8/gray_plugin.h View File

@@ -29,7 +29,7 @@ class GrayPlugin : public KParts::Plugin
Q_OBJECT
TQ_OBJECT
public:
GrayPlugin(TQObject *tqparent, const char *name, const TQStringList &);
GrayPlugin(TQObject *parent, const char *name, const TQStringList &);
virtual ~GrayPlugin();

};

+ 81
- 81
chalk/colorspaces/gray_u8/kis_gray_colorspace.cc View File

@@ -43,8 +43,8 @@ namespace {
const TQ_INT32 MAX_CHANNEL_GRAYSCALEA = 2;
}

KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * tqparent, KisProfile *p) :
KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, tqparent, p)
KisGrayColorSpace::KisGrayColorSpace(KisColorSpaceFactoryRegistry * parent, KisProfile *p) :
KisU8BaseColorSpace(KisID("GRAYA", i18n("Grayscale")), TYPE_GRAYA_8, icSigGrayData, parent, p)
{
m_channels.push_back(new KisChannelInfo(i18n("Gray"), i18n("G"), 0, KisChannelInfo::COLOR, KisChannelInfo::UINT8));
m_channels.push_back(new KisChannelInfo(i18n("Alpha"), i18n("A"), 1, KisChannelInfo::ALPHA, KisChannelInfo::UINT8));
@@ -199,7 +199,7 @@ void KisGrayColorSpace::bitBlt(TQ_UINT8 *dst,
TQ_INT32 dstRowStride,
const TQ_UINT8 *src,
TQ_INT32 srcRowStride,
const TQ_UINT8 *tqmask,
const TQ_UINT8 *mask,
TQ_INT32 maskRowStride,
TQ_UINT8 opacity,
TQ_INT32 rows,
@@ -208,37 +208,37 @@ void KisGrayColorSpace::bitBlt(TQ_UINT8 *dst,
{
switch (op.op()) {
case COMPOSITE_OVER:
compositeOver(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOver(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_MULT:
compositeMultiply(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeMultiply(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DIVIDE:
compositeDivide(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDivide(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DARKEN:
compositeDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_LIGHTEN:
compositeLighten(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeLighten(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_SCREEN:
compositeScreen(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeScreen(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_OVERLAY:
compositeOverlay(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeOverlay(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_DODGE:
compositeDodge(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeDodge(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_BURN:
compositeBurn(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeBurn(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_ERASE:
compositeErase(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeErase(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_COPY:
compositeCopy(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeCopy(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;
case COMPOSITE_CLEAR: {
TQ_UINT8 *d;
@@ -253,7 +253,7 @@ void KisGrayColorSpace::bitBlt(TQ_UINT8 *dst,
}
break;
case COMPOSITE_ALPHA_DARKEN:
compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, rows, cols, opacity);
compositeAlphaDarken(dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity);
break;

default:
@@ -285,18 +285,18 @@ void KisGrayColorSpace::compositeOver(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -353,7 +353,7 @@ void KisGrayColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRow
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -362,12 +362,12 @@ void KisGrayColorSpace::compositeMultiply(TQ_UINT8 *dstRowStart, TQ_INT32 dstRow

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -419,7 +419,7 @@ void KisGrayColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -428,12 +428,12 @@ void KisGrayColorSpace::compositeDivide(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -490,7 +490,7 @@ void KisGrayColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -499,12 +499,12 @@ void KisGrayColorSpace::compositeScreen(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -561,7 +561,7 @@ void KisGrayColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -570,12 +570,12 @@ void KisGrayColorSpace::compositeOverlay(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -632,7 +632,7 @@ void KisGrayColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStr
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -641,12 +641,12 @@ void KisGrayColorSpace::compositeDodge(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStr

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -703,7 +703,7 @@ void KisGrayColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -712,12 +712,12 @@ void KisGrayColorSpace::compositeBurn(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowStri

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -775,7 +775,7 @@ void KisGrayColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -784,12 +784,12 @@ void KisGrayColorSpace::compositeDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowSt

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -846,7 +846,7 @@ void KisGrayColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS
const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
TQ_INT32 columns = numColumns;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;

while (columns > 0) {

@@ -855,12 +855,12 @@ void KisGrayColorSpace::compositeLighten(TQ_UINT8 *dstRowStart, TQ_INT32 dstRowS

srcAlpha = TQMIN(srcAlpha, dstAlpha);

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *mask);
mask++;
}

if (srcAlpha != OPACITY_TRANSPARENT) {
@@ -927,17 +927,17 @@ void KisGrayColorSpace::compositeErase(TQ_UINT8 *dst,
{
const TQ_UINT8 *s = src;
TQ_UINT8 *d = dst;
const TQ_UINT8 *tqmask = srcAlphaMask;
const TQ_UINT8 *mask = srcAlphaMask;

for (i = cols; i > 0; i--, s+=MAX_CHANNEL_GRAYSCALEA, d+=MAX_CHANNEL_GRAYSCALEA)
{
srcAlpha = s[PIXEL_GRAY_ALPHA];
// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)
srcAlpha = UINT8_BLEND(srcAlpha, OPACITY_OPAQUE, *mask);
mask++;
}
d[PIXEL_GRAY_ALPHA] = UINT8_MULT(srcAlpha, d[PIXEL_GRAY_ALPHA]);
}
@@ -958,7 +958,7 @@ void KisGrayColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dst

const TQ_UINT8 *src = srcRowStart;
TQ_UINT8 *dst = dstRowStart;
const TQ_UINT8 *tqmask = maskRowStart;
const TQ_UINT8 *mask = maskRowStart;
TQ_INT32 columns = numColumns;

while (columns > 0) {
@@ -966,12 +966,12 @@ void KisGrayColorSpace::compositeAlphaDarken(TQ_UINT8 *dstRowStart, TQ_INT32 dst
TQ_UINT8 srcAlpha = src[PIXEL_GRAY_ALPHA];
TQ_UINT8 dstAlpha = dst[PIXEL_GRAY_ALPHA];

// apply the alphatqmask
if(tqmask != 0)
// apply the alphamask
if(mask != 0)
{
if(*tqmask != OPACITY_OPAQUE)
srcAlpha = UINT8_MULT(srcAlpha, *tqmask);
tqmask++;
if(*mask != OPACITY_OPAQUE)