diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 04766b207afba7961d4d802313e426f5a2fbef63 (patch) | |
tree | c888ea1027c793e2d0386a7e5a1a0cd077b03cb3 /chalk/chalkcolor/colorspaces | |
parent | b6edfe41c9395f2e20784cbf0e630af6426950a3 (diff) | |
download | koffice-04766b207afba7961d4d802313e426f5a2fbef63.tar.gz koffice-04766b207afba7961d4d802313e426f5a2fbef63.zip |
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
Diffstat (limited to 'chalk/chalkcolor/colorspaces')
6 files changed, 104 insertions, 104 deletions
diff --git a/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc b/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc index db50c7d9..c76160c5 100644 --- a/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc +++ b/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.cc @@ -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, diff --git a/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h b/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h index 173a809e..c9deb496 100644 --- a/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h +++ b/chalk/chalkcolor/colorspaces/kis_alpha_colorspace.h @@ -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(); diff --git a/chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc b/chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc index e8476d75..e6b7f151 100644 --- a/chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc +++ b/chalk/chalkcolor/colorspaces/kis_lab_colorspace.cc @@ -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: diff --git a/chalk/chalkcolor/colorspaces/kis_lab_colorspace.h b/chalk/chalkcolor/colorspaces/kis_lab_colorspace.h index e85408f8..77266dca 100644 --- a/chalk/chalkcolor/colorspaces/kis_lab_colorspace.h +++ b/chalk/chalkcolor/colorspaces/kis_lab_colorspace.h @@ -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)"; }; }; diff --git a/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc b/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc index 7e765d7a..d81c1fe6 100644 --- a/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc +++ b/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.cc @@ -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: diff --git a/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h b/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h index 4a785825..ae8aad86 100644 --- a/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h +++ b/chalk/chalkcolor/colorspaces/kis_xyz_colorspace.h @@ -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: |