From 04766b207afba7961d4d802313e426f5a2fbef63 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 22:19:39 +0000 Subject: 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 --- chalk/colorspaces/gray_u16/gray_u16_plugin.cc | 8 +-- chalk/colorspaces/gray_u16/gray_u16_plugin.h | 2 +- .../gray_u16/kis_gray_u16_colorspace.cc | 78 +++++++++++----------- .../colorspaces/gray_u16/kis_gray_u16_colorspace.h | 24 +++---- 4 files changed, 56 insertions(+), 56 deletions(-) (limited to 'chalk/colorspaces/gray_u16') diff --git a/chalk/colorspaces/gray_u16/gray_u16_plugin.cc b/chalk/colorspaces/gray_u16/gray_u16_plugin.cc index 436caf5d..bfb68e8c 100644 --- a/chalk/colorspaces/gray_u16/gray_u16_plugin.cc +++ b/chalk/colorspaces/gray_u16/gray_u16_plugin.cc @@ -35,14 +35,14 @@ typedef KGenericFactory 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( tqparent ); + KisColorSpaceFactoryRegistry * f = dynamic_cast( parent ); KisColorSpace * colorSpaceGRAYU16 = new KisGrayU16ColorSpace(f, 0); KisColorSpaceFactory * csf = new KisGrayU16ColorSpaceFactory(); diff --git a/chalk/colorspaces/gray_u16/gray_u16_plugin.h b/chalk/colorspaces/gray_u16/gray_u16_plugin.h index 39ef6c2a..3d16c1ac 100644 --- a/chalk/colorspaces/gray_u16/gray_u16_plugin.h +++ b/chalk/colorspaces/gray_u16/gray_u16_plugin.h @@ -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(); }; diff --git a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc index 4e50b1c2..34cf991a 100644 --- a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc +++ b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.cc @@ -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(srcRowStart); TQ_UINT16 *dst = reinterpret_cast(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(srcRowStart); \ TQ_UINT16 *dst = reinterpret_cast(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(src); Pixel *d = reinterpret_cast(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( - dst, dstRowStride, src, srcRowStride, tqmask, maskRowStride, + dst, dstRowStride, src, srcRowStride, mask, maskRowStride, rows, cols, opacity, U16Mult(), Uint8ToU16(), U16OpacityTest()); break; default: diff --git a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h index eeec10a7..0acecd0b 100644 --- a/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h +++ b/chalk/colorspaces/gray_u16/kis_gray_u16_colorspace.h @@ -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)"; }; }; -- cgit v1.2.1