|
Krita Source Code Documentation
|
#include <KoShapeMeshGradientHandles.h>
Classes | |
| struct | Handle |
Public Member Functions | |
| QPointF | getAttachedCorner (const Handle &bezierHandle) const |
| get the attached corner node of the bezierHandle | |
| QVector< QPainterPath > | getConnectedPath (const Handle &handle) const |
| Handle | getHandle (SvgMeshPosition position) const |
| convenience method to get a handle by its position in the mesharray | |
| QVector< Handle > | handles () const |
| get all nodes in the mesh, don't use this for drawing the path but use path() | |
| KoShapeMeshGradientHandles (KoFlake::FillVariant fillVariant, KoShape *shape) | |
| KUndo2Command * | moveGradientHandle (const Handle &handle, const QPointF &newPos) |
| QPainterPath | path () const |
Private Member Functions | |
| QTransform | absoluteTransformation (KoFlake::CoordinateSystem system) const |
| QVector< Handle > | getBezierHandles (const SvgMeshArray *mesharray, SvgMeshPatch::Type type, int row, int col) const |
| QVector< Handle > | getHandles (const SvgMeshArray *mesharray, SvgMeshPatch::Type type, int row, int col) const |
| get handles including the corner | |
| const SvgMeshGradient * | gradient () const |
Private Attributes | |
| KoFlake::FillVariant | m_fillVariant {KoFlake::Fill} |
| KoShape * | m_shape {0} |
Definition at line 18 of file KoShapeMeshGradientHandles.h.
| KoShapeMeshGradientHandles::KoShapeMeshGradientHandles | ( | KoFlake::FillVariant | fillVariant, |
| KoShape * | shape ) |
Definition at line 14 of file KoShapeMeshGradientHandles.cpp.
|
private |
Definition at line 205 of file KoShapeMeshGradientHandles.cpp.
References KoShape::absoluteTransformation(), m_shape, KisAlgebra2D::mapToRect(), KoShape::outlineRect(), and KoFlake::UserSpaceOnUse.
| QPointF KoShapeMeshGradientHandles::getAttachedCorner | ( | const Handle & | bezierHandle | ) | const |
get the attached corner node of the bezierHandle
Definition at line 156 of file KoShapeMeshGradientHandles.cpp.
References KoShapeMeshGradientHandles::Handle::BezierHandle, KoShapeMeshGradientHandles::Handle::First, SvgMeshGradient::getMeshArray(), SvgMeshArray::getPath(), KoShapeMeshGradientHandles::Handle::getPosition(), gradient(), SvgMeshGradient::gradientUnits(), KoShapeMeshGradientHandles::Handle::index, KIS_ASSERT, m_shape, KisAlgebra2D::mapToRect(), KoFlake::ObjectBoundingBox, KoShape::outlineRect(), and KoShapeMeshGradientHandles::Handle::type.
|
private |
Definition at line 192 of file KoShapeMeshGradientHandles.cpp.
References KoShapeMeshGradientHandles::Handle::BezierHandle, KoShapeMeshGradientHandles::Handle::First, SvgMeshArray::getPath(), and KoShapeMeshGradientHandles::Handle::Second.
Definition at line 122 of file KoShapeMeshGradientHandles.cpp.
References KoShapeMeshGradientHandles::Handle::BezierHandle, SvgMeshArray::getConnectedPaths(), SvgMeshGradient::getMeshArray(), SvgMeshArray::getPath(), KoShapeMeshGradientHandles::Handle::getPosition(), gradient(), SvgMeshGradient::gradientUnits(), KIS_ASSERT, m_shape, KisAlgebra2D::mapToRect(), KoShapeMeshGradientHandles::Handle::None, KoFlake::ObjectBoundingBox, KoShape::outlineRect(), and KoShapeMeshGradientHandles::Handle::type.
| KoShapeMeshGradientHandles::Handle KoShapeMeshGradientHandles::getHandle | ( | SvgMeshPosition | position | ) | const |
convenience method to get a handle by its position in the mesharray
Definition at line 63 of file KoShapeMeshGradientHandles.cpp.
References absoluteTransformation(), SvgMeshPosition::col, getHandles(), SvgMeshGradient::getMeshArray(), gradient(), SvgMeshGradient::gradientUnits(), KoShapeMeshGradientHandles::Handle::pos, SvgMeshPosition::row, and SvgMeshPosition::segmentType.
|
private |
get handles including the corner
Definition at line 178 of file KoShapeMeshGradientHandles.cpp.
References KoShapeMeshGradientHandles::Handle::BezierHandle, KoShapeMeshGradientHandles::Handle::Corner, KoShapeMeshGradientHandles::Handle::First, SvgMeshArray::getPath(), and KoShapeMeshGradientHandles::Handle::Second.
|
private |
Definition at line 172 of file KoShapeMeshGradientHandles.cpp.
References m_fillVariant, m_shape, and KoShapeFillWrapper::meshgradient().
| QVector< KoShapeMeshGradientHandles::Handle > KoShapeMeshGradientHandles::handles | ( | ) | const |
get all nodes in the mesh, don't use this for drawing the path but use path()
Definition at line 21 of file KoShapeMeshGradientHandles.cpp.
References absoluteTransformation(), SvgMeshPatch::Bottom, getBezierHandles(), getHandles(), SvgMeshGradient::getMeshArray(), gradient(), SvgMeshGradient::gradientUnits(), SvgMeshPatch::Left, SvgMeshArray::numColumns(), SvgMeshArray::numRows(), SvgMeshPatch::Right, and SvgMeshPatch::Top.
| KUndo2Command * KoShapeMeshGradientHandles::moveGradientHandle | ( | const Handle & | handle, |
| const QPointF & | newPos ) |
Definition at line 76 of file KoShapeMeshGradientHandles.cpp.
References absoluteTransformation(), KoShapeMeshGradientHandles::Handle::BezierHandle, KoShapeMeshGradientHandles::Handle::col, KoShapeMeshGradientHandles::Handle::Corner, SvgMeshPatch::getSegment(), KoShapeMeshGradientHandles::Handle::index, m_fillVariant, m_shape, KoShapeFillWrapper::meshgradient(), SvgMeshArray::modifyCorner(), SvgMeshArray::modifyHandle(), path(), KoShapeMeshGradientHandles::Handle::row, KoShapeMeshGradientHandles::Handle::segmentType, KoShapeFillWrapper::setMeshGradient(), and KoShapeMeshGradientHandles::Handle::type.
| QPainterPath KoShapeMeshGradientHandles::path | ( | ) | const |
Definition at line 98 of file KoShapeMeshGradientHandles.cpp.
References SvgMeshArray::getPatch(), SvgMeshPatch::getPath(), gradient(), m_shape, KisAlgebra2D::mapToRect(), SvgMeshArray::numColumns(), SvgMeshArray::numRows(), KoFlake::ObjectBoundingBox, and KoShape::outlineRect().
|
private |
Definition at line 88 of file KoShapeMeshGradientHandles.h.
|
private |
Definition at line 89 of file KoShapeMeshGradientHandles.h.