|
Krita Source Code Documentation
|
Classes | |
| struct | FilteringOptions |
| struct | KeyStroke |
Functions | |
| void | cutOneWay (const KoColor &color, KisPaintDeviceSP src, KisPaintDeviceSP colorScribble, KisPaintDeviceSP backgroundScribble, KisPaintDeviceSP resultDevice, KisPaintDeviceSP maskDevice, const QRect &boundingRect) |
| void | normalizeAlpha8Device (KisPaintDeviceSP dev, const QRect &rect) |
| void | normalizeAndInvertAlpha8Device (KisPaintDeviceSP dev, const QRect &rect) |
| bool | operator== (const FilteringOptions &t1, const FilteringOptions &t2) |
| bool | operator== (const KeyStroke &t1, const KeyStroke &t2) |
| QVector< QPoint > | splitIntoConnectedComponents (KisPaintDeviceSP dev, const QRect &boundingRect) |
| KRITAIMAGE_EXPORT void KisLazyFillTools::cutOneWay | ( | const KoColor & | color, |
| KisPaintDeviceSP | src, | ||
| KisPaintDeviceSP | colorScribble, | ||
| KisPaintDeviceSP | backgroundScribble, | ||
| KisPaintDeviceSP | resultDevice, | ||
| KisPaintDeviceSP | maskDevice, | ||
| const QRect & | boundingRect ) |
Uses Boykov-Kolmogorov Max-Flow/Min-Cut algorithm to split the device src into two parts. The first part is defined by colorScribble and the second part — by backgroundScribble. In the result of the split the area defined by colorScribble in resultDevice is filled with color. Also the same area in maskDevice is filled with a non-null scribble index.
maskDevice is used for limiting the area used for filling the color.
Definition at line 77 of file kis_lazy_fill_tools.cpp.
References boost::boykov_kolmogorov_max_flow(), KisPaintDevice::colorSpace(), KoColor::colorSpace(), KoColor::data(), get(), KisLazyFillCapacityMap::graph(), KIS_ASSERT_RECOVER_RETURN, KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::nextPixel(), KisPaintDevice::pixelSize(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::rawData(), KisLazyFillGraph::rect(), v, KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::x(), and KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::y().
| KRITAIMAGE_EXPORT void KisLazyFillTools::normalizeAlpha8Device | ( | KisPaintDeviceSP | dev, |
| const QRect & | rect ) |
Definition at line 56 of file kis_lazy_fill_tools.cpp.
References KritaUtils::applyToAlpha8Device(), and KritaUtils::filterAlpha8Device().
| KRITAIMAGE_EXPORT void KisLazyFillTools::normalizeAndInvertAlpha8Device | ( | KisPaintDeviceSP | dev, |
| const QRect & | rect ) |
Definition at line 35 of file kis_lazy_fill_tools.cpp.
References KritaUtils::applyToAlpha8Device(), KritaUtils::filterAlpha8Device(), and pow2().
| bool KisLazyFillTools::operator== | ( | const FilteringOptions & | t1, |
| const FilteringOptions & | t2 ) |
Definition at line 196 of file kis_lazy_fill_tools.cpp.
Definition at line 180 of file kis_lazy_fill_tools.cpp.
| KRITAIMAGE_EXPORT QVector< QPoint > KisLazyFillTools::splitIntoConnectedComponents | ( | KisPaintDeviceSP | src, |
| const QRect & | boundingRect ) |
Returns one pixel from each connected component of src.
WARNING: src is used as a temporary device, so it will be cleared(!) after the execution of the algorithm
Please note that since we modify the device inside clearNonZeroComponent() call, we must use a writable iterator, for not ending up with a lazy copied old version of a device.
Definition at line 139 of file kis_lazy_fill_tools.cpp.
References KisScanlineFill::clearNonZeroComponent(), KisPaintDevice::colorSpace(), KisPaintDevice::exactBounds(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::nextPixel(), KoColorSpace::opacityU8(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::rawData(), KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::x(), and KisSequentialIteratorBase< IteratorPolicy, SourcePolicy, ProgressPolicy >::y().