Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/experiment/kis_experiment_paintop.cpp
Context not available. | |||||
55 | m_windingFill = m_experimentOption.windingFill; | 55 | m_windingFill = m_experimentOption.windingFill; | ||
---|---|---|---|---|---|
56 | m_hardEdge = m_experimentOption.hardEdge; | 56 | m_hardEdge = m_experimentOption.hardEdge; | ||
57 | 57 | | |||
58 | //Sets the brush to pattern or foregroundColor | ||||
59 | if (m_experimentOption.fillType == ExperimentFillType::Pattern) { | ||||
60 | m_fillStyle = KisPainter::FillStylePattern; | ||||
61 | } else { | ||||
62 | m_fillStyle = KisPainter::FillStyleForegroundColor; | ||||
63 | } | ||||
64 | | ||||
65 | // Mirror options set with appropriate color, pattern, and fillStyle | ||||
58 | if (m_useMirroring) { | 66 | if (m_useMirroring) { | ||
59 | m_originalDevice = source()->createCompositionSourceDevice(); | 67 | m_originalDevice = source()->createCompositionSourceDevice(); | ||
60 | m_originalPainter = new KisPainter(m_originalDevice); | 68 | m_originalPainter = new KisPainter(m_originalDevice); | ||
61 | m_originalPainter->setCompositeOp(COMPOSITE_COPY); | 69 | m_originalPainter->setCompositeOp(COMPOSITE_COPY); | ||
62 | m_originalPainter->setPaintColor(painter->paintColor()); | 70 | m_originalPainter->setPaintColor(painter->paintColor()); | ||
63 | m_originalPainter->setFillStyle(KisPainter::FillStyleForegroundColor); | 71 | m_originalPainter->setPattern(painter->pattern()); | ||
72 | m_originalPainter->setFillStyle(m_fillStyle); | ||||
73 | | ||||
74 | | ||||
75 | | ||||
76 | | ||||
64 | } | 77 | } | ||
65 | else { | 78 | else { | ||
66 | m_originalPainter = 0; | 79 | m_originalPainter = 0; | ||
Context not available. | |||||
84 | Q_FOREACH (const QRect & rect, changedRegion.rects()) { | 97 | Q_FOREACH (const QRect & rect, changedRegion.rects()) { | ||
85 | m_originalPainter->fillPainterPath(m_path, rect); | 98 | m_originalPainter->fillPainterPath(m_path, rect); | ||
86 | painter()->renderDabWithMirroringNonIncremental(rect, m_originalDevice); | 99 | painter()->renderDabWithMirroringNonIncremental(rect, m_originalDevice); | ||
100 | | ||||
87 | } | 101 | } | ||
88 | } | 102 | } | ||
89 | else { | 103 | else { | ||
90 | painter()->setFillStyle(KisPainter::FillStyleForegroundColor); | 104 | //Sets options when mirror is not selected | ||
105 | painter()->setFillStyle(m_fillStyle); | ||||
106 | | ||||
91 | painter()->setCompositeOp(COMPOSITE_COPY); | 107 | painter()->setCompositeOp(COMPOSITE_COPY); | ||
92 | painter()->setAntiAliasPolygonFill(!m_hardEdge); | 108 | painter()->setAntiAliasPolygonFill(!m_hardEdge); | ||
93 | 109 | | |||
Context not available. |