|
Krita Source Code Documentation
|
#include <SvgMeshArray.h>
Public Member Functions | |
| bool | addPatch (QList< QPair< QString, QColor > > stops, const QPointF initialPoint) |
| QRectF | boundingRect () const |
| void | createDefaultMesh (const int nrows, const int ncols, const QColor color, const QSizeF size) |
| creates a default mesh in OBB coordinates (because it's easier and more logical in this case) | |
| QVector< SvgMeshPosition > | getConnectedPaths (const SvgMeshPosition &position) const |
| Return the paths connected to the corner. Can be thought of as edges connected to a vertex. | |
| SvgMeshPatch * | getPatch (const int row, const int col) const |
| std::array< QPointF, 4 > | getPath (const SvgMeshPatch::Type edge, const int row, const int col) const |
| Get the Path Points for a segment of the meshpatch. | |
| SvgMeshPath | getPath (const SvgMeshPosition &pos) const |
| SvgMeshStop | getStop (const SvgMeshPatch::Type edge, const int row, const int col) const |
| Get the point of a node in mesharray. | |
| SvgMeshStop | getStop (const SvgMeshPosition &pos) const |
| void | modifyColor (const SvgMeshPosition &position, const QColor &color) |
| void | modifyCorner (const SvgMeshPosition &position, const QPointF &newPos) |
| void | modifyHandle (const SvgMeshPosition &position, const std::array< QPointF, 4 > &newPath) |
| void | newRow () |
| int | numColumns () const |
| int | numRows () const |
| void | setTransform (const QTransform &matrix) |
| SvgMeshArray () | |
| SvgMeshArray (const SvgMeshArray &other) | |
| ~SvgMeshArray () | |
Private Member Functions | |
| QColor | getColor (SvgMeshPatch::Type edge, int row, int col) const |
| QVector< SvgMeshPosition > | getSharedPaths (const SvgMeshPosition &position) const |
Private Attributes | |
| QVector< QVector< SvgMeshPatch * > > | m_array |
| where each vector is a meshrow | |
Definition at line 37 of file SvgMeshArray.h.
| SvgMeshArray::SvgMeshArray | ( | ) |
Definition at line 11 of file SvgMeshArray.cpp.
| SvgMeshArray::SvgMeshArray | ( | const SvgMeshArray & | other | ) |
Definition at line 15 of file SvgMeshArray.cpp.
| SvgMeshArray::~SvgMeshArray | ( | ) |
Definition at line 25 of file SvgMeshArray.cpp.
References m_array.
| bool SvgMeshArray::addPatch | ( | QList< QPair< QString, QColor > > | stops, |
| const QPointF | initialPoint ) |
Definition at line 96 of file SvgMeshArray.cpp.
References SvgMeshPatch::addStop(), SvgMeshPatch::Bottom, SvgMeshStop::color, getColor(), getPath(), getStop(), SvgMeshPatch::Left, m_array, SvgMeshPatch::Right, and SvgMeshPatch::Top.
| QRectF SvgMeshArray::boundingRect | ( | ) | const |
Definition at line 238 of file SvgMeshArray.cpp.
References KIS_ASSERT, m_array, numColumns(), and numRows().
| void SvgMeshArray::createDefaultMesh | ( | const int | nrows, |
| const int | ncols, | ||
| const QColor | color, | ||
| const QSizeF | size ) |
creates a default mesh in OBB coordinates (because it's easier and more logical in this case)
Definition at line 39 of file SvgMeshArray.cpp.
References SvgMeshPatch::addStopLinear(), SvgMeshPatch::Bottom, SvgMeshPatch::getStop(), SvgMeshPatch::Left, m_array, newRow(), SvgMeshStop::point, SvgMeshPatch::Right, and SvgMeshPatch::Top.
|
private |
Definition at line 380 of file SvgMeshArray.cpp.
References SvgMeshStop::color, and getStop().
| QVector< SvgMeshPosition > SvgMeshArray::getConnectedPaths | ( | const SvgMeshPosition & | position | ) | const |
Return the paths connected to the corner. Can be thought of as edges connected to a vertex.
Definition at line 271 of file SvgMeshArray.cpp.
References SvgMeshPosition::col, SvgMeshPatch::Left, SvgMeshPatch::Right, SvgMeshPosition::row, SvgMeshPosition::segmentType, SvgMeshPatch::Size, and SvgMeshPatch::Top.
| SvgMeshPatch * SvgMeshArray::getPatch | ( | const int | row, |
| const int | col ) const |
Definition at line 209 of file SvgMeshArray.cpp.
References KIS_ASSERT, and m_array.
| std::array< QPointF, 4 > SvgMeshArray::getPath | ( | const SvgMeshPatch::Type | edge, |
| const int | row, | ||
| const int | col ) const |
Get the Path Points for a segment of the meshpatch.
Definition at line 196 of file SvgMeshArray.cpp.
References KIS_ASSERT, and m_array.
| SvgMeshPath SvgMeshArray::getPath | ( | const SvgMeshPosition & | pos | ) | const |
Definition at line 204 of file SvgMeshArray.cpp.
References SvgMeshPosition::col, getPath(), SvgMeshPosition::row, and SvgMeshPosition::segmentType.
|
private |
return the shared path between two patches. NOTE: Not to be confused with getConnectedPaths
Definition at line 345 of file SvgMeshArray.cpp.
References SvgMeshPatch::Bottom, SvgMeshPosition::col, SvgMeshPatch::Left, SvgMeshPatch::Right, SvgMeshPosition::row, SvgMeshPosition::segmentType, SvgMeshPatch::Size, and SvgMeshPatch::Top.
| SvgMeshStop SvgMeshArray::getStop | ( | const SvgMeshPatch::Type | edge, |
| const int | row, | ||
| const int | col ) const |
Get the point of a node in mesharray.
Definition at line 167 of file SvgMeshArray.cpp.
References SvgMeshPatch::Bottom, SvgMeshPatch::countPoints(), getStop(), SvgMeshPatch::getStop(), SvgMeshStop::isValid(), KIS_ASSERT, SvgMeshPatch::Left, m_array, and SvgMeshPatch::Top.
| SvgMeshStop SvgMeshArray::getStop | ( | const SvgMeshPosition & | pos | ) | const |
Definition at line 191 of file SvgMeshArray.cpp.
References SvgMeshPosition::col, getStop(), SvgMeshPosition::row, and SvgMeshPosition::segmentType.
| void SvgMeshArray::modifyColor | ( | const SvgMeshPosition & | position, |
| const QColor & | color ) |
Definition at line 336 of file SvgMeshArray.cpp.
References getSharedPaths(), and m_array.
| void SvgMeshArray::modifyCorner | ( | const SvgMeshPosition & | position, |
| const QPointF & | newPos ) |
Definition at line 324 of file SvgMeshArray.cpp.
References SvgMeshPosition::col, getSharedPaths(), m_array, SvgMeshPosition::row, and SvgMeshPosition::segmentType.
| void SvgMeshArray::modifyHandle | ( | const SvgMeshPosition & | position, |
| const std::array< QPointF, 4 > & | newPath ) |
Definition at line 307 of file SvgMeshArray.cpp.
References SvgMeshPatch::Bottom, SvgMeshPosition::col, SvgMeshPatch::Left, m_array, SvgMeshPatch::Right, SvgMeshPosition::row, SvgMeshPosition::segmentType, and SvgMeshPatch::Top.
| void SvgMeshArray::newRow | ( | ) |
Definition at line 34 of file SvgMeshArray.cpp.
| int SvgMeshArray::numColumns | ( | ) | const |
Definition at line 222 of file SvgMeshArray.cpp.
References m_array.
| int SvgMeshArray::numRows | ( | ) | const |
Definition at line 217 of file SvgMeshArray.cpp.
References m_array.
| void SvgMeshArray::setTransform | ( | const QTransform & | matrix | ) |
Definition at line 229 of file SvgMeshArray.cpp.
References m_array.
|
private |
where each vector is a meshrow
Definition at line 91 of file SvgMeshArray.h.