Changeset View
Changeset View
Standalone View
Standalone View
libs/image/lazybrush/KisWatershedWorker.cpp
Show First 20 Lines • Show All 178 Lines • ▼ Show 20 Line(s) | 173 | { | |||
---|---|---|---|---|---|
179 | while (dstIt.nextPixel()) { | 179 | while (dstIt.nextPixel()) { | ||
180 | quint8 *dstPtr = dstIt.rawData(); | 180 | quint8 *dstPtr = dstIt.rawData(); | ||
181 | 181 | | |||
182 | if (*dstPtr > 0) { | 182 | if (*dstPtr > 0) { | ||
183 | const QPoint pt(dstIt.x(), dstIt.y()); | 183 | const QPoint pt(dstIt.x(), dstIt.y()); | ||
184 | KisScanlineFill fill(stroke, pt, boundingRect); | 184 | KisScanlineFill fill(stroke, pt, boundingRect); | ||
185 | /** | 185 | /** | ||
186 | * The threshold is set explicitly. If you want to raise it, | 186 | * The threshold is set explicitly. If you want to raise it, | ||
187 | * don't forget to add a destiction between 0 and >0 in | 187 | * don't forget to add a distinction between 0 and >0 in | ||
188 | * the fill strategy. Otherwise the algorithm will not work. | 188 | * the fill strategy. Otherwise the algorithm will not work. | ||
189 | */ | 189 | */ | ||
190 | fill.setThreshold(0); | 190 | fill.setThreshold(0); | ||
191 | fill.fillContiguousGroup(groupMap, groups.size()); | 191 | fill.fillContiguousGroup(groupMap, groups.size()); | ||
192 | 192 | | |||
193 | groups << FillGroup(colorIndex); | 193 | groups << FillGroup(colorIndex); | ||
194 | } | 194 | } | ||
195 | 195 | | |||
▲ Show 20 Lines • Show All 807 Lines • Show Last 20 Lines |