Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/roundmarker/kis_roundmarkerop.cpp
Context not available. | |||||
76 | const qreal lodScale = KisLodTransform::lodToScale(painter()->device()); | 76 | const qreal lodScale = KisLodTransform::lodToScale(painter()->device()); | ||
---|---|---|---|---|---|
77 | const qreal scale = m_sizeOption.apply(info) * lodScale; | 77 | const qreal scale = m_sizeOption.apply(info) * lodScale; | ||
78 | const qreal rotation = 0; // TODO | 78 | const qreal rotation = 0; // TODO | ||
79 | const bool axesFlipped = false; // TODO | | |||
80 | 79 | | |||
81 | const qreal diameter = m_markerOption.diameter * scale; | 80 | const qreal diameter = m_markerOption.diameter * scale; | ||
82 | qreal radius = 0.5 * diameter; | 81 | qreal radius = 0.5 * diameter; | ||
Context not available. | |||||
126 | 125 | | |||
127 | //m_lastPaintPos = newCenterPos; | 126 | //m_lastPaintPos = newCenterPos; | ||
128 | 127 | | |||
129 | qreal extraSpacingScale = 1.0; | 128 | KisSpacingInformation spacingInfo = computeSpacing(info, diameter); | ||
130 | if (m_spacingOption.isChecked()) { | | |||
131 | extraSpacingScale = m_spacingOption.apply(info); | | |||
132 | } | | |||
133 | | ||||
134 | KisSpacingInformation spacingInfo = | | |||
135 | KisPaintOpUtils::effectiveSpacing(diameter, diameter, | | |||
136 | extraSpacingScale, 1.0, true, true, rotation, axesFlipped, | | |||
137 | m_markerOption.spacing, | | |||
138 | m_markerOption.use_auto_spacing, | | |||
139 | m_markerOption.auto_spacing_coeff, | | |||
140 | false, | | |||
141 | 0.0, | | |||
142 | lodScale); | | |||
143 | 129 | | |||
144 | if (m_firstRun) { | 130 | if (m_firstRun) { | ||
145 | m_firstRun = false; | 131 | m_firstRun = false; | ||
Context not available. | |||||
149 | 135 | | |||
150 | return spacingInfo; | 136 | return spacingInfo; | ||
151 | } | 137 | } | ||
138 | | ||||
139 | KisSpacingInformation KisRoundMarkerOp::updateSpacingImpl(const KisPaintInformation &info) const | ||||
140 | { | ||||
141 | const qreal lodScale = KisLodTransform::lodToScale(painter()->device()); | ||||
142 | const qreal diameter = m_markerOption.diameter * m_sizeOption.apply(info) * lodScale; | ||||
143 | | ||||
144 | return computeSpacing(info, diameter); | ||||
145 | } | ||||
146 | | ||||
147 | KisSpacingInformation KisRoundMarkerOp::computeSpacing(const KisPaintInformation &info, | ||||
148 | qreal diameter) const | ||||
149 | { | ||||
150 | const qreal rotation = 0; // TODO | ||||
151 | const bool axesFlipped = false; // TODO | ||||
152 | | ||||
153 | qreal extraSpacingScale = 1.0; | ||||
154 | if (m_spacingOption.isChecked()) { | ||||
155 | extraSpacingScale = m_spacingOption.apply(info); | ||||
156 | } | ||||
157 | | ||||
158 | return KisPaintOpUtils::effectiveSpacing(diameter, diameter, | ||||
159 | extraSpacingScale, 1.0, true, true, rotation, | ||||
160 | axesFlipped, m_markerOption.spacing, | ||||
161 | m_markerOption.use_auto_spacing, | ||||
162 | m_markerOption.auto_spacing_coeff, false, 0.0, | ||||
163 | KisLodTransform::lodToScale(painter()->device())); | ||||
164 | } | ||||
Context not available. |