Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/spray/kis_spray_paintop.cpp
Context not available. | |||||
115 | // Spray Brush is capable of working with zero scale, | 115 | // Spray Brush is capable of working with zero scale, | ||
---|---|---|---|---|---|
116 | // so no additional checks for 'zero'ness are needed | 116 | // so no additional checks for 'zero'ness are needed | ||
117 | const qreal scale = m_sizeOption.apply(info); | 117 | const qreal scale = m_sizeOption.apply(info); | ||
118 | const qreal additionalScale = KisLodTransform::lodToScale(painter()->device()); | 118 | const qreal lodScale = KisLodTransform::lodToScale(painter()->device()); | ||
119 | 119 | | |||
120 | 120 | | |||
121 | m_sprayBrush.paint(m_dab, | 121 | m_sprayBrush.paint(m_dab, | ||
122 | m_node->paintDevice(), | 122 | m_node->paintDevice(), | ||
123 | info, | 123 | info, | ||
124 | rotation, | 124 | rotation, | ||
125 | scale, additionalScale, | 125 | scale, lodScale, | ||
126 | painter()->paintColor(), | 126 | painter()->paintColor(), | ||
127 | painter()->backgroundColor()); | 127 | painter()->backgroundColor()); | ||
128 | 128 | | |||
Context not available. | |||||
131 | painter()->renderMirrorMask(rc, m_dab); | 131 | painter()->renderMirrorMask(rc, m_dab); | ||
132 | painter()->setOpacity(origOpacity); | 132 | painter()->setOpacity(origOpacity); | ||
133 | 133 | | |||
134 | return computeSpacing(info, lodScale); | ||||
135 | } | ||||
136 | | ||||
137 | KisSpacingInformation KisSprayPaintOp::updateSpacingImpl(const KisPaintInformation &info) const | ||||
138 | { | ||||
139 | return computeSpacing(info, KisLodTransform::lodToScale(painter()->device())); | ||||
140 | } | ||||
141 | | ||||
142 | KisSpacingInformation KisSprayPaintOp::computeSpacing(const KisPaintInformation &info, | ||||
143 | qreal lodScale) const | ||||
144 | { | ||||
134 | return KisPaintOpPluginUtils::effectiveSpacing(1.0, 1.0, true, 0.0, false, | 145 | return KisPaintOpPluginUtils::effectiveSpacing(1.0, 1.0, true, 0.0, false, | ||
135 | m_spacing * additionalScale, false, 1.0, | 146 | m_spacing * lodScale, false, 1.0, lodScale, | ||
136 | KisLodTransform::lodToScale(painter()->device()), | | |||
137 | &m_airbrushOption, nullptr, &m_rateOption, info); | 147 | &m_airbrushOption, nullptr, &m_rateOption, info); | ||
138 | } | 148 | } | ||
Context not available. |