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

« back to all changes in this revision

Viewing changes to libs/dimg/filters/fx/charcoalfilter.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-06-18 21:58:46 UTC
  • mfrom: (1.2.29 upstream) (3.2.13 sid)
  • Revision ID: james.westby@ubuntu.com-20100618215846-c95bk5aoysmu786d
Tags: 2:1.3.0-0ubuntu1
* Merge with Debian unstable, remaining changes:
  - Export .pot name and copy to plugins in debian/rules
  - Enable Nepomuk support in Digikam
    - Add shared-desktop-ontologies to build depends
* New upstream release:
  - Remove digikam-1.2.0-kde232628.patch fixed by upstream
  - Add mysql-server-5.1 to buil-depends

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
 
99
99
    BlurFilter(this, m_destImage, m_destImage, 80, 85, (int)(m_smooth/10.0));
100
100
 
101
 
    if (m_cancel)
 
101
    if (!runningFlag())
102
102
        return;
103
103
 
104
104
    // -- Applying stretch contrast color effect -------------------------------
108
108
    m_destImage.putImageData(stretch.getTargetImage().bits());
109
109
 
110
110
    postProgress( 90 );
111
 
    if (m_cancel)
 
111
    if (!runningFlag())
112
112
        return;
113
113
 
114
114
    // -- Inverting image color -----------------------------------------------
118
118
    m_destImage.putImageData(invert.getTargetImage().bits());
119
119
 
120
120
    postProgress( 95 );
121
 
    if (m_cancel)
 
121
    if (!runningFlag())
122
122
        return;
123
123
 
124
124
    // -- Convert to neutral black & white ------------------------------------
133
133
    m_destImage.putImageData(mixer.getTargetImage().bits());
134
134
 
135
135
    postProgress( 100 );
136
 
    if (m_cancel)
 
136
    if (!runningFlag())
137
137
        return;
138
138
}
139
139
 
194
194
 
195
195
    // --------------------------------------------------------
196
196
 
197
 
    for (y = 0; !m_cancel && (y < height); ++y)
 
197
    for (y = 0; runningFlag() && (y < height); ++y)
198
198
    {
199
199
        sy = y - (kernelWidth / 2);
200
200
 
201
 
        for (x = 0; !m_cancel && (x < width); ++x)
 
201
        for (x = 0; runningFlag() && (x < width); ++x)
202
202
        {
203
203
            k = normal_kernel;
204
204
            red = green = blue = alpha = 0;
205
205
            sy = y - (kernelWidth / 2);
206
206
 
207
 
            for (mcy = 0; !m_cancel && (mcy < kernelWidth); ++mcy, ++sy)
 
207
            for (mcy = 0; runningFlag() && (mcy < kernelWidth); ++mcy, ++sy)
208
208
            {
209
209
                my = sy < 0 ? 0 : sy > (int) height - 1 ? height - 1 : sy;
210
210
                sx = x + (-kernelWidth / 2);
211
211
 
212
 
                for (mcx = 0; !m_cancel && (mcx < kernelWidth); ++mcx, ++sx)
 
212
                for (mcx = 0; runningFlag() && (mcx < kernelWidth); ++mcx, ++sx)
213
213
                {
214
214
                    mx = sx < 0 ? 0 : sx > (int) width - 1 ? width - 1 : sx;
215
215
                    DColor color(sdata + mx * sdepth + (width * my * sdepth), sixteenBit);