36 Record() :
item(nullptr), vspc_rect(nullptr) {}
49 std::vector<SPItem*> selected =
items;
50 std::vector<Record> records;
51 std::vector<Rectangle*>
rs;
65 if (max[X] < min[X]) {
66 min[X] = max[X] = (min[X] + max[X]) / 2.;
68 if (max[Y] < min[Y]) {
69 min[Y] = max[Y] = (min[Y] + max[Y]) / 2.;
72 records.emplace_back(
item, item_box->midpoint(), vspc_rect);
73 rs.push_back(vspc_rect);
79 for (Record & rec: records) {
81 Geom::Point const dest(rec.vspc_rect->getCentreX(), rec.vspc_rect->getCentreY());
Axis-aligned rectangle that can be empty.
Two-dimensional point that doubles as a vector.
Base class for visual SVG elements.
Geom::OptRect desktopVisualBounds() const
Get item's visual bbox in desktop coordinate system.
A rectangle represents a fixed-size shape in the diagram that may be moved to prevent overlaps and sa...
vector< vpsc::Rectangle * > rs
void removeoverlaps(vpsc::Rectangles &rs, bool bothaxes)
Point midpoint(Point a, Point b)
void removeoverlap(std::vector< SPItem * > const &items, double const xGap, double const yGap)
Takes a list of inkscape items and moves them as little as possible such that rectangular bounding bo...
Remove overlaps function.
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.