krita
KisFillPainter Class Reference
#include <kis_fill_painter.h>

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.
Public Member Functions | |
KisFillPainter () | |
KisFillPainter (KisPaintDeviceSP device) | |
void | eraseRect (Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h) |
void | eraseRect (const QRect &rc) |
void | fillRect (Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const KisColor &c) |
void | fillRect (const QRect &rc, const KisColor &c) |
void | fillRect (Q_INT32 x, Q_INT32 y, Q_INT32 w, Q_INT32 h, const KisColor &c, Q_UINT8 opacity) |
void | fillRect (const QRect &rc, const KisColor &c, Q_UINT8 opacity) |
void | fillRect (Q_INT32 x1, Q_INT32 y1, Q_INT32 w, Q_INT32 h, KisPattern *pattern) |
void | fillRect (const QRect &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) |
Constructor & Destructor Documentation
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.cc.
KisFillPainter::KisFillPainter | ( | KisPaintDeviceSP | device | ) |
Member Function Documentation
void KisFillPainter::eraseRect | ( | Q_INT32 | x1, | |
Q_INT32 | y1, | |||
Q_INT32 | w, | |||
Q_INT32 | h | |||
) | [inline] |
Fill a rectangle with black transparent pixels (0, 0, 0, 0 for RGBA).
Definition at line 173 of file kis_fill_painter.h.
void KisFillPainter::eraseRect | ( | const QRect & | rc | ) | [inline] |
void KisFillPainter::fillRect | ( | Q_INT32 | x, | |
Q_INT32 | y, | |||
Q_INT32 | w, | |||
Q_INT32 | h, | |||
const KisColor & | c | |||
) | [inline] |
void KisFillPainter::fillRect | ( | const QRect & | rc, | |
const KisColor & | c | |||
) | [inline] |
void KisFillPainter::fillRect | ( | Q_INT32 | x, | |
Q_INT32 | y, | |||
Q_INT32 | w, | |||
Q_INT32 | h, | |||
const KisColor & | c, | |||
Q_UINT8 | opacity | |||
) |
Fill a rectangle with a certain color and opacity.
Definition at line 85 of file kis_fill_painter.cc.
void KisFillPainter::fillRect | ( | const QRect & | rc, | |
const KisColor & | c, | |||
Q_UINT8 | opacity | |||
) | [inline] |
void KisFillPainter::fillRect | ( | Q_INT32 | x1, | |
Q_INT32 | y1, | |||
Q_INT32 | w, | |||
Q_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.cc.
void KisFillPainter::fillRect | ( | const QRect & | rc, | |
KisPattern * | pattern | |||
) | [inline] |
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.cc.
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.cc.
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.cc.
void KisFillPainter::setFillThreshold | ( | int | threshold | ) | [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.
int KisFillPainter::fillThreshold | ( | ) | const [inline] |
Returns the fill threshold, see setFillThreshold for details.
Definition at line 115 of file kis_fill_painter.h.
void KisFillPainter::setWidth | ( | int | w | ) | [inline] |
void KisFillPainter::setHeight | ( | int | h | ) | [inline] |
bool KisFillPainter::sampleMerged | ( | ) | const [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.
void KisFillPainter::setSampleMerged | ( | bool | set | ) | [inline] |
Set sample merged.
See sampleMerged() for details
Definition at line 127 of file kis_fill_painter.h.
bool KisFillPainter::careForSelection | ( | ) | const [inline] |
If true, floodfill doesn't fill outside the selected area of a layer.
Definition at line 130 of file kis_fill_painter.h.
void KisFillPainter::setCareForSelection | ( | bool | set | ) | [inline] |
Set caring for selection.
See careForSelection for details
Definition at line 132 of file kis_fill_painter.h.
bool KisFillPainter::fuzzyFill | ( | ) | const [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.
void KisFillPainter::setFuzzyFill | ( | bool | set | ) | [inline] |
Sets the fuzzyfill parameter.
See fuzzyFill for details
Definition at line 141 of file kis_fill_painter.h.
The documentation for this class was generated from the following files: