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

Method addSplinePoints

librecad/src/main/doc_plugin_interface.cpp:950–965  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950void Doc_plugin_interface::addSplinePoints(std::vector<QPointF> const& points, bool closed)
951{
952 if (doc) {
953 LC_SplinePointsData data(closed, false); //cut = false
954 for(auto const& pt: points){
955 data.splinePoints.emplace_back(RS_Vector(pt.x(), pt.y()));
956 }
957
958 LC_SplinePoints* entity = new LC_SplinePoints(doc, data);
959
960 doc->addEntity(entity);
961 LC_UndoSection undo(doc);
962 undo.addUndoable(entity);
963 } else
964 RS_DEBUG->print("%s: currentContainer is nullptr", __func__);
965}
966
967void Doc_plugin_interface::addImage(int handle, QPointF *start, QPointF *uvr, QPointF *vvr,
968 int w, int h, QString name, int br, int con, int fade){

Callers 1

execCommMethod · 0.80

Calls 4

RS_VectorClass · 0.50
addEntityMethod · 0.45
addUndoableMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected