|
Krita Source Code Documentation
|
#include <kis_outline_generator.h>
Public Member Functions | |
| KisOutlineGenerator (const KoColorSpace *cs, quint8 defaultOpacity) | |
| QVector< QPolygon > | outline (const KisPaintDevice *buffer, qint32 xOffset, qint32 yOffset, qint32 width, qint32 height) |
| QVector< QPolygon > | outline (quint8 *buffer, qint32 xOffset, qint32 yOffset, qint32 width, qint32 height) |
| void | setSimpleOutline (bool simple) |
Private Types | |
| enum | EdgeType { TopEdge = 1 , LeftEdge = 2 , BottomEdge = 3 , RightEdge = 0 , NoEdge = 4 } |
Private Member Functions | |
| void | appendCoordinate (QPolygon *path, int x, int y, EdgeType edge, EdgeType prevEdge) |
| template<class StorageStrategy > | |
| bool | isOutlineEdge (StorageStrategy &storage, EdgeType edge, qint32 x, qint32 y, qint32 bufWidth, qint32 bufHeight) |
| EdgeType | nextEdge (EdgeType edge) |
| template<class StorageStrategy > | |
| void | nextOutlineEdge (StorageStrategy &storage, EdgeType *edge, qint32 *row, qint32 *col, qint32 width, qint32 height) |
| template<class StorageStrategy > | |
| QVector< QPolygon > | outlineImpl (typename StorageStrategy::StorageType buffer, qint32 xOffset, qint32 yOffset, qint32 width, qint32 height) |
Private Attributes | |
| KisRandomConstAccessorSP | m_accessor |
| const KoColorSpace * | m_cs |
| quint8 | m_defaultOpacity |
| bool | m_simple |
Generates an 'outline' for a paint device. Used e.g. in for brushes and marching ants
Definition at line 26 of file kis_outline_generator.h.
|
private |
| Enumerator | |
|---|---|
| TopEdge | |
| LeftEdge | |
| BottomEdge | |
| RightEdge | |
| NoEdge | |
Definition at line 62 of file kis_outline_generator.h.
| KisOutlineGenerator::KisOutlineGenerator | ( | const KoColorSpace * | cs, |
| quint8 | defaultOpacity ) |
Create an outline generator
| cs | colorspace for the buffer passed to the generator |
| defaultOpacity | opacity of pixels that shouldn't be included in the outline |
Definition at line 84 of file kis_outline_generator.cpp.
|
private |
Definition at line 246 of file kis_outline_generator.cpp.
References BottomEdge, RightEdge, and TopEdge.
|
private |
Definition at line 176 of file kis_outline_generator.cpp.
References BottomEdge, LeftEdge, m_cs, m_defaultOpacity, NoEdge, KoColorSpace::opacityU8(), RightEdge, and TopEdge.
Definition at line 77 of file kis_outline_generator.h.
|
private |
Definition at line 211 of file kis_outline_generator.cpp.
References BottomEdge, LeftEdge, nextEdge(), RightEdge, TopEdge, and TRY_PIXEL.
| QVector< QPolygon > KisOutlineGenerator::outline | ( | const KisPaintDevice * | buffer, |
| qint32 | xOffset, | ||
| qint32 | yOffset, | ||
| qint32 | width, | ||
| qint32 | height ) |
Definition at line 170 of file kis_outline_generator.cpp.
| QVector< QPolygon > KisOutlineGenerator::outline | ( | quint8 * | buffer, |
| qint32 | xOffset, | ||
| qint32 | yOffset, | ||
| qint32 | width, | ||
| qint32 | height ) |
Generates the outline.
| buffer | buffer with the data for the outline |
| xOffset | offset that will be used for the x coordinate of the polygon points |
| yOffset | offset that will be used for the y coordinate of the polygon points |
| width | width of the buffer |
| height | height of the buffer |
Definition at line 165 of file kis_outline_generator.cpp.
|
private |
Definition at line 90 of file kis_outline_generator.cpp.
References appendCoordinate(), BottomEdge, isOutlineEdge(), m_cs, m_defaultOpacity, m_simple, nextEdge(), nextOutlineEdge(), NoEdge, KoColorSpace::opacityU8(), KoColorSpace::pixelSize(), TopEdge, and warnKrita.
| void KisOutlineGenerator::setSimpleOutline | ( | bool | simple | ) |
Set the generator to produce simpile outline, skipping outline that are fully enclosed
| simple | set simple mode, if true enclosed outline will be skipped |
Definition at line 266 of file kis_outline_generator.cpp.
References m_simple.
|
private |
Definition at line 89 of file kis_outline_generator.h.
|
private |
Definition at line 85 of file kis_outline_generator.h.
|
private |
Definition at line 86 of file kis_outline_generator.h.
|
private |
Definition at line 87 of file kis_outline_generator.h.