Changeset View
Changeset View
Standalone View
Standalone View
imagelib/effects/kpEffectFlatten.cpp
Show All 27 Lines | |||||
28 | #include "blitz.h" | 28 | #include "blitz.h" | ||
29 | 29 | | |||
30 | //-------------------------------------------------------------------------------- | 30 | //-------------------------------------------------------------------------------- | ||
31 | // public static | 31 | // public static | ||
32 | 32 | | |||
33 | void kpEffectFlatten::applyEffect (QImage *destImagePtr, | 33 | void kpEffectFlatten::applyEffect (QImage *destImagePtr, | ||
34 | const QColor &color1, const QColor &color2) | 34 | const QColor &color1, const QColor &color2) | ||
35 | { | 35 | { | ||
36 | if (!destImagePtr) | 36 | if (!destImagePtr) { | ||
37 | return; | 37 | return; | ||
38 | } | ||||
38 | 39 | | |||
39 | Blitz::flatten (*destImagePtr/*ref*/, color1, color2); | 40 | Blitz::flatten (*destImagePtr/*ref*/, color1, color2); | ||
40 | } | 41 | } | ||
41 | 42 | | |||
42 | //-------------------------------------------------------------------------------- | 43 | //-------------------------------------------------------------------------------- | ||
43 | // public static | 44 | // public static | ||
44 | 45 | | |||
45 | QImage kpEffectFlatten::applyEffect (const QImage &img, | 46 | QImage kpEffectFlatten::applyEffect (const QImage &img, | ||
46 | const QColor &color1, const QColor &color2) | 47 | const QColor &color1, const QColor &color2) | ||
47 | { | 48 | { | ||
48 | QImage retImage = img; | 49 | QImage retImage = img; | ||
49 | applyEffect (&retImage, color1, color2); | 50 | applyEffect (&retImage, color1, color2); | ||
50 | return retImage; | 51 | return retImage; | ||
51 | } | 52 | } | ||
52 | 53 | | |||
53 | //-------------------------------------------------------------------------------- | 54 | //-------------------------------------------------------------------------------- |