#include <kis_fill_painter.h>
Public Member Functions | |
| KisFillPainter () | |
| KisFillPainter (KisPaintDeviceSP device) | |
| void | eraseRect (TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h) |
| void | eraseRect (const TQRect &rc) |
| void | fillRect (TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const KisColor &c) |
| void | fillRect (const TQRect &rc, const KisColor &c) |
| void | fillRect (TQ_INT32 x, TQ_INT32 y, TQ_INT32 w, TQ_INT32 h, const KisColor &c, TQ_UINT8 opacity) |
| void | fillRect (const TQRect &rc, const KisColor &c, TQ_UINT8 opacity) |
| void | fillRect (TQ_INT32 x1, TQ_INT32 y1, TQ_INT32 w, TQ_INT32 h, KisPattern *pattern) |
| void | fillRect (const TQRect &rc, KisPattern *pattern) |
| void | fillColor (int startX, int startY) |
| void | fillPattern (int startX, int startY) |
| KisSelectionSP | createFloodSelection (int startX, int startY) |
| void | setFillThreshold (int threshold) |
| int | fillThreshold () const |
| void | setWidth (int w) |
| void | setHeight (int h) |
| bool | sampleMerged () const |
| void | setSampleMerged (bool set) |
| bool | careForSelection () const |
| void | setCareForSelection (bool set) |
| bool | fuzzyFill () const |
| void | setFuzzyFill (bool set) |
| Public Member Functions inherited from KisPainter | |
| KisPainter () | |
| KisPainter (KisPaintDeviceSP device) | |
| void | begin (KisPaintDeviceSP device) |
| KCommand * | end () |
| void | beginTransaction (const TQString &customName=TQString()) |
| KCommand * | endTransaction () |
| void | beginTransaction (KisTransaction *command) |
| KisTransaction * | transaction () |
| KisPaintDeviceSP | device () const |
| void | bitBlt (TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 sw, TQ_INT32 sh) |
| void | bitBlt (TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, TQ_UINT8 opacity, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 sw, TQ_INT32 sh) |
| void | bltMask (TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, KisPaintDeviceSP selMask, TQ_UINT8 opacity, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 sw, TQ_INT32 sh) |
| void | bltSelection (TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, KisSelectionSP selMask, TQ_UINT8 opacity, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 sw, TQ_INT32 sh) |
| void | bltSelection (TQ_INT32 dx, TQ_INT32 dy, const KisCompositeOp &op, KisPaintDeviceSP src, TQ_UINT8 opacity, TQ_INT32 sx, TQ_INT32 sy, TQ_INT32 sw, TQ_INT32 sh) |
| TQRect | dirtyRect () |
| TQRect | addDirtyRect (TQRect r) |
| void | paintPolyline (const TQValueVector< KisPoint > &points, int index=0, int numPoints=-1) |
| double | paintLine (const KisPoint &pos1, const double pressure1, const double xTilt1, const double yTilt1, const KisPoint &pos2, const double pressure2, const double xTilt2, const double yTilt2, const double savedDist=-1) |
| double | paintBezierCurve (const KisPoint &pos1, const double pressure1, const double xTilt1, const double yTilt1, const KisPoint &control1, const KisPoint &control2, const KisPoint &pos2, const double pressure2, const double xTilt2, const double yTilt2, const double savedDist=-1) |
| void | getBezierCurvePoints (const KisPoint &pos1, const KisPoint &control1, const KisPoint &control2, const KisPoint &pos2, vKisPoint &points) |
| void | paintRect (const KisPoint &startPoint, const KisPoint &endPoint, const double pressure, const double xTilt, const double yTilt) |
| void | paintEllipse (const KisPoint &startPoint, const KisPoint &endPoint, const double pressure, const double, const double) |
| void | paintPolygon (const vKisPoint &points) |
| void | paintAt (const KisPoint &pos, const double pressure, const double, const double) |
| void | setVaryBrushSpacingWithPressureWhenDrawingALine (bool varyBrushSpacingWithPressureWhenDrawingALine) |
| bool | varyBrushSpacingWithPressureWhenDrawingALine () |
| void | setBrush (KisBrush *brush) |
| KisBrush * | brush () const |
| void | setPattern (KisPattern *pattern) |
| KisPattern * | pattern () const |
| void | setPaintColor (const KisColor &color) |
| KisColor | paintColor () const |
| void | setBackgroundColor (const KisColor &color) |
| KisColor | backgroundColor () const |
| void | setFillColor (const KisColor &color) |
| KisColor | fillColor () const |
| void | setFillStyle (FillStyle fillStyle) |
| FillStyle | fillStyle () const |
| void | setStrokeStyle (StrokeStyle strokeStyle) |
| StrokeStyle | strokeStyle () const |
| void | setOpacity (TQ_UINT8 opacity) |
| TQ_UINT8 | opacity () const |
| void | setCompositeOp (const KisCompositeOp &op) |
| KisCompositeOp | compositeOp () const |
| void | setFilter (KisFilterSP filter) |
| KisFilterSP | filter () |
| void | setDuplicateOffset (const KisPoint &offset) |
| KisPoint | duplicateOffset () |
| void | setDuplicateHealing (bool v) |
| bool | duplicateHealing () |
| void | setDuplicateHealingRadius (int r) |
| int | duplicateHealingRadius () |
| void | setDuplicatePerspectiveCorrection (bool v) |
| bool | duplicatePerspectiveCorrection () |
| void | setDuplicateStart (const KisPoint start) |
| KisPoint | duplicateStart () |
| void | setPressure (double pressure) |
| double | pressure () |
| void | setPaintOp (KisPaintOp *paintOp) |
| KisPaintOp * | paintOp () const |
| void | setDab (KisPaintDeviceSP dab) |
| KisPaintDeviceSP | dab () const |
| bool | cancelRequested () const |
Additional Inherited Members | |
| Public Types inherited from KisPainter | |
| enum | FillStyle { FillStyleNone , FillStyleForegroundColor , FillStyleBackgroundColor , FillStylePattern , FillStyleGradient , FillStyleStrokes } |
| enum | StrokeStyle { StrokeStyleNone , StrokeStyleBrush } |
| Protected Member Functions inherited from KisPainter | |
| void | init () |
| KisPainter (const KisPainter &) | |
| KisPainter & | operator= (const KisPainter &) |
| void | fillPolygon (const vKisPoint &points, FillStyle fillStyle) |
| Static Protected Member Functions inherited from KisPainter | |
| static double | pointToLineDistance (const KisPoint &p, const KisPoint &l0, const KisPoint &l1) |
| Protected Attributes inherited from KisPainter | |
| KisPaintDeviceSP | m_device |
| KisTransaction * | m_transaction |
| TQRect | m_dirtyRect |
| KisColor | m_paintColor |
| KisColor | m_backgroundColor |
| KisColor | m_fillColor |
| FillStyle | m_fillStyle |
| StrokeStyle | m_strokeStyle |
| KisBrush * | m_brush |
| KisPattern * | m_pattern |
| KisPoint | m_duplicateOffset |
| KisPoint | m_duplicateStart |
| bool | m_duplicateHealing |
| int | m_duplicateHealingRadius |
| bool | m_duplicatePerspectiveCorrection |
| TQ_UINT8 | m_opacity |
| KisCompositeOp | m_compositeOp |
| KisFilterSP | m_filter |
| KisPaintOp * | m_paintOp |
| double | m_pressure |
| bool | m_cancelRequested |
| TQ_INT32 | m_pixelSize |
| KisColorSpace * | m_colorSpace |
| KisProfile * | m_profile |
| KisPaintDeviceSP | m_dab |
| bool | m_varyBrushSpacingWithPressureWhenDrawingALine |
Detailed Description
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 38 of file kis_fill_painter.h.
Constructor & Destructor Documentation
◆ KisFillPainter() [1/2]
| KisFillPainter::KisFillPainter | ( | ) |
Construct an empty painter.
Use the begin(KisPaintDeviceSP) method to attach to a paint device
Definition at line 65 of file kis_fill_painter.cpp.
◆ KisFillPainter() [2/2]
| KisFillPainter::KisFillPainter | ( | KisPaintDeviceSP | device | ) |
Start painting on the specified paint device.
Definition at line 74 of file kis_fill_painter.cpp.
Member Function Documentation
◆ careForSelection()
|
inline |
If true, floodfill doesn't fill outside the selected area of a layer.
Definition at line 130 of file kis_fill_painter.h.
◆ createFloodSelection()
| KisSelectionSP KisFillPainter::createFloodSelection | ( | int | startX, |
| int | startY ) |
Returns a selection mask for the floodfill starting at the specified position.
Definition at line 214 of file kis_fill_painter.cpp.
◆ eraseRect() [1/2]
|
inline |
Overloaded version of the above function.
Definition at line 181 of file kis_fill_painter.h.
◆ eraseRect() [2/2]
|
inline |
Fill a rectangle with black transparent pixels (0, 0, 0, 0 for RGBA).
Definition at line 173 of file kis_fill_painter.h.
◆ fillColor()
| void KisFillPainter::fillColor | ( | int | startX, |
| int | startY ) |
Fills the enclosed area around the point with the set color.
If there is a selection, the whole selection is filled
Definition at line 145 of file kis_fill_painter.cpp.
◆ fillPattern()
| void KisFillPainter::fillPattern | ( | int | startX, |
| int | startY ) |
Fills the enclosed area around the point with the set pattern.
If there is a selection, the whole selection is filled
Definition at line 158 of file kis_fill_painter.cpp.
◆ fillRect() [1/6]
|
inline |
Overloaded version of the above function.
Definition at line 167 of file kis_fill_painter.h.
◆ fillRect() [2/6]
|
inline |
Overloaded version of the above function.
Definition at line 189 of file kis_fill_painter.h.
◆ fillRect() [3/6]
|
inline |
Overloaded version of the above function.
Definition at line 195 of file kis_fill_painter.h.
◆ fillRect() [4/6]
|
inline |
Fill a rectangle with a certain color.
Definition at line 161 of file kis_fill_painter.h.
◆ fillRect() [5/6]
| void KisFillPainter::fillRect | ( | TQ_INT32 | x, |
| TQ_INT32 | y, | ||
| TQ_INT32 | w, | ||
| TQ_INT32 | h, | ||
| const KisColor & | c, | ||
| TQ_UINT8 | opacity ) |
Fill a rectangle with a certain color and opacity.
Definition at line 85 of file kis_fill_painter.cpp.
◆ fillRect() [6/6]
| void KisFillPainter::fillRect | ( | TQ_INT32 | x1, |
| TQ_INT32 | y1, | ||
| TQ_INT32 | w, | ||
| TQ_INT32 | h, | ||
| KisPattern * | pattern ) |
Fill a rectangle with a certain pattern.
The pattern is repeated if it does not fit the entire rectangle.
Definition at line 101 of file kis_fill_painter.cpp.
◆ fillThreshold()
|
inline |
Returns the fill threshold, see setFillThreshold for details.
Definition at line 115 of file kis_fill_painter.h.
◆ fuzzyFill()
|
inline |
If true, the floodfill will be fuzzy.
This means that the 'value' of selectedness will depend on the difference between the sampled color and the color at the current position.
Definition at line 139 of file kis_fill_painter.h.
◆ sampleMerged()
|
inline |
If sample merged is set to true, the paint device will get the bounds of the floodfill from the complete image instead of the layer.
Definition at line 125 of file kis_fill_painter.h.
◆ setCareForSelection()
|
inline |
Set caring for selection.
See careForSelection for details
Definition at line 132 of file kis_fill_painter.h.
◆ setFillThreshold()
|
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 201 of file kis_fill_painter.h.
◆ setFuzzyFill()
|
inline |
Sets the fuzzyfill parameter.
See fuzzyFill for details
Definition at line 141 of file kis_fill_painter.h.
◆ setHeight()
|
inline |
Sets the height of the layer.
Definition at line 121 of file kis_fill_painter.h.
◆ setSampleMerged()
|
inline |
Set sample merged.
See sampleMerged() for details
Definition at line 127 of file kis_fill_painter.h.
◆ setWidth()
|
inline |
Sets the width of the layer.
Definition at line 118 of file kis_fill_painter.h.
The documentation for this class was generated from the following files:
