KiCad PCB EDA Suite
|
Go to the source code of this file.
Functions | |
std::vector< int > | GetDeltasForDistributeByGaps (const std::vector< std::pair< int, int > > &aItemExtents) |
Given a list of 'n' item spans (e.g. | |
std::vector< int > | GetDeltasForDistributeByPoints (const std::vector< int > &aItemPositions) |
std::vector< int > GetDeltasForDistributeByGaps | ( | const std::vector< std::pair< int, int > > & | aItemExtents | ) |
Given a list of 'n' item spans (e.g.
left-right edge positions), return the deltas for each item to produce even gaps between each item.
The first and last items will not be moved.
aItemExtents | a list of 'n' item spans, each a pair of integers representing the extents of an item. This should be sorted in a meaningful way to the caller, for example, left-right based on the item's left edge or by anchor. |
Definition at line 25 of file distribute.cpp.
References delta, and KiROUND().
Referenced by ALIGN_DISTRIBUTE_TOOL::doDistributeGaps(), and DoDistributeGapsTestChecks().
std::vector< int > GetDeltasForDistributeByPoints | ( | const std::vector< int > & | aItemPositions | ) |
Definition at line 67 of file distribute.cpp.
References delta, and KiROUND().
Referenced by ALIGN_DISTRIBUTE_TOOL::doDistributeCenters(), and DoDistributePointsTestChecks().