summaryrefslogtreecommitdiff
path: root/libopie2/opieui
Unidiff
Diffstat (limited to 'libopie2/opieui') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/oimageeffect.h6
-rw-r--r--libopie2/opieui/opixmapeffect.h11
2 files changed, 6 insertions, 11 deletions
diff --git a/libopie2/opieui/oimageeffect.h b/libopie2/opieui/oimageeffect.h
index 4f86d5b..4422741 100644
--- a/libopie2/opieui/oimageeffect.h
+++ b/libopie2/opieui/oimageeffect.h
@@ -210,25 +210,25 @@ public:
210 * @param percent Percent value. Use a negative value to dim. 210 * @param percent Percent value. Use a negative value to dim.
211 * @param channel Which channel(s) should be modified 211 * @param channel Which channel(s) should be modified
212 * @return The @p image, provided for convenience. 212 * @return The @p image, provided for convenience.
213 */ 213 */
214 static QImage& channelIntensity(QImage &image, float percent, 214 static QImage& channelIntensity(QImage &image, float percent,
215 RGBComponent channel); 215 RGBComponent channel);
216 216
217 /** 217 /**
218 * Fade an image to a certain background color. 218 * Fade an image to a certain background color.
219 * 219 *
220 * The number of colors will not be changed. 220 * The number of colors will not be changed.
221 * 221 *
222 * @param image The QImage to process. 222 * @param img The QImage to process.
223 * @param val The strength of the effect. 0 <= val <= 1. 223 * @param val The strength of the effect. 0 <= val <= 1.
224 * @param color The background color. 224 * @param color The background color.
225 * @return Returns the @ref image(), provided for convenience. 225 * @return Returns the @ref image(), provided for convenience.
226 */ 226 */
227 static QImage& fade(QImage &img, float val, const QColor &color); 227 static QImage& fade(QImage &img, float val, const QColor &color);
228 228
229 229
230 /** 230 /**
231 * This recolors a pixmap. The most dark color will become color a, 231 * This recolors a pixmap. The most dark color will become color a,
232 * the most bright one color b, and in between. 232 * the most bright one color b, and in between.
233 * 233 *
234 * @param image A QImage to process. 234 * @param image A QImage to process.
@@ -299,25 +299,25 @@ public:
299 * 299 *
300 * @author Daniel M. Duley (mosfet) 300 * @author Daniel M. Duley (mosfet)
301 * @param image The QImage to process. 301 * @param image The QImage to process.
302 * @param c A contrast value between -255 to 255. 302 * @param c A contrast value between -255 to 255.
303 * @return The @ref image(), provided for convenience. 303 * @return The @ref image(), provided for convenience.
304 */ 304 */
305 static QImage& contrast(QImage &image, int c); 305 static QImage& contrast(QImage &image, int c);
306 306
307 /** 307 /**
308 * Dither an image using Floyd-Steinberg dithering for low-color 308 * Dither an image using Floyd-Steinberg dithering for low-color
309 * situations. 309 * situations.
310 * 310 *
311 * @param image The QImage to process. 311 * @param img The QImage to process.
312 * @param palette The color palette to use 312 * @param palette The color palette to use
313 * @param size The size of the palette 313 * @param size The size of the palette
314 * @return Returns the @ref image(), provided for convenience. 314 * @return Returns the @ref image(), provided for convenience.
315 */ 315 */
316 static QImage& dither(QImage &img, const QColor *palette, int size); 316 static QImage& dither(QImage &img, const QColor *palette, int size);
317 317
318 /** 318 /**
319 * Calculate the image for a selected image, for instance a selected icon 319 * Calculate the image for a selected image, for instance a selected icon
320 * on the desktop. 320 * on the desktop.
321 * @param img the QImage to select 321 * @param img the QImage to select
322 * @param col the selected color, usually from QColorGroup::highlight(). 322 * @param col the selected color, usually from QColorGroup::highlight().
323 */ 323 */
@@ -521,25 +521,25 @@ public:
521 * effect some pixels may be "empty". This value is used for those pixels. 521 * effect some pixels may be "empty". This value is used for those pixels.
522 * @return The swirled image. The original is not changed. 522 * @return The swirled image. The original is not changed.
523 */ 523 */
524 static QImage swirl(QImage &src, double degrees=50.0, unsigned int background = 524 static QImage swirl(QImage &src, double degrees=50.0, unsigned int background =
525 0xFFFFFFFF); 525 0xFFFFFFFF);
526 526
527 /** 527 /**
528 * Modifies the pixels along a sine wave. 528 * Modifies the pixels along a sine wave.
529 * 529 *
530 * @author Daniel M. Duley (mosfet) 530 * @author Daniel M. Duley (mosfet)
531 * @param src The QImage to process. 531 * @param src The QImage to process.
532 * @param amplitude The amplitude of the sine wave. 532 * @param amplitude The amplitude of the sine wave.
533 * @param wavelength The frequency of the sine wave. 533 * @param frequency The frequency of the sine wave.
534 * @return The new image. The original is not changed. 534 * @return The new image. The original is not changed.
535 */ 535 */
536 static QImage wave(QImage &src, double amplitude=25.0, double frequency=150.0, 536 static QImage wave(QImage &src, double amplitude=25.0, double frequency=150.0,
537 unsigned int background = 0xFFFFFFFF); 537 unsigned int background = 0xFFFFFFFF);
538 538
539private: 539private:
540 540
541 /** 541 /**
542 * Helper function to fast calc some altered (lighten, shaded) colors 542 * Helper function to fast calc some altered (lighten, shaded) colors
543 * 543 *
544 */ 544 */
545 static unsigned int lHash(unsigned int c); 545 static unsigned int lHash(unsigned int c);
diff --git a/libopie2/opieui/opixmapeffect.h b/libopie2/opieui/opixmapeffect.h
index b780f9f..85a1e25 100644
--- a/libopie2/opieui/opixmapeffect.h
+++ b/libopie2/opieui/opixmapeffect.h
@@ -143,34 +143,29 @@ public:
143 * 143 *
144 * @param pixmap The pixmap to process. 144 * @param pixmap The pixmap to process.
145 * @param ca Color a. 145 * @param ca Color a.
146 * @param cb Color b. 146 * @param cb Color b.
147 * @param ncols The number of colors to use. The image will be 147 * @param ncols The number of colors to use. The image will be
148 * dithered to this depth. Pass zero to prevent dithering. 148 * dithered to this depth. Pass zero to prevent dithering.
149 * @return The @ref pixmap(), provided for convenience. 149 * @return The @ref pixmap(), provided for convenience.
150 */ 150 */
151 static OPixmap pattern(const OPixmap& pixmap, QSize size, 151 static OPixmap pattern(const OPixmap& pixmap, QSize size,
152 const QColor &ca, const QColor &cb, int ncols=8); 152 const QColor &ca, const QColor &cb, int ncols=8);
153 153
154 /** 154 /**
155 * Recolors a pixmap. 155 * Fades a pixmap to a certain color.
156 *
157 * The most dark color will become color a,
158 * the most bright one color b, and in between.
159 * 156 *
160 * @param pixmap The pixmap to process. 157 * @param pixmap The pixmap to process.
161 * @param ca Color a. 158 * @param val The strength of the effect. 0 <= val <= 1.
162 * @param cb Color b. 159 * @param color The color to blend to.
163 * @param ncols The number of colors to use. Pass zero to prevent
164 * dithering.
165 * @return Returns the @ref pixmap(), provided for convenience. 160 * @return Returns the @ref pixmap(), provided for convenience.
166 */ 161 */
167 static OPixmap& fade(OPixmap& pixmap, double val, const QColor &color); 162 static OPixmap& fade(OPixmap& pixmap, double val, const QColor &color);
168 163
169 /** 164 /**
170 * Converts a pixmap to grayscale. 165 * Converts a pixmap to grayscale.
171 * 166 *
172 * @param pixmap The pixmap to process. 167 * @param pixmap The pixmap to process.
173 * @param fast Set to @p true in order to use a faster but non-photographic 168 * @param fast Set to @p true in order to use a faster but non-photographic
174 * quality algorithm. Appropriate for things such as toolbar icons. 169 * quality algorithm. Appropriate for things such as toolbar icons.
175 * @return Returns the @ref pixmap(), provided for convenience. 170 * @return Returns the @ref pixmap(), provided for convenience.
176 */ 171 */