MCPcopy Create free account
hub / github.com/LibreCAD/LibreCAD / moveRotate

Method moveRotate

librecad/src/main/doc_plugin_interface.cpp:720–732  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720void Plugin_Entity::moveRotate(QPointF const& offset, QPointF const& center, double angle, DPI::Disposition disp) {
721 RS_Entity *ne = entity->clone();
722 ne->move( RS_Vector(offset.x(), offset.y()) );
723 ne->rotate( RS_Vector(center.x(), center.y()) , angle);
724 bool ok = dpi->addToUndo(entity, ne, disp);
725 //if doc interface fails to handle for undo only modify original entity
726 if (!ok){
727 entity->move( RS_Vector(offset.x(), offset.y()) );
728 entity->rotate( RS_Vector(center.x(), center.y()) , angle);
729 delete ne;
730 } else
731 this->entity = ne;
732}
733
734void Plugin_Entity::rotate(QPointF center, double angle, DPI::Disposition disp) {
735 RS_Entity *ne = entity->clone();

Callers 2

execCommMethod · 0.45
triggerMethod · 0.45

Calls 5

addToUndoMethod · 0.80
RS_VectorClass · 0.50
cloneMethod · 0.45
moveMethod · 0.45
rotateMethod · 0.45

Tested by

no test coverage detected