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

« back to all changes in this revision

Viewing changes to imageplugins/enhance/hotpixels/hotpixel.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    QRect rect;
41
41
    int luminosity;
42
 
    int y() const     {return rect.y();     };
43
 
    int x() const     {return rect.x();     };
44
 
    int width()const  {return rect.width(); };
45
 
    int height()const {return rect.height();};
 
42
    int y() const
 
43
    {
 
44
        return rect.y();
 
45
    };
 
46
    int x() const
 
47
    {
 
48
        return rect.x();
 
49
    };
 
50
    int width()const
 
51
    {
 
52
        return rect.width();
 
53
    };
 
54
    int height()const
 
55
    {
 
56
        return rect.height();
 
57
    };
46
58
 
47
59
    bool operator==(const HotPixel& p) const
48
60
    {
50
62
        //touch(next to) each other horizontally or vertically, not diagonal corners
51
63
        //return (rect.intersects(p.rect));
52
64
        return (rect != p.rect) && (x() + width() >= p.x() && x() <= p.x() + p.width()
53
 
                && y() + height() >= p.y() && y() <= p.y() + p.height())
54
 
                && !diagonal(rect, p.rect);
 
65
                                    && y() + height() >= p.y() && y() <= p.y() + p.height())
 
66
               && !diagonal(rect, p.rect);
55
67
    }
56
68
 
57
69
private: