Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/tool/strokes/kis_color_picker_stroke_strategy.cpp
Context not available. | |||||
34 | 34 | | |||
---|---|---|---|---|---|
35 | bool shouldSkipWork; | 35 | bool shouldSkipWork; | ||
36 | int radius = 1; | 36 | int radius = 1; | ||
37 | int blend = 255; | ||||
37 | }; | 38 | }; | ||
38 | 39 | | |||
39 | KisColorPickerStrokeStrategy::KisColorPickerStrokeStrategy(int lod) | 40 | KisColorPickerStrokeStrategy::KisColorPickerStrokeStrategy(int lod) | ||
Context not available. | |||||
46 | config.load(); | 47 | config.load(); | ||
47 | 48 | | |||
48 | m_d->radius = qMax(1, qRound(config.radius * KisLodTransform::lodToScale(lod))); | 49 | m_d->radius = qMax(1, qRound(config.radius * KisLodTransform::lodToScale(lod))); | ||
50 | m_d->blend = config.blend; | ||||
49 | } | 51 | } | ||
50 | 52 | | |||
51 | KisColorPickerStrokeStrategy::~KisColorPickerStrokeStrategy() | 53 | KisColorPickerStrokeStrategy::~KisColorPickerStrokeStrategy() | ||
Context not available. | |||||
60 | KIS_ASSERT_RECOVER_RETURN(d); | 62 | KIS_ASSERT_RECOVER_RETURN(d); | ||
61 | 63 | | |||
62 | KoColor color; | 64 | KoColor color; | ||
63 | bool result = KisToolUtils::pick(d->dev, d->pt, &color, m_d->radius); | 65 | KoColor previous = d->currentColor; | ||
66 | bool result = KisToolUtils::pick(d->dev, d->pt, &color, &previous, m_d->radius, m_d->blend); | ||||
64 | Q_UNUSED(result); | 67 | Q_UNUSED(result); | ||
65 | 68 | | |||
66 | emit sigColorUpdated(color); | 69 | emit sigColorUpdated(color); | ||
Context not available. |