|
Krita Source Code Documentation
|
#include <freehand_stroke.h>
Inheritance diagram for FreehandStrokeStrategy:Classes | |
| class | Data |
| struct | Private |
Public Types | |
| enum | Flag { None = 0x0 , SupportsContinuedInterstrokeData = 0x1 , SupportsTimedMergeId = 0x2 } |
Public Types inherited from KisSimpleStrokeStrategy | |
| enum | JobType { JOB_INIT = 0 , JOB_CANCEL , JOB_FINISH , JOB_DOSTROKE , JOB_SUSPEND , JOB_RESUME , NJOBS } |
Private Member Functions | |
| void | init (FreehandStrokeStrategy::Flags flags) |
| void | issueSetDirtySignals () |
| void | tryDoUpdate (bool forceEnd=false) |
Private Attributes | |
| const QScopedPointer< Private > | m_d |
Additional Inherited Members | |
Static Public Member Functions inherited from KisSimpleStrokeStrategy | |
| static QLatin1String | jobTypeToString (JobType type) |
Definition at line 23 of file freehand_stroke.h.
| Enumerator | |
|---|---|
| None | |
| SupportsContinuedInterstrokeData | |
| SupportsTimedMergeId | |
Definition at line 26 of file freehand_stroke.h.
| FreehandStrokeStrategy::FreehandStrokeStrategy | ( | KisResourcesSnapshotSP | resources, |
| KisFreehandStrokeInfo * | strokeInfo, | ||
| const KUndo2MagicString & | name, | ||
| Flags | flags = None ) |
Definition at line 69 of file freehand_stroke.cpp.
References KisPainterBasedStrokeStrategy::init().
| FreehandStrokeStrategy::FreehandStrokeStrategy | ( | KisResourcesSnapshotSP | resources, |
| QVector< KisFreehandStrokeInfo * > | strokeInfos, | ||
| const KUndo2MagicString & | name, | ||
| Flags | flags = None ) |
Definition at line 80 of file freehand_stroke.cpp.
References KisPainterBasedStrokeStrategy::init().
|
override |
Definition at line 98 of file freehand_stroke.cpp.
References KisUpdateTimeMonitor::endStrokeMeasure(), KisUpdateTimeMonitor::instance(), KisStrokeSpeedMonitor::instance(), m_d, and KisStrokeSpeedMonitor::notifyStrokeFinished().
|
protected |
Definition at line 91 of file freehand_stroke.cpp.
References m_d.
|
overridevirtual |
Reimplemented from KisStrokeStrategy.
Definition at line 331 of file freehand_stroke.cpp.
References FreehandStrokeStrategy(), and m_d.
|
overridevirtual |
Reimplemented from KisSimpleStrokeStrategy.
Definition at line 143 of file freehand_stroke.cpp.
References FreehandStrokeStrategy::Data::CURVE, KisSimpleStrokeStrategy::doStrokeCallback(), KisMaskedFreehandStrokePainter::drawAndFillPainterPath(), KisMaskedFreehandStrokePainter::drawPainterPath(), FreehandStrokeStrategy::Data::ELLIPSE, KisUpdateTimeMonitor::instance(), FreehandStrokeStrategy::Data::LINE, m_d, KisPainterBasedStrokeStrategy::maskedPainter(), KisMaskedFreehandStrokePainter::paintAt(), KisMaskedFreehandStrokePainter::paintBezierCurve(), KisMaskedFreehandStrokePainter::paintEllipse(), FreehandStrokeStrategy::Data::PAINTER_PATH, KisMaskedFreehandStrokePainter::paintLine(), KisMaskedFreehandStrokePainter::paintPainterPath(), KisMaskedFreehandStrokePainter::paintPolygon(), KisMaskedFreehandStrokePainter::paintPolyline(), KisMaskedFreehandStrokePainter::paintRect(), FreehandStrokeStrategy::Data::POINT, FreehandStrokeStrategy::Data::POLYGON, FreehandStrokeStrategy::Data::POLYLINE, KisMaskedFreehandStrokePainter::preset(), FreehandStrokeStrategy::Data::QPAINTER_PATH, FreehandStrokeStrategy::Data::QPAINTER_PATH_FILL, FreehandStrokeStrategy::Data::RECT, KisUpdateTimeMonitor::reportPaintOpPreset(), and tryDoUpdate().
|
overridevirtual |
Reimplemented from KisSimpleStrokeStrategy.
Definition at line 136 of file freehand_stroke.cpp.
References KisPainterBasedStrokeStrategy::finishStrokeCallback(), and m_d.
|
private |
In case the paintop uses asynchronous updates, we should set priority to it, because FPS is controlled separately, not by the queue's merging algorithm.
Definition at line 108 of file freehand_stroke.cpp.
References KisSimpleStrokeStrategy::enableJob(), KisUpdateTimeMonitor::instance(), KisStrokeSpeedMonitor::instance(), KisSimpleStrokeStrategy::JOB_DOSTROKE, m_d, KisStrokeStrategy::setBalancingRatioOverride(), KisPainterBasedStrokeStrategy::setSupportsContinuedInterstrokeData(), KisPainterBasedStrokeStrategy::setSupportsIndirectPainting(), KisPainterBasedStrokeStrategy::setSupportsMaskingBrush(), KisPainterBasedStrokeStrategy::setSupportsTimedMergeId(), KisStrokeStrategy::setSupportsWrapAroundMode(), KisUpdateTimeMonitor::startStrokeMeasure(), SupportsContinuedInterstrokeData, and SupportsTimedMergeId.
|
overridevirtual |
Reimplemented from KisSimpleStrokeStrategy.
Definition at line 130 of file freehand_stroke.cpp.
References KisPainterBasedStrokeStrategy::initStrokeCallback(), and m_d.
|
private |
Definition at line 281 of file freehand_stroke.cpp.
References KritaUtils::addJobSequential(), KisRunnableStrokeJobsInterface::addRunnableJobs(), KisPaintDevice::defaultBounds(), KisPainterBasedStrokeStrategy::doMaskingBrushUpdates(), ENTER_FUNCTION, KisDefaultBoundsBase::imageBorderRect(), KIS_SAFE_ASSERT_RECOVER, KisPainterBasedStrokeStrategy::maskedPainter(), KisPainterBasedStrokeStrategy::needsMaskingUpdates(), KisPainterBasedStrokeStrategy::numMaskedPainters(), ppVar, KisBaseNode::projection(), KisRunnableBasedStrokeStrategy::runnableJobsInterface(), KisNode::setDirty(), KisPaintOpUtils::splitAndFilterDabRect(), KisMaskedFreehandStrokePainter::takeDirtyRegion(), KisPainterBasedStrokeStrategy::targetNode(), and KisDefaultBoundsBase::wrapAroundMode().
|
overridevirtual |
notifyUserEndedStroke() is a callback used by the strokes system to notify when the user ends the stroke. That moment corresponds to the user calling strokesFacade->endStroke(id) and might happen much earlier when the stroke even started its execution.
NOTE: this method will be executed in the context of the GUI thread!
Reimplemented from KisStrokeStrategy.
Definition at line 345 of file freehand_stroke.cpp.
References m_d.
|
overridevirtual |
notifyUserStartedStroke() is a callback used by the strokes system to notify when the user adds the stroke to the strokes queue. That moment corresponds to the user calling strokesFacade->startStroke(strategy) and might happen much earlier than the first job being executed.
NOTE: this method will be executed in the context of the GUI thread!
Reimplemented from KisStrokeStrategy.
Definition at line 340 of file freehand_stroke.cpp.
References m_d.
|
private |
Definition at line 228 of file freehand_stroke.cpp.
References KritaUtils::addJobSequential(), KisRunnableStrokeJobsInterface::addRunnableJobs(), KisMaskedFreehandStrokePainter::doAsynchronousUpdate(), KisMaskedFreehandStrokePainter::hasDirtyRegion(), issueSetDirtySignals(), m_d, KisPainterBasedStrokeStrategy::maskedPainter(), KisPainterBasedStrokeStrategy::numMaskedPainters(), KisRunnableBasedStrokeStrategy::runnableJobsInterface(), and tryDoUpdate().
|
private |
Definition at line 211 of file freehand_stroke.h.