Changeset View
Changeset View
Standalone View
Standalone View
imagelib/effects/kpEffectInvert.cpp
Show All 26 Lines | |||||
27 | 27 | | |||
28 | 28 | | |||
29 | #define DEBUG_KP_EFFECT_INVERT 0 | 29 | #define DEBUG_KP_EFFECT_INVERT 0 | ||
30 | 30 | | |||
31 | 31 | | |||
32 | #include "kpEffectInvert.h" | 32 | #include "kpEffectInvert.h" | ||
33 | 33 | | |||
34 | #include <QImage> | 34 | #include <QImage> | ||
35 | #include <QImage> | | |||
36 | 35 | | |||
37 | #include "kpLogCategories.h" | 36 | #include "kpLogCategories.h" | ||
38 | 37 | | |||
39 | #include "pixmapfx/kpPixmapFX.h" | 38 | #include "pixmapfx/kpPixmapFX.h" | ||
40 | 39 | | |||
41 | 40 | | |||
42 | // public static | 41 | // public static | ||
43 | void kpEffectInvert::applyEffect (QImage *destImagePtr, int channels) | 42 | void kpEffectInvert::applyEffect (QImage *destImagePtr, int channels) | ||
44 | { | 43 | { | ||
44 | if (channels == kpEffectInvert::RGB) | ||||
pino: coding style, the opening curly bracket goes on its own line | |||||
45 | { | ||||
pino: coding style, missing space before opening bracket | |||||
46 | destImagePtr->invertPixels (); | ||||
47 | return; | ||||
48 | } | ||||
49 | | ||||
45 | QRgb mask = qRgba ((channels & Red) ? 0xFF : 0, | 50 | QRgb mask = qRgba ((channels & Red) ? 0xFF : 0, | ||
46 | (channels & Green) ? 0xFF : 0, | 51 | (channels & Green) ? 0xFF : 0, | ||
47 | (channels & Blue) ? 0xFF : 0, | 52 | (channels & Blue) ? 0xFF : 0, | ||
48 | 0/*don't invert alpha*/); | 53 | 0/*don't invert alpha*/); | ||
49 | #if DEBUG_KP_EFFECT_INVERT | 54 | #if DEBUG_KP_EFFECT_INVERT | ||
50 | qCDebug(kpLogImagelib) << "kpEffectInvert::applyEffect(channels=" << channels | 55 | qCDebug(kpLogImagelib) << "kpEffectInvert::applyEffect(channels=" << channels | ||
51 | << ") mask=" << (int *) mask; | 56 | << ") mask=" << (int *) mask; | ||
52 | #endif | 57 | #endif | ||
Show All 32 Lines |
coding style, the opening curly bracket goes on its own line