|
Krita Source Code Documentation
|
#include <kis_fill_painter.h>
Inheritance diagram for KisFillPainter:Public Types | |
| enum | RegionFillingMode { RegionFillingMode_FloodFill , RegionFillingMode_BoundaryFill } |
Public Types inherited from KisPainter | |
| enum | FillStyle { FillStyleNone , FillStyleForegroundColor , FillStyleBackgroundColor , FillStylePattern , FillStyleGenerator } |
| This enum contains the styles with which we can fill things like polygons and ellipses. More... | |
| enum | StrokeStyle { StrokeStyleNone , StrokeStyleBrush } |
| The style of the brush stroke around polygons and so. More... | |
Public Member Functions | |
| bool | antiAlias () const |
| bool | careForSelection () const |
| uint | closeGap () const |
| KisPixelSelectionSP | createFloodSelection (int startX, int startY, KisPaintDeviceSP sourceDevice, KisPaintDeviceSP existingSelection) |
| KisPixelSelectionSP | createFloodSelection (KisPixelSelectionSP newSelection, int startX, int startY, KisPaintDeviceSP sourceDevice, KisPaintDeviceSP existingSelection) |
| void | createSimilarColorsSelection (KisPixelSelectionSP outSelection, const KoColor &referenceColor, KisPaintDeviceSP referenceDevice, const QRect &rect, KisPixelSelectionSP mask) |
| QVector< KisStrokeJobData * > | createSimilarColorsSelectionJobs (KisPixelSelectionSP outSelection, const QSharedPointer< KoColor > referenceColor, KisPaintDeviceSP referenceDevice, const QRect &rect, KisPixelSelectionSP mask, QSharedPointer< KisProcessingVisitor::ProgressHelper > progressHelper=nullptr) |
| void | eraseRect (const QRect &rc) |
| void | eraseRect (qint32 x1, qint32 y1, qint32 w, qint32 h) |
| uint | feather () const |
| void | fillColor (int startX, int startY, KisPaintDeviceSP sourceDevice) |
| void | fillPattern (int startX, int startY, KisPaintDeviceSP sourceDevice, QTransform patternTransform=QTransform()) |
| void | fillRect (const QRect &rc, const KisPaintDeviceSP device, const QRect &deviceRect) |
| void | fillRect (const QRect &rc, const KoColor &c) |
| void | fillRect (const QRect &rc, const KoColor &c, quint8 opacity) |
| void | fillRect (const QRect &rc, const KoPatternSP pattern, const QPoint &offset=QPoint()) |
| void | fillRect (qint32 x, qint32 y, qint32 w, qint32 h, const KoColor &c) |
| void | fillRect (qint32 x, qint32 y, qint32 w, qint32 h, const KoColor &c, quint8 opacity) |
| void | fillRect (qint32 x1, qint32 y1, qint32 w, qint32 h, const KisFilterConfigurationSP generator) |
| void | fillRect (qint32 x1, qint32 y1, qint32 w, qint32 h, const KisPaintDeviceSP device, const QRect &deviceRect) |
| void | fillRect (qint32 x1, qint32 y1, qint32 w, qint32 h, const KoPatternSP pattern, const QPoint &offset=QPoint()) |
| void | fillRectNoCompose (const QRect &rc, const KoPatternSP pattern, const QTransform transform) |
| fillRect Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the entire rectangle. Differs from other functions that it uses a transform, does not support composite ops in turn. | |
| void | fillRectNoCompose (qint32 x1, qint32 y1, qint32 w, qint32 h, const KisPaintDeviceSP device, const QRect &deviceRect, const QTransform transform) |
| void | fillSelection (const QRect &rc, const KoColor &color) |
| int | fillThreshold () const |
| KisFillPainter () | |
| KisFillPainter (KisPaintDeviceSP device) | |
| KisFillPainter (KisPaintDeviceSP device, KisSelectionSP selection) | |
| int | opacitySpread () const |
| KoColor | regionFillingBoundaryColor () const |
| RegionFillingMode | regionFillingMode () const |
| void | setAntiAlias (bool antiAlias) |
| void | setCareForSelection (bool set) |
| void | setCloseGap (int gap) |
| void | setFeather (int feather) |
| void | setFillThreshold (int threshold) |
| void | setHeight (int h) |
| void | setOpacitySpread (int opacitySpread) |
| void | setRegionFillingBoundaryColor (const KoColor ®ionFillingBoundaryColor) |
| void | setRegionFillingMode (RegionFillingMode regionFillingMode) |
| void | setSizemod (int sizemod) |
| void | setStopGrowingAtDarkestPixel (bool stopGrowingAtDarkestPixel) |
| void | setUseCompositing (bool useCompositing) |
| void | setUseSelectionAsBoundary (bool useSelectionAsBoundary) |
| void | setWidth (int w) |
| int | sizemod () const |
| bool | stopGrowingAtDarkestPixel () const |
| bool | useCompositing () const |
| uint | useSelectionAsBoundary () const |
Public Member Functions inherited from KisPainter | |
| void | addDirtyRect (const QRect &r) |
| void | addDirtyRects (const QVector< QRect > &rects) |
| bool | antiAliasPolygonFill () |
| Return whether a polygon's filled area should be anti-aliased or not. | |
| void | applyDevice (const QRect &applyRect, const KisRenderedDab &dab, KisRandomAccessorSP dstIt, const KoColorSpace *srcColorSpace, KoCompositeOp::ParameterInfo &localParamInfo) |
| void | applyDeviceWithSelection (const QRect &applyRect, const KisRenderedDab &dab, KisRandomAccessorSP dstIt, KisRandomConstAccessorSP maskIt, const KoColorSpace *srcColorSpace, KoCompositeOp::ParameterInfo &localParamInfo) |
| const KoColor & | backgroundColor () const |
| Returns the current background color. | |
| void | begin (KisPaintDeviceSP device) |
| void | begin (KisPaintDeviceSP device, KisSelectionSP selection) |
| void | beginTransaction (const KUndo2MagicString &transactionName=KUndo2MagicString(), int timedID=-1) |
| Begin an undoable paint operation. | |
| void | bitBlt (const QPoint &pos, const KisPaintDeviceSP srcDev, const QRect &srcRect) |
| void | bitBlt (qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight) |
| void | bitBltOldData (const QPoint &pos, const KisPaintDeviceSP srcDev, const QRect &srcRect) |
| void | bitBltOldData (qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight) |
| void | bitBltWithFixedSelection (qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, const KisFixedPaintDeviceSP selection, qint32 selX, qint32 selY, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight) |
| void | bitBltWithFixedSelection (qint32 dstX, qint32 dstY, const KisPaintDeviceSP srcDev, const KisFixedPaintDeviceSP selection, qint32 srcWidth, qint32 srcHeight) |
| void | bltFixed (const QPoint &pos, const KisFixedPaintDeviceSP srcDev, const QRect &srcRect) |
| void | bltFixed (const QRect &rc, const QList< KisRenderedDab > allSrcDevices) |
| void | bltFixed (qint32 dstX, qint32 dstY, const KisFixedPaintDeviceSP srcDev, qint32 srcX, qint32 srcY, qint32 srcWidth, qint32 srcHeight) |
| void | bltFixedWithFixedSelection (qint32 dstX, qint32 dstY, const KisFixedPaintDeviceSP srcDev, const KisFixedPaintDeviceSP selection, qint32 selX, qint32 selY, qint32 srcX, qint32 srcY, quint32 srcWidth, quint32 srcHeight) |
| void | bltFixedWithFixedSelection (qint32 dstX, qint32 dstY, const KisFixedPaintDeviceSP srcDev, const KisFixedPaintDeviceSP selection, quint32 srcWidth, quint32 srcHeight) |
| const QVector< QPair< QPointF, QPointF > > | calculateAllMirroredPoints (const QPair< QPointF, QPointF > &pair) |
| const QVector< QPointF > | calculateAllMirroredPoints (const QPointF &pos) |
| const QVector< QRect > | calculateAllMirroredRects (const QRect &rc) |
| template<class T > | |
| QVector< T > | calculateMirroredObjects (const T &object) |
| QBitArray | channelFlags () |
| const KoCompositeOp * | compositeOp (const KoColorSpace *srcCS) |
| QString | compositeOpId () |
| Returns the current composite op Id. | |
| void | copyMirrorInformationFrom (const KisPainter *other) |
| void | deleteTransaction () |
| KisPaintDeviceSP | device () |
| const KisPaintDeviceSP | device () const |
| Returns the current paint device. | |
| void | drawDDALine (const QPointF &start, const QPointF &end) |
| void | drawLine (const QPointF &start, const QPointF &end) |
| void | drawLine (const QPointF &start, const QPointF &end, qreal width, bool antialias) |
| void | drawPainterPath (const QPainterPath &path, const QPen &pen) |
| void | drawPainterPath (const QPainterPath &path, const QPen &pen, const QRect &requestedRect) |
| void | drawThickLine (const QPointF &start, const QPointF &end, int startWidth, int endWidth) |
| void | drawWobblyLine (const QPointF &start, const QPointF &end) |
| void | drawWuLine (const QPointF &start, const QPointF &end) |
| void | end () |
| KUndo2Command * | endAndTakeTransaction () |
| void | endTransaction (KisPostExecutionUndoAdapter *undoAdapter) |
| void | endTransaction (KisUndoAdapter *undoAdapter) |
| Finish the undoable paint operation. | |
| void | fill (qint32 x, qint32 y, qint32 width, qint32 height, const KoColor &color) |
| void | fillPainterPath (const QPainterPath &path) |
| void | fillPainterPath (const QPainterPath &path, const QRect &requestedRect) |
| void | fillPainterPathImpl (const QPainterPath &path, const QRect &requestedRect) |
| FillStyle | fillStyle () const |
| Returns the current fill style. | |
| qreal | flow () const |
| const KisFilterConfigurationSP | generator () const |
| void | getBezierCurvePoints (const QPointF &pos1, const QPointF &control1, const QPointF &control2, const QPointF &pos2, vQPointF &points) const |
| const KoAbstractGradientSP | gradient () const |
| bool | hasDirtyRegion () const |
| bool | hasHorizontalMirroring () const |
| bool | hasMirroring () const |
| bool | hasVerticalMirroring () const |
| bool | isOpacityUnit () const |
| KisPainter () | |
| Construct painter without a device. | |
| KisPainter (KisPaintDeviceSP device) | |
| Construct a painter, and begin painting on the device. | |
| KisPainter (KisPaintDeviceSP device, KisSelectionSP selection) | |
| Construct a painter, and begin painting on the device. All actions will be masked by the given selection. | |
| void | mirrorDab (Qt::Orientation direction, KisRenderedDab *dab, bool skipMirrorPixels=false) const |
| void | mirrorRect (Qt::Orientation direction, QRect *rc) const |
| qreal | opacityF () const |
| Returns the opacity that is used in painting. | |
| void | paintAt (const KisPaintInformation &pos, KisDistanceInformation *savedDist) |
| void | paintBezierCurve (const KisPaintInformation &pi1, const QPointF &control1, const QPointF &control2, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) |
| const KoColor & | paintColor () const |
| Returns the color that will be used to paint with. | |
| void | paintEllipse (const qreal x, const qreal y, const qreal w, const qreal h) |
| void | paintEllipse (const QRectF &rect) |
| void | paintLine (const KisPaintInformation &pi1, const KisPaintInformation &pi2, KisDistanceInformation *currentDistance) |
| KisPaintOp * | paintOp () const |
| void | paintPainterPath (const QPainterPath &path) |
| void | paintPolygon (const vQPointF &points) |
| void | paintPolyline (const QVector< QPointF > &points, int index=0, int numPoints=-1) |
| void | paintRect (const qreal x, const qreal y, const qreal w, const qreal h) |
| void | paintRect (const QRectF &rect) |
| const KoPatternSP | pattern () const |
| Returns the currently set pattern. | |
| QTransform | patternTransform () |
| get the current transform on the pattern. | |
| KisPaintOpPresetSP | preset () const |
| Return the paintop preset. | |
| Private (KisPainter *_q) | |
| Private (KisPainter *_q, const KoColorSpace *cs) | |
| void | putTransaction (KisTransaction *transaction) |
| continue a transaction started somewhere else | |
| void | renderDabWithMirroringNonIncremental (QRect rc, KisPaintDeviceSP dab) |
| void | renderMirrorMask (QRect rc, KisFixedPaintDeviceSP dab) |
| void | renderMirrorMask (QRect rc, KisFixedPaintDeviceSP dab, KisFixedPaintDeviceSP mask) |
| void | renderMirrorMask (QRect rc, KisPaintDeviceSP dab) |
| void | renderMirrorMask (QRect rc, KisPaintDeviceSP dab, int sx, int sy, KisFixedPaintDeviceSP mask) |
| void | renderMirrorMaskSafe (QRect rc, KisFixedPaintDeviceSP dab, bool preserveDab) |
| void | renderMirrorMaskSafe (QRect rc, KisFixedPaintDeviceSP dab, KisFixedPaintDeviceSP mask, bool preserveDab) |
| void | renderMirrorMaskSafe (QRect rc, KisPaintDeviceSP dab, int sx, int sy, KisFixedPaintDeviceSP mask, bool preserveMask) |
| void | revertTransaction () |
| Cancel all the changes made by the painter. | |
| KisRunnableStrokeJobsInterface * | runnableStrokeJobsInterface () const |
| KisSelectionSP | selection () |
| void | setAntiAliasPolygonFill (bool antiAliasPolygonFill) |
| Set whether a polygon's filled area should be anti-aliased or not. The default is true. | |
| void | setAverageOpacity (qreal averageOpacity) |
| void | setBackgroundColor (const KoColor &color) |
| void | setChannelFlags (QBitArray channelFlags) |
| void | setColorConversionFlags (KoColorConversionTransformation::ConversionFlags conversionFlags) |
| void | setCompositeOpId (const KoCompositeOp *op) |
| void | setCompositeOpId (const QString &op) |
| Set the composite op for this painter by string. | |
| void | setFillStyle (FillStyle fillStyle) |
| Set the current style with which to fill. | |
| void | setFlow (qreal flow) |
| void | setGenerator (KisFilterConfigurationSP generator) |
| Set the current generator (a generator can be used to fill an area. | |
| void | setGradient (const KoAbstractGradientSP gradient) |
| void | setMaskImageSize (qint32 width, qint32 height) |
| void | setMirrorInformation (const QPointF &axesCenter, bool mirrorHorizontally, bool mirrorVertically) |
| void | setOpacityF (qreal opacity) |
| void | setOpacityToUnit () |
| void | setOpacityU8 (quint8 opacity) |
| Set the opacity which is used in painting (like filling polygons) | |
| void | setOpacityUpdateAverage (qreal opacity) |
| void | setPaintColor (const KoColor &color) |
| void | setPaintOpPreset (KisPaintOpPresetSP preset, KisNodeSP node, KisImageSP image) |
| void | setPattern (const KoPatternSP pattern) |
| Set the current pattern. | |
| void | setPatternTransform (QTransform transform) |
| Set the transform on the pattern. | |
| void | setProgress (KoUpdater *progressUpdater) |
| void | setRenderingIntent (KoColorConversionTransformation::Intent intent) |
| void | setRunnableStrokeJobsInterface (KisRunnableStrokeJobsInterface *interface) |
| void | setSelection (KisSelectionSP selection) |
| void | setStrokeStyle (StrokeStyle strokeStyle) |
| Set the current brush stroke style. | |
| StrokeStyle | strokeStyle () const |
| Returns the current brush stroke style. | |
| QVector< QRect > | takeDirtyRegion () |
| KisTransaction * | takeTransaction () |
| take transaction out of the reach of KisPainter | |
| bool | tryReduceSourceRect (const KisPaintDevice *srcDev, QRect *srcRect, qint32 *srcX, qint32 *srcY, qint32 *srcWidth, qint32 *srcHeight, qint32 *dstX, qint32 *dstY) |
| virtual | ~KisPainter () |
Public Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
Protected Member Functions | |
| KisSelectionSP | currentFillSelection () const |
| void | genericFillEnd (KisPaintDeviceSP filled) |
| void | genericFillStart (int startX, int startY, KisPaintDeviceSP sourceDevice) |
| void | setCurrentFillSelection (KisSelectionSP fillSelection) |
Protected Member Functions inherited from KisPainter | |
| void | fillPolygon (const vQPointF &points, FillStyle fillStyle) |
| Fill the polygon defined by points with the fillStyle. | |
| void | init () |
| Initialize, set everything to '0' or defaults. | |
| KoUpdater * | progressUpdater () |
Private Member Functions | |
| void | initFillPainter () |
Private Attributes | |
| bool | m_antiAlias |
| bool | m_careForSelection |
| int | m_closeGap |
| int | m_feather |
| KisSelectionSP | m_fillSelection |
| int | m_height |
| int | m_opacitySpread |
| QRect | m_rect |
| KoColor | m_regionFillingBoundaryColor |
| RegionFillingMode | m_regionFillingMode |
| int | m_sizemod |
| bool | m_stopGrowingAtDarkestPixel |
| int | m_threshold |
| bool | m_useCompositing |
| bool | m_useSelectionAsBoundary |
| int | m_width |
This painter can be used to fill paint devices in different ways. This can also be used for flood filling related operations.
Definition at line 33 of file kis_fill_painter.h.
| Enumerator | |
|---|---|
| RegionFillingMode_FloodFill | |
| RegionFillingMode_BoundaryFill | |
Definition at line 37 of file kis_fill_painter.h.
| KisFillPainter::KisFillPainter | ( | ) |
Construct an empty painter. Use the begin(KisPaintDeviceSP) method to attach to a paint device
Definition at line 51 of file kis_fill_painter.cc.
References initFillPainter().
| KisFillPainter::KisFillPainter | ( | KisPaintDeviceSP | device | ) |
Start painting on the specified paint device
Definition at line 57 of file kis_fill_painter.cc.
References initFillPainter().
| KisFillPainter::KisFillPainter | ( | KisPaintDeviceSP | device, |
| KisSelectionSP | selection ) |
Definition at line 63 of file kis_fill_painter.cc.
References initFillPainter().
|
inline |
Get if antiAlias should be applied to the selection
Definition at line 353 of file kis_fill_painter.h.
|
inline |
If true, floodfill doesn't fill outside the selected area of a layer
Definition at line 338 of file kis_fill_painter.h.
|
inline |
Defines the gap closing radius for the contiguous selection and fill operations. Does not affect the fill similar regions operation.
Definition at line 315 of file kis_fill_painter.h.
| KisPixelSelectionSP KisFillPainter::createFloodSelection | ( | int | startX, |
| int | startY, | ||
| KisPaintDeviceSP | sourceDevice, | ||
| KisPaintDeviceSP | existingSelection ) |
Returns a selection mask for the floodfill starting at the specified position. This variant basically creates a new selection object and passes it down to the other variant of the function.
| startX | the X position where the floodfill starts |
| startY | the Y position where the floodfill starts |
| sourceDevice | the sourceDevice that determines the area that is floodfilled if sampleMerged is on |
Definition at line 342 of file kis_fill_painter.cc.
References createFloodSelection(), and KisPainter::device.
| KisPixelSelectionSP KisFillPainter::createFloodSelection | ( | KisPixelSelectionSP | newSelection, |
| int | startX, | ||
| int | startY, | ||
| KisPaintDeviceSP | sourceDevice, | ||
| KisPaintDeviceSP | existingSelection ) |
Returns a selection mask for the floodfill starting at the specified position. This variant requires an empty selection object. It is used in cases where the pointer to the selection must be known beforehand, for example when the selection is filled in a stroke and then the pointer to the pixel selection is needed later.
| selection | empty new selection object |
| startX | the X position where the floodfill starts |
| startY | the Y position where the floodfill starts |
| sourceDevice | the sourceDevice that determines the area that is floodfilled if sampleMerged is on |
Definition at line 349 of file kis_fill_painter.cc.
References dbgImage, KisScanlineFill::fillSelection(), KisScanlineFill::fillSelectionUntilColor(), KisSharedPtr< T >::isNull(), m_antiAlias, m_careForSelection, m_closeGap, m_feather, m_height, m_opacitySpread, m_regionFillingBoundaryColor, m_regionFillingMode, m_sizemod, m_stopGrowingAtDarkestPixel, m_threshold, m_useCompositing, m_useSelectionAsBoundary, m_width, KisFeatherSelectionFilter::process(), KisGrowSelectionFilter::process(), KisShrinkSelectionFilter::process(), KisAntiAliasSelectionFilter::process(), KisGrowUntilDarkestPixelSelectionFilter::process(), RegionFillingMode_FloodFill, KisSelection::selectedExactRect(), KisPixelSelection::selectedRect(), KisPainter::selection, KisScanlineFill::setCloseGap(), KisScanlineFill::setOpacitySpread(), and KisScanlineFill::setThreshold().
| void KisFillPainter::createSimilarColorsSelection | ( | KisPixelSelectionSP | outSelection, |
| const KoColor & | referenceColor, | ||
| KisPaintDeviceSP | referenceDevice, | ||
| const QRect & | rect, | ||
| KisPixelSelectionSP | mask ) |
Fills all the pixels of the outSelection device inside rect if the corresponding pixels on referenceDevice are similar to referenceColor
| outSelection | the selection where the values are written to |
| referenceColor | the color that we have to compare pixels to |
| referenceDevice | the device that we have to use to compare colors |
| rect | the rectangle that defines the area to be processed |
| mask | a selection to mask the results. Set to nullptr if not needed |
Definition at line 476 of file kis_fill_painter.cc.
References KisPaintDevice::colorSpace(), KoColor::convertTo(), createSimilarColorsSelectionImpl(), fillThreshold(), opacitySpread(), KisPaintDevice::pixelSize(), and KisPainter::pixelSize.
| QVector< KisStrokeJobData * > KisFillPainter::createSimilarColorsSelectionJobs | ( | KisPixelSelectionSP | outSelection, |
| const QSharedPointer< KoColor > | referenceColor, | ||
| KisPaintDeviceSP | referenceDevice, | ||
| const QRect & | rect, | ||
| KisPixelSelectionSP | mask, | ||
| QSharedPointer< KisProcessingVisitor::ProgressHelper > | progressHelper = nullptr ) |
Create a list of jobs that will fill synchronously all the pixels of the outSelection device inside rect if the corresponding pixels on referenceDevice are similar to referenceColor. rect is split into smaller rects if needed, and the painting of each one is distributed on several jobs
| outSelection | the selection where the values are written to |
| referenceColor | the color that we have to compare pixels to |
| referenceDevice | the device that we have to use to compare colors |
| rect | the rectangle that defines the area to be processed |
| mask | a selection to mask the results. Set to nullptr if not needed |
Definition at line 533 of file kis_fill_painter.cc.
References KritaUtils::addJobBarrier(), KritaUtils::addJobConcurrent(), KritaUtils::addJobSequential(), antiAlias(), KisPixelSelection::applySelection(), KisPaintDevice::colorSpace(), KoColor::convertTo(), createSimilarColorsSelectionImpl(), feather(), fillThreshold(), opacitySpread(), KritaUtils::optimalPatchSize(), KisPaintDevice::pixelSize(), KisPainter::pixelSize, KisFeatherSelectionFilter::process(), KisGrowSelectionFilter::process(), KisShrinkSelectionFilter::process(), KisAntiAliasSelectionFilter::process(), KisGrowUntilDarkestPixelSelectionFilter::process(), KisPixelSelection::selectedRect(), SELECTION_INTERSECT, KoUpdater::setProgress(), sizemod(), KritaUtils::splitRectIntoPatches(), and stopGrowingAtDarkestPixel().
|
inlineprotected |
Definition at line 435 of file kis_fill_painter.h.
|
inline |
Overloaded version of the above function.
Definition at line 140 of file kis_fill_painter.h.
References KoColorSpaceRegistry::instance(), OPACITY_TRANSPARENT_U8, and KoColorSpaceRegistry::rgb8().
|
inline |
Fill a rectangle with black transparent pixels (0, 0, 0, 0 for RGBA).
Definition at line 130 of file kis_fill_painter.h.
References KoColorSpaceRegistry::instance(), OPACITY_TRANSPARENT_U8, and KoColorSpaceRegistry::rgb8().
|
inline |
defines the feathering radius for selection flood operations, this affects every fill operation except fillRect
Definition at line 375 of file kis_fill_painter.h.
| void KisFillPainter::fillColor | ( | int | startX, |
| int | startY, | ||
| KisPaintDeviceSP | sourceDevice ) |
Fills the enclosed area around the point with the set color. If there is a selection, the whole selection is filled. Note that you must have set the width and height on the painter if you don't have a selection.
| startX | the X position where the floodfill starts |
| startY | the Y position where the floodfill starts |
| sourceDevice | the sourceDevice that determines the area that is floodfilled if sampleMerged is on |
Definition at line 234 of file kis_fill_painter.cc.
References KisPainter::addDirtyRect(), COMPOSITE_OVER, KisPainter::compositeOpId, KisPaintDevice::createCompositionSourceDevice(), KisPainter::device, KisPainter::end(), KisScanlineFill::fill(), KisScanlineFill::fillExtent, fillRect(), KisScanlineFill::fillUntilColor(), genericFillEnd(), genericFillStart(), KisPainter::isOpacityUnit, m_feather, m_height, m_regionFillingBoundaryColor, m_regionFillingMode, m_sizemod, m_threshold, m_useCompositing, m_width, KisPainter::paintColor, RegionFillingMode_FloodFill, KisScanlineFill::setThreshold(), and warnKrita.
| void KisFillPainter::fillPattern | ( | int | startX, |
| int | startY, | ||
| KisPaintDeviceSP | sourceDevice, | ||
| QTransform | patternTransform = QTransform() ) |
Fills the enclosed area around the point with the set pattern. If there is a selection, the whole selection is filled. Note that you must have set the width and height on the painter if you don't have a selection.
| startX | the X position where the floodfill starts |
| startY | the Y position where the floodfill starts |
| sourceDevice | the sourceDevice that determines the area that is floodfilled if sampleMerged is on |
| patternTransform | transform applied to the pattern; |
Definition at line 277 of file kis_fill_painter.cc.
References KisPaintDevice::createCompositionSourceDevice(), KisPainter::device, KisPainter::end(), fillRectNoCompose(), genericFillEnd(), genericFillStart(), m_height, m_width, KisPainter::pattern, and KisPainter::patternTransform.
| void KisFillPainter::fillRect | ( | const QRect & | rc, |
| const KisPaintDeviceSP | device, | ||
| const QRect & | deviceRect ) |
Overloaded version of the above function.
Definition at line 174 of file kis_fill_painter.cc.
References KisPainter::device, and fillRect().
Overloaded version of the above function.
Definition at line 98 of file kis_fill_painter.h.
References OPACITY_OPAQUE_U8.
Overloaded version of the above function.
Definition at line 81 of file kis_fill_painter.h.
| void KisFillPainter::fillRect | ( | const QRect & | rc, |
| const KoPatternSP | pattern, | ||
| const QPoint & | offset = QPoint() ) |
Overloaded version of the above function.
Definition at line 112 of file kis_fill_painter.cc.
References fillRect(), and KisPainter::pattern.
Fill a rectangle with a certain color.
Definition at line 90 of file kis_fill_painter.h.
References OPACITY_OPAQUE_U8.
| void KisFillPainter::fillRect | ( | qint32 | x, |
| qint32 | y, | ||
| qint32 | w, | ||
| qint32 | h, | ||
| const KoColor & | c, | ||
| quint8 | opacity ) |
Fill a rectangle with a certain color and opacity.
Definition at line 96 of file kis_fill_painter.cc.
References KisPainter::addDirtyRect(), KisPaintDevice::colorSpace(), KisPainter::colorSpace, KoColor::convertTo(), KoColor::data(), KisPainter::device, KisPaintDevice::fill(), and KoColorSpace::setOpacity().
| void KisFillPainter::fillRect | ( | qint32 | x1, |
| qint32 | y1, | ||
| qint32 | w, | ||
| qint32 | h, | ||
| const KisFilterConfigurationSP | generator ) |
Fill the specified area with the output of the generator plugin that is configured in the generator parameter
Definition at line 215 of file kis_fill_painter.cc.
References KisPainter::addDirtyRect(), KisPainter::device, KisGenerator::generate(), KisPainter::generator, KisGeneratorRegistry::instance(), and KoGenericRegistry< T >::value().
| void KisFillPainter::fillRect | ( | qint32 | x1, |
| qint32 | y1, | ||
| qint32 | w, | ||
| qint32 | h, | ||
| const KisPaintDeviceSP | device, | ||
| const QRect & | deviceRect ) |
Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the entire rectangle.
This one uses blitting and thus makes use of proper composition.
Definition at line 179 of file kis_fill_painter.cc.
References KisPainter::addDirtyRect(), KisPainter::bitBlt(), KisPainter::device, fillRect(), and value().
| void KisFillPainter::fillRect | ( | qint32 | x1, |
| qint32 | y1, | ||
| qint32 | w, | ||
| qint32 | h, | ||
| const KoPatternSP | pattern, | ||
| const QPoint & | offset = QPoint() ) |
Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the entire rectangle.
Definition at line 117 of file kis_fill_painter.cc.
References KisPaintDevice::convertFromQImage(), KisPainter::device, fillRect(), KisPaintDevice::moveTo(), and KisPainter::pattern.
| void KisFillPainter::fillRectNoCompose | ( | const QRect & | rc, |
| const KoPatternSP | pattern, | ||
| const QTransform | transform ) |
fillRect Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the entire rectangle. Differs from other functions that it uses a transform, does not support composite ops in turn.
| rc | rectangle to fill. |
| pattern | pattern to use. |
| transform | transformation to apply to the pattern. |
Definition at line 135 of file kis_fill_painter.cc.
References KisPainter::colorSpace, KisPaintDevice::convertFromQImage(), KisPainter::device, fillRectNoCompose(), and KisPainter::pattern.
| void KisFillPainter::fillRectNoCompose | ( | qint32 | x1, |
| qint32 | y1, | ||
| qint32 | w, | ||
| qint32 | h, | ||
| const KisPaintDeviceSP | device, | ||
| const QRect & | deviceRect, | ||
| const QTransform | transform ) |
Fill a rectangle with a certain pattern. The pattern is repeated if it does not fit the entire rectangle.
This one supports transforms, but does not use blitting.
Since this function doesn't do any kind of compositing, so the pixel size of the source and destination devices must be exactly the same. The color space should ideally be also the same.
Definition at line 149 of file kis_fill_painter.cc.
References KisPainter::addDirtyRect(), KisPaintDevice::colorSpace(), KisPaintDevice::defaultBounds(), KisPainter::device, KIS_SAFE_ASSERT_RECOVER_NOOP, KIS_SAFE_ASSERT_RECOVER_RETURN, KisPaintDevice::pixelSize(), KisPainter::progressUpdater, KisPerspectiveTransformWorker::runPartialDst(), KisPaintDevice::setDefaultBounds(), KisPaintDevice::setSupportsWraparoundMode(), and KisPaintDevice::supportsWraproundMode().
Fill current selection of KisPainter with a specified color.
The filling rect is limited by rc to allow multithreaded filling/processing.
Definition at line 85 of file kis_fill_painter.cc.
References KisPainter::bitBlt(), KisPainter::colorSpace, KisPainter::device, and KisPaintDevice::setDefaultPixel().
|
inline |
Returns the fill threshold, see setFillThreshold for details
Definition at line 281 of file kis_fill_painter.h.
|
protected |
Apply the real selection to a filled one
Definition at line 306 of file kis_fill_painter.cc.
References KisPixelSelection::applySelection(), KisPainter::bitBlt(), m_fillSelection, m_height, m_width, KisSelection::pixelSelection, KisPainter::progressUpdater, KisSelection::projection(), KisPixelSelection::selectedExactRect(), KisSelection::selectedExactRect(), KisPainter::selection, SELECTION_INTERSECT, KoUpdater::setProgress(), and KisPainter::setSelection().
|
protected |
Definition at line 291 of file kis_fill_painter.cc.
References KisPixelSelection::applySelection(), createFloodSelection(), KisPaintDevice::defaultBounds(), KisImageResolutionProxy::identity(), m_fillSelection, m_height, m_width, KisSelection::pixelSelection, KisPainter::selection, and SELECTION_REPLACE.
|
private |
Definition at line 69 of file kis_fill_painter.cc.
References m_antiAlias, m_careForSelection, m_closeGap, m_feather, m_height, m_opacitySpread, m_regionFillingMode, m_sizemod, m_stopGrowingAtDarkestPixel, m_threshold, m_useCompositing, m_useSelectionAsBoundary, m_width, and RegionFillingMode_FloodFill.
|
inline |
Returns the fill opacity spread, see setOpacitySpread for details
Definition at line 302 of file kis_fill_painter.h.
|
inline |
Gets the color of the boundary used when the region filling mode is RegionFillingMode_BoundaryFill
Definition at line 409 of file kis_fill_painter.h.
|
inline |
Gets the region filling mode
Definition at line 395 of file kis_fill_painter.h.
|
inline |
Sets if antiAlias should be applied to the selection
Definition at line 348 of file kis_fill_painter.h.
|
inline |
Set caring for selection. See careForSelection for details
Definition at line 343 of file kis_fill_painter.h.
|
inline |
Sets the gap radius for a gap closing fill.
Definition at line 307 of file kis_fill_painter.h.
|
inlineprotected |
Definition at line 430 of file kis_fill_painter.h.
|
inline |
Sets feathering radius
Definition at line 369 of file kis_fill_painter.h.
|
inline |
Set the threshold for floodfill. The range is 0-255: 0 means the fill will only fill parts that are the exact same color, 255 means anything will be filled
Definition at line 275 of file kis_fill_painter.h.
|
inline |
Sets the height of the paint device
Definition at line 333 of file kis_fill_painter.h.
|
inline |
Set the opacity spread for floodfill. The range is 0-100: 0% means that the fully opaque area only encompasses the pixels exactly equal to the seed point with the other pixels of the selected region being semi-transparent (depending on how similar they are to the seed pixel) up to the region boundary (given by the threshold value). 100 means that the fully opaque area will encompass all the pixels of the selected region up to the contour. Any value in between will make the fully opaque portion of the region vary in size, with semi-transparent pixels in between it and the region boundary
Definition at line 296 of file kis_fill_painter.h.
|
inline |
Sets the color of the boundary used when the region filling mode is RegionFillingMode_BoundaryFill
Definition at line 402 of file kis_fill_painter.h.
|
inline |
Sets the region filling mode
Definition at line 390 of file kis_fill_painter.h.
|
inline |
Sets the auto growth/shrinking radius
Definition at line 358 of file kis_fill_painter.h.
|
inline |
Sets if the selection should stop growing at the darkest and/or more opaque pixel when using a positive grow value (sizemod)
Definition at line 417 of file kis_fill_painter.h.
|
inline |
Definition at line 323 of file kis_fill_painter.h.
|
inline |
Sets selection borders being treated as boundary
Definition at line 380 of file kis_fill_painter.h.
|
inline |
Sets the width of the paint device
Definition at line 328 of file kis_fill_painter.h.
|
inline |
Sets how much to auto-grow or shrink (if sizemod is negative) the selection flood before painting, this affects every fill operation except fillRect
Definition at line 364 of file kis_fill_painter.h.
|
inline |
Gets if the selection should stop growing at the darkest and/or more opaque pixel when using a positive grow value (sizemod)
Definition at line 425 of file kis_fill_painter.h.
|
inline |
Definition at line 319 of file kis_fill_painter.h.
|
inline |
defines if the selection borders are treated as boundary in flood fill or not
Definition at line 385 of file kis_fill_painter.h.
|
private |
Definition at line 449 of file kis_fill_painter.h.
|
private |
Definition at line 455 of file kis_fill_painter.h.
|
private |
Definition at line 452 of file kis_fill_painter.h.
|
private |
Definition at line 447 of file kis_fill_painter.h.
|
private |
Definition at line 445 of file kis_fill_painter.h.
|
private |
Definition at line 453 of file kis_fill_painter.h.
|
private |
Definition at line 451 of file kis_fill_painter.h.
|
private |
Definition at line 454 of file kis_fill_painter.h.
|
private |
Definition at line 459 of file kis_fill_painter.h.
|
private |
Definition at line 458 of file kis_fill_painter.h.
|
private |
Definition at line 448 of file kis_fill_painter.h.
|
private |
Definition at line 460 of file kis_fill_painter.h.
|
private |
Definition at line 450 of file kis_fill_painter.h.
|
private |
Definition at line 456 of file kis_fill_painter.h.
|
private |
Definition at line 457 of file kis_fill_painter.h.
|
private |
Definition at line 453 of file kis_fill_painter.h.