MCPcopy Create free account
hub / github.com/XRay3D/GERBER_X3 / Rectangle

Method Rectangle

shape_plugins/rectangle/shrectangle.cpp:21–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19namespace Shapes {
20
21Rectangle::Rectangle(QPointF pt1, QPointF pt2)
22{
23 m_paths.resize(1);
24 handlers.reserve(PtCount);
25
26 handlers.emplace_back(std::make_unique<Handler>(this, Handler::Center));
27 handlers.emplace_back(std::make_unique<Handler>(this));
28 handlers.emplace_back(std::make_unique<Handler>(this));
29 handlers.emplace_back(std::make_unique<Handler>(this));
30 handlers.emplace_back(std::make_unique<Handler>(this));
31
32 handlers[Point1]->setPos(pt1);
33 handlers[Point3]->setPos(pt2);
34
35 redraw();
36
37 App::scene()->addItem(this);
38}
39
40Rectangle::~Rectangle() { }
41

Callers

nothing calls this directly

Calls 1

setPosMethod · 0.45

Tested by

no test coverage detected