Inkscape
Vector Graphics Editor
|
Interface between Inkscape code (SPItem) and graphlayout functions. More...
Go to the source code of this file.
Classes | |
struct | CheckProgress |
Functions | |
bool | isConnector (SPItem const *const item) |
Returns true if item is a connector. | |
void | filterConnectors (std::vector< SPItem * > const &items, std::list< SPItem * > &filtered) |
Scans the items list and places those items that are not connectors in filtered. | |
void | graphlayout (std::vector< SPItem * > const &items) |
Takes a list of inkscape items, extracts the graph defined by connectors between them, and uses graph layout techniques to find a nice layout. | |
Interface between Inkscape code (SPItem) and graphlayout functions.
Definition in file graphlayout.cpp.
Scans the items list and places those items that are not connectors in filtered.
Definition at line 89 of file graphlayout.cpp.
References isConnector(), item, and items.
Referenced by graphlayout().
void graphlayout | ( | std::vector< SPItem * > const & | items | ) |
Takes a list of inkscape items, extracts the graph defined by connectors between them, and uses graph layout techniques to find a nice layout.
Definition at line 102 of file graphlayout.cpp.
References c, cola::connectedComponents(), SPNamedView::connector_spacing, desktop, SPItem::desktopVisualBounds(), es, filterConnectors(), Inkscape::Preferences::get(), Inkscape::Preferences::getBool(), vpsc::Rectangle::getCentreX(), vpsc::Rectangle::getCentreY(), Inkscape::Preferences::getDouble(), SPObject::getId(), SPDesktop::getNamedView(), isConnector(), item, items, SPItem::move_rel(), rs, cola::ConstrainedMajorizationLayout::run(), cola::separateComponents(), cola::ConstrainedMajorizationLayout::setAvoidOverlaps(), cola::ConstrainedMajorizationLayout::setConstraints(), linesegment::test(), and vpsc::YDIM.
Referenced by Inkscape::UI::Toolbar::ConnectorToolbar::graph_layout(), and object_rearrange().
bool isConnector | ( | SPItem const *const | item | ) |
Returns true if item is a connector.
Definition at line 46 of file graphlayout.cpp.
References item.
Referenced by filterConnectors(), and graphlayout().