KiCad PCB EDA Suite
placement_tool.cpp File Reference
#include "placement_tool.h"
#include "pcb_actions.h"
#include "selection_tool.h"
#include <tool/tool_manager.h>
#include <wxPcbStruct.h>
#include <class_board.h>
#include <ratsnest_data.h>
#include <board_commit.h>
#include <bitmaps.h>
#include <confirm.h>
#include <menus_helpers.h>

Go to the source code of this file.

Functions

static bool compareX (const BOARD_ITEM *aA, const BOARD_ITEM *aB)
 
static bool compareY (const BOARD_ITEM *aA, const BOARD_ITEM *aB)
 

Function Documentation

static bool compareX ( const BOARD_ITEM aA,
const BOARD_ITEM aB 
)
static

Definition at line 262 of file placement_tool.cpp.

References EDA_RECT::Centre(), EDA_ITEM::GetBoundingBox(), and wxPoint::x.

Referenced by PLACEMENT_TOOL::DistributeHorizontally().

263 {
264  return aA->GetBoundingBox().Centre().x < aB->GetBoundingBox().Centre().x;
265 }
virtual const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
wxPoint Centre() const
static bool compareY ( const BOARD_ITEM aA,
const BOARD_ITEM aB 
)
static

Definition at line 268 of file placement_tool.cpp.

References EDA_RECT::Centre(), EDA_ITEM::GetBoundingBox(), and wxPoint::y.

Referenced by PLACEMENT_TOOL::DistributeVertically().

269 {
270  return aA->GetBoundingBox().Centre().y < aB->GetBoundingBox().Centre().y;
271 }
virtual const EDA_RECT GetBoundingBox() const
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes...
wxPoint Centre() const