Changeset View
Changeset View
Standalone View
Standalone View
plugins/tools/tool_smart_patch/kis_tool_smart_patch.cpp
Show First 20 Lines • Show All 211 Lines • ▼ Show 20 Line(s) | 208 | { | |||
---|---|---|---|---|---|
212 | 212 | | |||
213 | m_d->brushRadius = currentPaintOpPreset()->settings()->paintOpSize(); | 213 | m_d->brushRadius = currentPaintOpPreset()->settings()->paintOpSize(); | ||
214 | m_d->brushOutline = getBrushOutlinePath(lastDocPoint, event); | 214 | m_d->brushOutline = getBrushOutlinePath(lastDocPoint, event); | ||
215 | 215 | | |||
216 | QRectF outlinePixelRect = m_d->brushOutline.boundingRect(); | 216 | QRectF outlinePixelRect = m_d->brushOutline.boundingRect(); | ||
217 | QRectF outlineDocRect = currentImage()->pixelToDocument(outlinePixelRect); | 217 | QRectF outlineDocRect = currentImage()->pixelToDocument(outlinePixelRect); | ||
218 | 218 | | |||
219 | // This adjusted call is needed as we paint with a 3 pixel wide brush and the pen is outside the bounds of the path | 219 | // This adjusted call is needed as we paint with a 3 pixel wide brush and the pen is outside the bounds of the path | ||
220 | // Pen uses view coordinates so we have to zoom the document value to match 2 pixel in view coordiates | 220 | // Pen uses view coordinates so we have to zoom the document value to match 2 pixel in view coordinates | ||
221 | // See BUG 275829 | 221 | // See BUG 275829 | ||
222 | qreal zoomX; | 222 | qreal zoomX; | ||
223 | qreal zoomY; | 223 | qreal zoomY; | ||
224 | canvas()->viewConverter()->zoom(&zoomX, &zoomY); | 224 | canvas()->viewConverter()->zoom(&zoomX, &zoomY); | ||
225 | qreal xoffset = 2.0/zoomX; | 225 | qreal xoffset = 2.0/zoomX; | ||
226 | qreal yoffset = 2.0/zoomY; | 226 | qreal yoffset = 2.0/zoomY; | ||
227 | 227 | | |||
228 | if (!outlineDocRect.isEmpty()) { | 228 | if (!outlineDocRect.isEmpty()) { | ||
▲ Show 20 Lines • Show All 43 Lines • Show Last 20 Lines |