Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
grid-arrange-tab.cpp File Reference

Go to the source code of this file.

Namespaces

namespace  Inkscape
 Helper class to stream background task notifications as a series of messages.
 
namespace  Inkscape::UI
 User interface code.
 
namespace  Inkscape::UI::Dialog
 Dialog code.
 

Functions

static std::vector< SPItem * > grid_item_sort (Inkscape::ObjectSet *items)
 Sort ObjectSet by an existing grid arrangement.
 

Function Documentation

◆ grid_item_sort()

static std::vector< SPItem * > grid_item_sort ( Inkscape::ObjectSet items)
static

Sort ObjectSet by an existing grid arrangement.

This is based on this paper here: DOI:10.1049/iet-ipr.2015.0126

Parameters
items- The unsorted object set to sort.
Returns
a new grid-sorted std::vector of SPItems.

Definition at line 45 of file grid-arrange-tab.cpp.

References Inkscape::ObjectSet::add(), Geom::are_near(), SPItem::desktopVisualBounds(), grid_item_sort(), Inkscape::ObjectSet::isEmpty(), item, items, Inkscape::ObjectSet::visualBounds(), and Geom::Y.

Referenced by Inkscape::UI::Dialog::GridArrangeTab::arrange(), and grid_item_sort().