Krita Source Code Documentation
Loading...
Searching...
No Matches
KisToolFreehandHelper::Private Struct Reference

Public Member Functions

qreal effectiveSmoothnessDistance (qreal speed) const
 

Public Attributes

QTimer airbrushingTimer
 
KisAsynchronousStrokeUpdateHelper asyncUpdateHelper
 
QList< qreal > distanceHistory
 
KisRandomSourceSP fakeDabRandomSource
 
KisPerStrokeRandomSourceSP fakeStrokeRandomSource
 
bool hasLastDrawnPixel
 
bool hasPaintAtLeastOnce
 
bool haveTangent
 
QList< KisPaintInformationhistory
 
KisPaintingInformationBuilderinfoBuilder
 
KisPaintOpUtils::PositionHistory lastCursorPos
 
QPointF lastDrawnPixel
 
KisPaintInformation olderPaintInformation
 
int pixelInLineCount
 
KisPaintInformation previousPaintInformation
 
QPointF previousTangent
 
KoCanvasResourceProviderresourceManager
 
KisResourcesSnapshotSP resources
 
KisSmoothingOptionsSP smoothingOptions
 
KisStabilizedEventsSampler stabilizedSampler
 
KisStabilizerDelayedPaintHelper stabilizerDelayedPaintHelper
 
QQueue< KisPaintInformationstabilizerDeque
 
QTimer stabilizerPollTimer
 
KisStrokeId strokeId
 
QVector< KisFreehandStrokeInfo * > strokeInfos
 
KisStrokesFacadestrokesFacade
 
QElapsedTimer strokeTime
 
QTimer strokeTimeoutTimer
 
KUndo2MagicString transactionText
 
bool usingStabilizer
 
QPointF waitingPixel
 

Detailed Description

Definition at line 57 of file kis_tool_freehand_helper.cpp.

Member Function Documentation

◆ effectiveSmoothnessDistance()

qreal KisToolFreehandHelper::Private::effectiveSmoothnessDistance ( qreal speed) const

stabilizer has inverted meaning of the "scalable distance", because it measures "samples", but not "distance"

Definition at line 445 of file kis_tool_freehand_helper.cpp.

446{
447 qreal zoomingCoeff = 1.0;
448
451
452 if ((smoothingOptions->smoothingType() == KisSmoothingOptions::STABILIZER) ^
453 smoothingOptions->useScalableDistance()) {
454
455 zoomingCoeff = 1.0 / resources->effectiveZoom();
456 }
457
458 return zoomingCoeff * ((1.0 - speed) * smoothingOptions->smoothnessDistanceMax() + speed * smoothingOptions->smoothnessDistanceMin());
459}

References KisResourcesSnapshot::effectiveZoom(), resources, smoothingOptions, and KisSmoothingOptions::STABILIZER.

Member Data Documentation

◆ airbrushingTimer

QTimer KisToolFreehandHelper::Private::airbrushingTimer

Definition at line 95 of file kis_tool_freehand_helper.cpp.

◆ asyncUpdateHelper

KisAsynchronousStrokeUpdateHelper KisToolFreehandHelper::Private::asyncUpdateHelper

Definition at line 62 of file kis_tool_freehand_helper.cpp.

◆ distanceHistory

QList<qreal> KisToolFreehandHelper::Private::distanceHistory

Definition at line 98 of file kis_tool_freehand_helper.cpp.

◆ fakeDabRandomSource

KisRandomSourceSP KisToolFreehandHelper::Private::fakeDabRandomSource

Definition at line 89 of file kis_tool_freehand_helper.cpp.

◆ fakeStrokeRandomSource

KisPerStrokeRandomSourceSP KisToolFreehandHelper::Private::fakeStrokeRandomSource

Definition at line 90 of file kis_tool_freehand_helper.cpp.

◆ hasLastDrawnPixel

bool KisToolFreehandHelper::Private::hasLastDrawnPixel

Definition at line 83 of file kis_tool_freehand_helper.cpp.

◆ hasPaintAtLeastOnce

bool KisToolFreehandHelper::Private::hasPaintAtLeastOnce

Definition at line 69 of file kis_tool_freehand_helper.cpp.

◆ haveTangent

bool KisToolFreehandHelper::Private::haveTangent

Definition at line 66 of file kis_tool_freehand_helper.cpp.

◆ history

QList<KisPaintInformation> KisToolFreehandHelper::Private::history

Definition at line 97 of file kis_tool_freehand_helper.cpp.

◆ infoBuilder

KisPaintingInformationBuilder* KisToolFreehandHelper::Private::infoBuilder

Definition at line 60 of file kis_tool_freehand_helper.cpp.

◆ lastCursorPos

KisPaintOpUtils::PositionHistory KisToolFreehandHelper::Private::lastCursorPos

Definition at line 102 of file kis_tool_freehand_helper.cpp.

◆ lastDrawnPixel

QPointF KisToolFreehandHelper::Private::lastDrawnPixel

Definition at line 81 of file kis_tool_freehand_helper.cpp.

◆ olderPaintInformation

KisPaintInformation KisToolFreehandHelper::Private::olderPaintInformation

Definition at line 79 of file kis_tool_freehand_helper.cpp.

◆ pixelInLineCount

int KisToolFreehandHelper::Private::pixelInLineCount

Definition at line 84 of file kis_tool_freehand_helper.cpp.

◆ previousPaintInformation

KisPaintInformation KisToolFreehandHelper::Private::previousPaintInformation

Definition at line 78 of file kis_tool_freehand_helper.cpp.

◆ previousTangent

QPointF KisToolFreehandHelper::Private::previousTangent

Definition at line 67 of file kis_tool_freehand_helper.cpp.

◆ resourceManager

KoCanvasResourceProvider* KisToolFreehandHelper::Private::resourceManager

Definition at line 59 of file kis_tool_freehand_helper.cpp.

◆ resources

KisResourcesSnapshotSP KisToolFreehandHelper::Private::resources

Definition at line 75 of file kis_tool_freehand_helper.cpp.

◆ smoothingOptions

KisSmoothingOptionsSP KisToolFreehandHelper::Private::smoothingOptions

Definition at line 86 of file kis_tool_freehand_helper.cpp.

◆ stabilizedSampler

KisStabilizedEventsSampler KisToolFreehandHelper::Private::stabilizedSampler

Definition at line 108 of file kis_tool_freehand_helper.cpp.

◆ stabilizerDelayedPaintHelper

KisStabilizerDelayedPaintHelper KisToolFreehandHelper::Private::stabilizerDelayedPaintHelper

Definition at line 109 of file kis_tool_freehand_helper.cpp.

◆ stabilizerDeque

QQueue<KisPaintInformation> KisToolFreehandHelper::Private::stabilizerDeque

Definition at line 106 of file kis_tool_freehand_helper.cpp.

◆ stabilizerPollTimer

QTimer KisToolFreehandHelper::Private::stabilizerPollTimer

Definition at line 107 of file kis_tool_freehand_helper.cpp.

◆ strokeId

KisStrokeId KisToolFreehandHelper::Private::strokeId

Definition at line 76 of file kis_tool_freehand_helper.cpp.

◆ strokeInfos

QVector<KisFreehandStrokeInfo*> KisToolFreehandHelper::Private::strokeInfos

Definition at line 74 of file kis_tool_freehand_helper.cpp.

◆ strokesFacade

KisStrokesFacade* KisToolFreehandHelper::Private::strokesFacade

Definition at line 61 of file kis_tool_freehand_helper.cpp.

◆ strokeTime

QElapsedTimer KisToolFreehandHelper::Private::strokeTime

Definition at line 71 of file kis_tool_freehand_helper.cpp.

◆ strokeTimeoutTimer

QTimer KisToolFreehandHelper::Private::strokeTimeoutTimer

Definition at line 72 of file kis_tool_freehand_helper.cpp.

◆ transactionText

KUndo2MagicString KisToolFreehandHelper::Private::transactionText

Definition at line 64 of file kis_tool_freehand_helper.cpp.

◆ usingStabilizer

bool KisToolFreehandHelper::Private::usingStabilizer

Definition at line 105 of file kis_tool_freehand_helper.cpp.

◆ waitingPixel

QPointF KisToolFreehandHelper::Private::waitingPixel

Definition at line 82 of file kis_tool_freehand_helper.cpp.


The documentation for this struct was generated from the following file: