~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to imageplugins/colorfx/colorfxtool.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 *
3
 
 * This file is a part of digiKam project
4
 
 * http://www.digikam.org
5
 
 *
6
 
 * Date        : 2004-02-14
7
 
 * Description : a digiKam image plugin for to apply a color
8
 
 *               effect to an image.
9
 
 *
10
 
 * Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
11
 
 * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
 
 *
13
 
 * This program is free software; you can redistribute it
14
 
 * and/or modify it under the terms of the GNU General
15
 
 * Public License as published by the Free Software Foundation;
16
 
 * either version 2, or (at your option)
17
 
 * any later version.
18
 
 *
19
 
 * This program is distributed in the hope that it will be useful,
20
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
22
 
 * GNU General Public License for more details.
23
 
 *
24
 
 * ============================================================ */
25
 
 
26
 
#ifndef COLORFXTOOL_H
27
 
#define COLORFXTOOL_H
28
 
 
29
 
// Local includes
30
 
 
31
 
#include "editortool.h"
32
 
 
33
 
namespace Digikam
34
 
{
35
 
class DColor;
36
 
}
37
 
 
38
 
namespace DigikamColorFXImagesPlugin
39
 
{
40
 
 
41
 
class ColorFXToolPriv;
42
 
 
43
 
class ColorFXTool : public Digikam::EditorTool
44
 
{
45
 
    Q_OBJECT
46
 
 
47
 
public:
48
 
 
49
 
    ColorFXTool(QObject *parent);
50
 
    ~ColorFXTool();
51
 
 
52
 
private:
53
 
 
54
 
    void readSettings();
55
 
    void writeSettings();
56
 
    void finalRendering();
57
 
    void colorEffect(uchar *data, int w, int h, bool sb);
58
 
    void solarize(int factor, uchar *data, int w, int h, bool sb);
59
 
    void vivid(int factor, uchar *data, int w, int h, bool sb);
60
 
    void neon(uchar *data, int w, int h, bool sb, int Intensity, int BW);
61
 
    void findEdges(uchar *data, int w, int h, bool sb, int Intensity, int BW);
62
 
    void neonFindEdges(uchar *data, int w, int h, bool sb, bool neon, int Intensity, int BW);
63
 
 
64
 
    inline int getOffset(int Width, int X, int Y, int bytesDepth);
65
 
    inline int Lim_Max(int Now, int Up, int Max);
66
 
 
67
 
private Q_SLOTS:
68
 
 
69
 
    void slotEffectTypeChanged(int type);
70
 
    void slotEffect();
71
 
    void slotResetSettings();
72
 
    void slotColorSelectedFromTarget(const Digikam::DColor& color);
73
 
 
74
 
private:
75
 
 
76
 
    enum ColorFXTypes
77
 
    {
78
 
        Solarize=0,
79
 
        Vivid,
80
 
        Neon,
81
 
        FindEdges
82
 
    };
83
 
 
84
 
private:
85
 
 
86
 
    ColorFXToolPriv* const d;
87
 
};
88
 
 
89
 
}  // namespace DigikamColorFXImagesPlugin
90
 
 
91
 
#endif /* COLORFXTOOL_H */