MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / dragMove

Method dragMove

src/tools/rotate_pattern_tool.cpp:176–195  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174
175
176void RotatePatternTool::dragMove()
177{
178 const auto rotation = -M_PI / 2 - (constrained_pos_map - click_pos_map).angle();
179
180 for (auto object : editedObjects())
181 {
182 if (object->getSymbol()->isRotatable())
183 {
184 object->setRotation(rotation);
185 }
186 else if (object->getType() == Object::Path)
187 {
188 object->asPath()->setPatternOrigin(MapCoord(click_pos_map));
189 object->asPath()->setPatternRotation(rotation);
190 }
191 }
192
193 updatePreviewObjects();
194 updateStatusText();
195}
196
197
198void RotatePatternTool::dragFinish()

Callers

nothing calls this directly

Calls 9

angleMethod · 0.80
isRotatableMethod · 0.80
setPatternOriginMethod · 0.80
asPathMethod · 0.80
setPatternRotationMethod · 0.80
MapCoordClass · 0.50
getSymbolMethod · 0.45
setRotationMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected