28using namespace std::placeholders;
104 std::pair<EDA_ITEM*, int> connectedStart = {
nullptr,
STARTPOINT };
105 std::pair<EDA_ITEM*, int> connectedEnd = {
nullptr,
STARTPOINT };
123 connectedStart = { testLine,
ENDPOINT };
131 connectedEnd = { testLine,
ENDPOINT };
146 std::vector<EDA_ITEM*>& aUpdatedItems )
override
153 if( connected.first )
156 aUpdatedItems.push_back( connected.first );
160 else if( connected.second ==
ENDPOINT )
166 if( connected.first )
169 aUpdatedItems.push_back( connected.first );
173 else if( connected.second ==
ENDPOINT )
211 std::vector<EDA_ITEM*>& aUpdatedItems )
override
230 aUpdatedItems.push_back( &
m_arc );
272 std::vector<EDA_ITEM*>& aUpdatedItems )
override
285 const VECTOR2I newOffset = xfrmOrigin - ( topLeft + botRight ) / 2;
300 oldCorner -= oldSize / 2;
304 newCorner = topRight;
305 oldCorner -=
VECTOR2I( -oldSize.
x, oldSize.
y ) / 2;
310 oldCorner -=
VECTOR2I( oldSize.
x, -oldSize.
y ) / 2;
314 newCorner = botRight;
315 oldCorner += oldSize / 2;
321 *newCorner -= xfrmOrigin;
322 oldCorner -= oldOrigin;
325 if(
sign( newCorner->x ) !=
sign( oldCorner.
x )
326 ||
sign( newCorner->y ) !=
sign( oldCorner.
y ) )
331 const double newLength = newCorner->EuclideanNorm();
334 double ratio = oldLength > 0 ? ( newLength / oldLength ) : 1.0;
340 ratio = std::min( newWidth / oldSize.
x, newHeight / oldSize.
y );
346 aUpdatedItems.push_back( &
m_bitmap );
365 std::vector<EDA_ITEM*>& aUpdatedItems )
override
371 aUpdatedItems.push_back( &table );
491 topLeft.
x = std::min( topLeft.
x, botRight.
x - minWidth );
492 topLeft.
y = std::min( topLeft.
y, botRight.
y - minHeight );
495 topRight.
y = topLeft.
y;
496 botLeft.
x = topLeft.
x;
501 topRight.
x = std::max( topRight.
x, botLeft.
x + minWidth );
502 topRight.
y = std::min( topRight.
y, botLeft.
y - minHeight );
505 topLeft.
y = topRight.
y;
506 botRight.
x = topRight.
x;
511 botLeft.
x = std::min( botLeft.
x, topRight.
x - minWidth );
512 botLeft.
y = std::max( botLeft.
y, topRight.
y + minHeight );
515 botRight.
y = botLeft.
y;
516 topLeft.
x = botLeft.
x;
521 botRight.
x = std::max( botRight.
x, topLeft.
x + minWidth );
522 botRight.
y = std::max( botRight.
y, topLeft.
y + minHeight );
525 botLeft.
y = botRight.
y;
526 topRight.
x = botRight.
x;
530 topLeft.
y = std::min( topLeft.
y, botRight.
y - minHeight );
534 topLeft.
x = std::min( topLeft.
x, botRight.
x - minWidth );
538 botRight.
y = std::max( botRight.
y, topLeft.
y + minHeight );
542 botRight.
x = std::max( botRight.
x, topLeft.
x + minWidth );
554 topLeft, topRight, botLeft, botRight );
581 for(
unsigned i = 0; i < aPoints.
LinesSize(); ++i )
603 std::vector<EDA_ITEM*>& aUpdatedItems )
override
611 topLeft, topRight, botLeft, botRight );
614 std::vector<SEG> oldSegs;
615 std::vector<VECTOR2I> moveVecs;
637 moveVecs.emplace_back( 0, topLeft.
y - oldBox.
GetTop() );
643 moveVecs.emplace_back( topLeft.
x - oldBox.
GetLeft(), 0 );
649 moveVecs.emplace_back( 0, botRight.
y - oldBox.
GetBottom() );
655 moveVecs.emplace_back( botRight.
x - oldBox.
GetRight(), 0 );
661 for(
unsigned i = 0; i < aPoints.
LinesSize(); ++i )
671 void dragPinsOnEdge(
const std::vector<SEG>& aOldEdges,
const std::vector<VECTOR2I>& aMoveVecs,
672 int aEdgeUnit,
COMMIT& aCommit,
673 std::vector<EDA_ITEM*>& aUpdatedItems )
const
675 wxCHECK( aOldEdges.size() == aMoveVecs.size(), );
684 if( !
editor.GetSettings()->m_dragPinsAlongWithEdges )
689 wxCHECK( aEdgeUnit == 0 || aEdgeUnit ==
editor.GetUnit(), );
694 const auto getPinsOnSeg = [](
LIB_SYMBOL& aSymbol,
int aUnit,
const SEG& aSeg,
695 bool aIncludeEnds ) -> std::vector<SCH_PIN*>
700 std::vector<SCH_PIN*> pins;
707 if( aSeg.Contains( pinRootPos ) )
709 if( aIncludeEnds || ( pinRootPos != aSeg.A && pinRootPos != aSeg.B ) )
711 pins.push_back(
pin );
721 for( std::size_t i = 0; i < aOldEdges.size(); ++i )
723 if( aMoveVecs[i] ==
VECTOR2I( 0, 0 ) || !symbol )
726 const std::vector<SCH_PIN*> pins =
727 getPinsOnSeg( *symbol, aEdgeUnit, aOldEdges[i],
false );
732 aUpdatedItems.push_back(
pin );
735 pin->Move( aMoveVecs[i] );
766 std::vector<EDA_ITEM*>& aUpdatedItems )
override
814 std::vector<EDA_ITEM*>& aUpdatedItems )
override
828 editedTopRight =
true;
830 editedBotLeft =
true;
842 sheetNewPos = topLeft;
843 sheetNewSize =
VECTOR2I( botRight.
x - topLeft.
x, botRight.
y - topLeft.
y );
864 for(
unsigned i = 0; i < aPoints.
LinesSize(); ++i )
893 switch( aItem->
Type() )
902 m_editBehavior = std::make_unique<ARC_POINT_EDIT_BEHAVIOR>( *shape );
904 case SHAPE_T::CIRCLE:
905 m_editBehavior = std::make_unique<EDA_CIRCLE_POINT_EDIT_BEHAVIOR>( *shape );
907 case SHAPE_T::RECTANGLE:
911 m_editBehavior = std::make_unique<EDA_POLYGON_POINT_EDIT_BEHAVIOR>( *shape );
913 case SHAPE_T::BEZIER:
914 m_editBehavior = std::make_unique<EDA_BEZIER_POINT_EDIT_BEHAVIOR>( *shape );
926 m_editBehavior = std::make_unique<EDA_POLYGON_POINT_EDIT_BEHAVIOR>( *shape );
932 m_editBehavior = std::make_unique<TEXTBOX_POINT_EDIT_BEHAVIOR>( *textbox );
944 m_editBehavior = std::make_unique<SHEET_POINT_EDIT_BEHAVIOR>( sheet );
950 m_editBehavior = std::make_unique<BITMAP_POINT_EDIT_BEHAVIOR>( bitmap );
977 m_editedPoint( nullptr ),
978 m_inPointEditor( false )
1054 if( !
editor->IsSymbolEditable() ||
editor->IsSymbolAlias() )
1084 bool inDrag =
false;
1092 grid->SetUseGrid(
getView()->GetGAL()->GetGridSnapping()
1093 && !evt->DisableGridSnapping() );
1099 wxCHECK(
false, 0 );
1116 bool snap = !evt->DisableGridSnapping();
1119 GRID_HELPER_GRIDS::GRID_GRAPHICS );
1127 else if( inDrag && evt->IsMouseUp(
BUT_LEFT ) )
1129 if( !commit.
Empty() )
1130 commit.
Push(
_(
"Move Point" ) );
1135 else if( evt->IsCancelInteractive() || evt->IsActivate() )
1154 else if( evt->IsCancelInteractive() )
1159 if( evt->IsActivate() )
1164 evt->SetPassEvent();
1199 std::vector<EDA_ITEM*> updatedItems;
1202 for(
EDA_ITEM* updatedItem : updatedItems )
1243 bool isRuleArea =
false;
1287 if( shape->
GetShape() != SHAPE_T::POLY )
1293 return shape->
HitTest( cursorPos, (
int) threshold );
1311 int currentMinDistance = INT_MAX;
1312 int closestLineStart = 0;
1318 for(
unsigned i = 0; i < numPoints; ++i )
1323 if(
distance < currentMinDistance )
1326 closestLineStart = i;
1335 commit.
Push(
_(
"Add Corner" ) );
1343 || !
m_editPoints->GetParent()->IsType( { SCH_SHAPE_T, SCH_RULE_AREA_T } ) )
1377 commit.
Push(
_(
"Remove Corner" ) );
constexpr EDA_IU_SCALE schIUScale
static TOOL_ACTION activatePointEditor
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
ARC_POINT_EDIT_BEHAVIOR(SCH_SHAPE &aArc)
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
BITMAP_POINT_EDIT_BEHAVIOR(SCH_BITMAP &aBitmap)
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
static constexpr BOX2< VECTOR2I > ByCorners(const VECTOR2I &aCorner1, const VECTOR2I &aCorner2)
constexpr const Vec GetCenter() const
constexpr coord_type GetLeft() const
constexpr coord_type GetRight() const
constexpr coord_type GetTop() const
constexpr coord_type GetBottom() const
Represent a set of changes (additions, deletions or modifications) of a data model (e....
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr)
Create an undo entry for an item that has been already modified.
bool Empty() const
Returns status of an item.
EDIT_CONSTRAINT for a EDIT_LINE, that constrains the line to move perpendicular to the line itself.
bool IsHorizontal() const
bool IsType(FRAME_T aType) const
The base class for create windows for drawing purpose.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
void SetCurrentCursor(KICURSOR aCursor)
Set the current cursor shape for this panel.
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
virtual bool IsType(const std::vector< KICAD_T > &aScanTypes) const
Check whether the item is one of the listed types.
EDA_ITEM * GetParent() const
int GetRectangleWidth() const
SHAPE_POLY_SET & GetPolyShape()
const VECTOR2I & GetEnd() const
Return the ending point of the graphic.
const VECTOR2I & GetStart() const
Return the starting point of the graphic.
void SetEnd(const VECTOR2I &aEnd)
wxString SHAPE_T_asString() const
int GetRectangleHeight() const
"Standard" table-cell editing behavior.
const EDA_ANGLE & GetTextAngle() const
virtual void ClearRenderCache()
void SetConstraint(EDIT_CONSTRAINT< EDIT_LINE > *aConstraint)
Set a constraint for and EDIT_POINT.
EDIT_POINTS is a VIEW_ITEM that manages EDIT_POINTs and EDIT_LINEs and draws them.
void AddPoint(const EDIT_POINT &aPoint)
Add an EDIT_POINT.
EDIT_LINE & Line(unsigned int aIndex)
void AddIndicatorLine(EDIT_POINT &aOrigin, EDIT_POINT &aEnd)
Adds an EDIT_LINE that is shown as an indicator, rather than an editable line (no center point drag,...
unsigned int LinesSize() const
Return number of stored EDIT_LINEs.
EDIT_POINT & Point(unsigned int aIndex)
void AddLine(const EDIT_LINE &aLine)
Adds an EDIT_LINE.
Represent a single point that can be used for modifying items.
virtual std::pair< EDA_ITEM *, int > GetConnected() const
Return a connected item record comprising an EDA_ITEM* and a STARTPOINT/ENDPOINT flag.
int GetY() const
Return Y coordinate of an EDIT_POINT.
static const int POINT_SIZE
virtual void SetPosition(const VECTOR2I &aPosition)
Set new coordinates for an EDIT_POINT.
virtual VECTOR2I GetPosition() const
Return coordinates of an EDIT_POINT.
int GetX() const
Return X coordinate of an EDIT_POINT.
static TOOL_ACTION pointEditorRemoveCorner
static TOOL_ACTION pointEditorAddCorner
void updatePoints()
Update which point is being edited.
bool m_inPointEditor
Currently available edit points.
void updateParentItem(bool aSnapToGrid, SCH_COMMIT &aCommit) const
< Update item's points with edit points.
int Main(const TOOL_EVENT &aEvent)
void makePointsAndBehavior(EDA_ITEM *aItem)
Currently edited point, NULL if there is none.
std::unique_ptr< POINT_EDIT_BEHAVIOR > m_editBehavior
void updateEditedPoint(const TOOL_EVENT &aEvent)
Clear references to the points.
void setEditedPoint(EDIT_POINT *aPoint)
Return true if aPoint is the currently modified point.
int modifiedSelection(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
EDIT_POINT * m_editedPoint
Re-entrancy guards.
bool addCornerCondition(const SELECTION &aSelection)
void setTransitions() override
This method is meant to be overridden in order to specify handlers for events.
int addCorner(const TOOL_EVENT &aEvent)
TOOL_ACTION handlers.
std::shared_ptr< EDIT_POINTS > m_editPoints
Current item-specific edit behavior.
bool removeCornerCondition(const SELECTION &aSelection)
int removeCorner(const TOOL_EVENT &aEvent)
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
int getEditedPointIndex() const
int clearEditedPoints(const TOOL_EVENT &aEvent)
Set the current point being edited. NULL means none.
EE_TYPE OfType(KICAD_T aType) const
static const TOOL_EVENT ClearedEvent
static const TOOL_EVENT SelectedEvent
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
static const TOOL_EVENT PointSelectedEvent
An interface for classes handling user events controlling the view behavior such as zooming,...
virtual void CaptureCursor(bool aEnabled)
Force the cursor to stay within the drawing panel area.
virtual void ForceCursorPosition(bool aEnabled, const VECTOR2D &aPosition=VECTOR2D(0, 0))
Place the cursor immediately at a given point.
virtual void ShowCursor(bool aEnabled)
Enable or disables display of cursor.
VECTOR2D GetCursorPosition() const
Return the current cursor position in world coordinates.
virtual VECTOR2D GetMousePosition(bool aWorldCoordinates=true) const =0
Return the current mouse pointer position.
virtual void SetAutoPan(bool aEnabled)
Turn on/off auto panning (this feature is used when there is a tool active (eg.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
virtual void Add(VIEW_ITEM *aItem, int aDrawPriority=-1)
Add a VIEW_ITEM to the view.
virtual void Remove(VIEW_ITEM *aItem)
Remove a VIEW_ITEM from the view.
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
VECTOR2D ToWorld(const VECTOR2D &aCoord, bool aAbsolute=true) const
Converts a screen space point/vector to a point/vector in world space coordinates.
Define a library symbol object.
std::vector< SCH_PIN * > GetPins(int aUnit=0, int aBodyStyle=0) const
Return a list of pin object pointers from the draw item list.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
void UpdateItem(const EDIT_POINT &aEditedPoints, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
LINE_POINT_EDIT_BEHAVIOR(SCH_LINE &aLine, SCH_SCREEN &aScreen)
A helper class interface to manage the edit points for a single item.
static bool isModified(const EDIT_POINT &aEditedPoint, const EDIT_POINT &aPoint)
Checks if two points are the same instance - which means the point is being edited.
static void UpdateItem(SCH_SHAPE &aRect, const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints)
static void UpdatePoints(SCH_SHAPE &aRect, EDIT_POINTS &aPoints)
static void PinEditedCorner(const EDIT_POINT &aEditedPoint, const EDIT_POINTS &aPoints, int minWidth, int minHeight, VECTOR2I &topLeft, VECTOR2I &topRight, VECTOR2I &botLeft, VECTOR2I &botRight)
Update the coordinates of 4 corners of a rectangle, according to constraints and the moved corner.
static void MakePoints(SCH_SHAPE &aRect, EDIT_POINTS &aPoints)
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
RECTANGLE_POINT_EDIT_BEHAVIOR(SCH_SHAPE &aRect, EDA_DRAW_FRAME &aFrame)
void dragPinsOnEdge(const std::vector< SEG > &aOldEdges, const std::vector< VECTOR2I > &aMoveVecs, int aEdgeUnit, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) const
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
A REFERENCE_IMAGE is a wrapper around a BITMAP_IMAGE that is displayed in an editor as a reference fo...
void SetTransformOriginOffset(const VECTOR2I &aCenter)
VECTOR2I GetTransformOriginOffset() const
Get the center of scaling, etc, relative to the image center (GetPosition()).
VECTOR2I GetPosition() const
double GetImageScale() const
void SetImageScale(double aScale)
Set the image "zoom" value.
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Object to handle a bitmap image that can be inserted in a schematic.
REFERENCE_IMAGE & GetReferenceImage()
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Revert the commit by restoring the modified items state.
virtual void Revert() override
Base class for any item which can be embedded within the SCHEMATIC container class,...
Segment description base class to describe items which have 2 end points (track, wire,...
void SetStartPoint(const VECTOR2I &aPosition)
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
void SetEndPoint(const VECTOR2I &aPosition)
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
void SetPosition(const VECTOR2I &aPos) override
void Move(const VECTOR2I &aOffset) override
Move the item by aMoveVector to a new position.
void SetEditState(int aState)
VECTOR2I GetCenter() const
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
VECTOR2I GetPosition() const override
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void SetPositionIgnoringPins(const VECTOR2I &aPosition)
int GetMinWidth(bool aFromLeft) const
Return the minimum width of the sheet based on the widths of the sheet pin text.
VECTOR2I GetPosition() const override
int GetMinHeight(bool aFromTop) const
Return the minimum height that the sheet can be resized based on the sheet pin positions.
void Resize(const VECTOR2I &aSize)
Resize this sheet to aSize and adjust all of the labels accordingly.
SCH_TABLECELL_POINT_EDIT_BEHAVIOR(SCH_TABLECELL &aCell, SCH_SCREEN &aScreen)
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void SetRowHeight(int aRow, int aHeight)
int GetRowHeight(int aRow) const
void SetColWidth(int aCol, int aWidth)
int GetColWidth(int aCol) const
int Distance(const SEG &aSeg) const
Compute minimum Euclidean distance to segment aSeg.
int Size() const
Returns the number of selected parts.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
virtual const VECTOR2I GetPoint(int aIndex) const override
void SetPoint(int aIndex, const VECTOR2I &aPos)
Move a point to a specific location.
virtual size_t GetPointCount() const override
virtual const SEG GetSegment(int aIndex) const override
void Remove(int aStartIndex, int aEndIndex)
Remove the range of points [start_index, end_index] from the line chain.
void Insert(size_t aVertex, const VECTOR2I &aP)
const std::vector< VECTOR2I > & CPoints() const
bool IsEmpty() const
Return true if the set is empty (no polygons at all)
SHAPE_LINE_CHAIN & Outline(int aIndex)
Return the reference to aIndex-th outline in the set.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
SHEET_POINT_EDIT_BEHAVIOR(SCH_SHEET &aSheet)
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
The symbol library editor main window.
A textbox is edited as a rectnagle when it is orthogonally aligned.
void MakePoints(EDIT_POINTS &aPoints) override
Construct the initial set of edit points for the item and append to the given list.
void UpdateItem(const EDIT_POINT &aEditedPoint, EDIT_POINTS &aPoints, COMMIT &aCommit, std::vector< EDA_ITEM * > &aUpdatedItems) override
Update the item with the new positions of the edit points.
void UpdatePoints(EDIT_POINTS &aPoints) override
Update the list of the edit points for the item.
TEXTBOX_POINT_EDIT_BEHAVIOR(SCH_TEXTBOX &aTextbox)
T EuclideanNorm() const
Compute the Euclidean norm of the vector, which is defined as sqrt(x ** 2 + y ** 2).
#define ENDPOINT
ends. (Used to support dragging.)
#define STARTPOINT
When a line is selected, these flags indicate which.
static const std::vector< KICAD_T > pointEditorTypes
@ FRAME_SCH_SYMBOL_EDITOR
#define UNIMPLEMENTED_FOR(type)
constexpr int Mils2IU(const EDA_IU_SCALE &aIuScale, int mils)
std::vector< SEG > GetSegsInDirection(const BOX2I &aBox, DIRECTION_45::Directions aDir)
Get the segments of a box that are in the given direction.
EDA_ANGLE abs(const EDA_ANGLE &aAngle)
static float distance(const SFVEC2UI &a, const SFVEC2UI &b)
std::optional< VECTOR2I > OPT_VECTOR2I
Utility functions for working with shapes.
constexpr int MilsToIU(int mils) const
@ SCH_ITEM_LOCATE_GRAPHIC_LINE_T
constexpr int sign(T val)
VECTOR2< int32_t > VECTOR2I