Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
107ef8f1
Commit
107ef8f1
authored
Feb 20, 2012
by
Dick Hollenbeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
see CHANGELOG.txt
parent
5208bf99
Changes
20
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
78 additions
and
73 deletions
+78
-73
CHANGELOG.txt
CHANGELOG.txt
+15
-0
class_gerber_draw_item.h
gerbview/class_gerber_draw_item.h
+2
-9
base_struct.h
include/base_struct.h
+8
-5
class_board_item.h
include/class_board_item.h
+6
-0
class_board.h
pcbnew/class_board.h
+0
-6
class_dimension.h
pcbnew/class_dimension.h
+1
-1
class_drawsegment.h
pcbnew/class_drawsegment.h
+1
-1
class_marker_pcb.h
pcbnew/class_marker_pcb.h
+2
-6
class_mire.h
pcbnew/class_mire.h
+1
-1
class_module.h
pcbnew/class_module.h
+2
-2
class_pad.h
pcbnew/class_pad.h
+2
-2
class_pcb_text.h
pcbnew/class_pcb_text.h
+2
-2
class_text_mod.h
pcbnew/class_text_mod.h
+2
-2
class_track.h
pcbnew/class_track.h
+4
-8
class_zone.cpp
pcbnew/class_zone.cpp
+4
-2
class_zone.h
pcbnew/class_zone.h
+4
-4
drc_marker_functions.cpp
pcbnew/drc_marker_functions.cpp
+7
-5
move-drag_pads.cpp
pcbnew/move-drag_pads.cpp
+3
-0
PolyLine.cpp
polygon/PolyLine.cpp
+0
-12
PolyLine.h
polygon/PolyLine.h
+12
-5
No files found.
CHANGELOG.txt
View file @
107ef8f1
...
@@ -4,6 +4,21 @@ KiCad ChangeLog 2012
...
@@ -4,6 +4,21 @@ KiCad ChangeLog 2012
Please add newer entries at the top, list the date and your name with
Please add newer entries at the top, list the date and your name with
email address.
email address.
2012-Feb-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
++pcbnew
* Remove virtual BOARD_ITEM::{Get,Set}Position() which in turn means all
derived classes' implementations of these functions become non virtual and
can be truly _inlined_ for speed. GetPosition() in derived classes were also
all changed to return const wxPoint&, that is, a reference rather than a
full copy of the position wxPoint. There was no need for polymorphism in
{Get,Set}Position() since we never call these functions via generic pointer.
* Remove BOARD::{Get,Set}Position() since they were only there to satisfy
the pure virtuals established BOARD_ITEM, which are now gone.
* Added const wxPoint& CPolyLine::GetPos(), made CPolyLine::Get{X,Y}() inline.
* Derive CPolyPt from wxPoint so we can return const wxPoint& fromt GetPos().
2012-Feb-19 UPDATE Dick Hollenbeck <dick@softplc.com>
2012-Feb-19 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================
================================================================================
++pcbnew
++pcbnew
...
...
gerbview/class_gerber_draw_item.h
View file @
107ef8f1
...
@@ -167,15 +167,8 @@ public:
...
@@ -167,15 +167,8 @@ public:
* @return const wxPoint& - The position of this object.
* @return const wxPoint& - The position of this object.
* This function exists mainly to satisfy the virtual GetPosition() in parent class
* This function exists mainly to satisfy the virtual GetPosition() in parent class
*/
*/
const
wxPoint
GetPosition
()
const
const
wxPoint
&
GetPosition
()
const
{
return
m_Start
;
}
{
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
return
m_Start
;
// it had to be start or end.
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
/**
/**
* Function GetABPosition
* Function GetABPosition
...
...
include/base_struct.h
View file @
107ef8f1
...
@@ -65,7 +65,7 @@ enum KICAD_T {
...
@@ -65,7 +65,7 @@ enum KICAD_T {
PCB_MODULE_TEXT_T
,
///< class TEXTE_MODULE, text in a footprint
PCB_MODULE_TEXT_T
,
///< class TEXTE_MODULE, text in a footprint
PCB_MODULE_EDGE_T
,
///< class EDGE_MODULE, a footprint edge
PCB_MODULE_EDGE_T
,
///< class EDGE_MODULE, a footprint edge
PCB_TRACE_T
,
///< class TRACKE, a track segment (segment on a copper layer)
PCB_TRACE_T
,
///< class TRACKE, a track segment (segment on a copper layer)
PCB_VIA_T
,
///< class VIA, a via (like a track segment on a copper layer)
PCB_VIA_T
,
///< class
SEG
VIA, a via (like a track segment on a copper layer)
PCB_ZONE_T
,
///< class SEGZONE, a segment used to fill a zone area (segment on a
PCB_ZONE_T
,
///< class SEGZONE, a segment used to fill a zone area (segment on a
///< copper layer)
///< copper layer)
PCB_MARKER_T
,
///< class MARKER_PCB, a marker used to show something
PCB_MARKER_T
,
///< class MARKER_PCB, a marker used to show something
...
@@ -239,16 +239,19 @@ public:
...
@@ -239,16 +239,19 @@ public:
*/
*/
bool
Contains
(
const
EDA_RECT
&
aRect
)
const
;
bool
Contains
(
const
EDA_RECT
&
aRect
)
const
;
wxSize
GetSize
()
const
{
return
m_Size
;
}
const
wxSize
&
GetSize
()
const
{
return
m_Size
;
}
int
GetX
()
const
{
return
m_Pos
.
x
;
}
int
GetX
()
const
{
return
m_Pos
.
x
;
}
int
GetY
()
const
{
return
m_Pos
.
y
;
}
int
GetY
()
const
{
return
m_Pos
.
y
;
}
wxPoint
GetOrigin
()
const
{
return
m_Pos
;
}
wxPoint
GetPosition
()
const
{
return
m_Pos
;
}
const
wxPoint
&
GetOrigin
()
const
{
return
m_Pos
;
}
wxPoint
GetEnd
()
const
{
return
wxPoint
(
GetRight
(),
GetBottom
()
);
}
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
const
wxPoint
GetEnd
()
const
{
return
wxPoint
(
GetRight
(),
GetBottom
()
);
}
int
GetWidth
()
const
{
return
m_Size
.
x
;
}
int
GetWidth
()
const
{
return
m_Size
.
x
;
}
int
GetHeight
()
const
{
return
m_Size
.
y
;
}
int
GetHeight
()
const
{
return
m_Size
.
y
;
}
int
GetRight
()
const
{
return
m_Pos
.
x
+
m_Size
.
x
;
}
int
GetRight
()
const
{
return
m_Pos
.
x
+
m_Size
.
x
;
}
int
GetBottom
()
const
{
return
m_Pos
.
y
+
m_Size
.
y
;
}
int
GetBottom
()
const
{
return
m_Pos
.
y
+
m_Size
.
y
;
}
void
SetOrigin
(
const
wxPoint
&
pos
)
{
m_Pos
=
pos
;
}
void
SetOrigin
(
const
wxPoint
&
pos
)
{
m_Pos
=
pos
;
}
void
SetOrigin
(
int
x
,
int
y
)
{
m_Pos
.
x
=
x
;
m_Pos
.
y
=
y
;
}
void
SetOrigin
(
int
x
,
int
y
)
{
m_Pos
.
x
=
x
;
m_Pos
.
y
=
y
;
}
void
SetSize
(
const
wxSize
&
size
)
{
m_Size
=
size
;
}
void
SetSize
(
const
wxSize
&
size
)
{
m_Size
=
size
;
}
...
...
include/class_board_item.h
View file @
107ef8f1
...
@@ -94,6 +94,11 @@ public:
...
@@ -94,6 +94,11 @@ public:
BOARD_ITEM
*
Back
()
const
{
return
(
BOARD_ITEM
*
)
Pback
;
}
BOARD_ITEM
*
Back
()
const
{
return
(
BOARD_ITEM
*
)
Pback
;
}
BOARD_ITEM
*
GetParent
()
const
{
return
(
BOARD_ITEM
*
)
m_Parent
;
}
BOARD_ITEM
*
GetParent
()
const
{
return
(
BOARD_ITEM
*
)
m_Parent
;
}
#if 0
// DICK: there is no value in having a polymorphic {Get,Set}Position(). We never
// call GetPosition() using a generic pointer, and the virtual is slower and
// can never be inlined.
/**
/**
* Function GetPosition
* Function GetPosition
* returns the position of this object.
* returns the position of this object.
...
@@ -107,6 +112,7 @@ public:
...
@@ -107,6 +112,7 @@ public:
* @param aPos is the new position of this object
* @param aPos is the new position of this object
*/
*/
virtual void SetPosition( const wxPoint& aPos ) = 0;
virtual void SetPosition( const wxPoint& aPos ) = 0;
#endif
/**
/**
* Function GetLayer
* Function GetLayer
...
...
pcbnew/class_board.h
View file @
107ef8f1
...
@@ -268,12 +268,6 @@ public:
...
@@ -268,12 +268,6 @@ public:
*/
*/
static
wxString
GetDefaultLayerName
(
int
aLayerNumber
);
static
wxString
GetDefaultLayerName
(
int
aLayerNumber
);
const
wxPoint
GetPosition
()
const
// overload
{
return
wxPoint
(
0
,
0
);
// dummy for pure virtual
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{}
// overload
/**
/**
* Function Add
* Function Add
* adds the given item to this BOARD and takes ownership of its memory.
* adds the given item to this BOARD and takes ownership of its memory.
...
...
pcbnew/class_dimension.h
View file @
107ef8f1
...
@@ -65,7 +65,7 @@ public:
...
@@ -65,7 +65,7 @@ public:
~
DIMENSION
();
~
DIMENSION
();
const
wxPoint
GetPosition
()
const
{
return
m_Pos
;
}
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
void
SetPosition
(
const
wxPoint
&
aPos
);
// override, sets m_Text's position too
void
SetPosition
(
const
wxPoint
&
aPos
);
// override, sets m_Text's position too
...
...
pcbnew/class_drawsegment.h
View file @
107ef8f1
...
@@ -94,7 +94,7 @@ public:
...
@@ -94,7 +94,7 @@ public:
const
wxPoint
&
GetBezControl2
()
const
{
return
m_BezierC2
;
}
const
wxPoint
&
GetBezControl2
()
const
{
return
m_BezierC2
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
// override
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
// override
const
wxPoint
GetPosition
()
const
{
return
m_Start
;
}
// override
const
wxPoint
&
GetPosition
()
const
{
return
m_Start
;
}
// override
/**
/**
* Function GetStart
* Function GetStart
...
...
pcbnew/class_marker_pcb.h
View file @
107ef8f1
...
@@ -77,12 +77,8 @@ public:
...
@@ -77,12 +77,8 @@ public:
DrawMarker
(
aPanel
,
aDC
,
aDrawMode
,
aOffset
);
DrawMarker
(
aPanel
,
aDC
,
aDrawMode
,
aOffset
);
}
}
const
wxPoint
GetPosition
()
const
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
{
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
return
m_Pos
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
/**
/**
* Function HitTest
* Function HitTest
...
...
pcbnew/class_mire.h
View file @
107ef8f1
...
@@ -61,7 +61,7 @@ public:
...
@@ -61,7 +61,7 @@ public:
PCB_TARGET
*
Back
()
const
{
return
(
PCB_TARGET
*
)
Pnext
;
}
PCB_TARGET
*
Back
()
const
{
return
(
PCB_TARGET
*
)
Pnext
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// override
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// override
const
wxPoint
GetPosition
()
const
{
return
m_Pos
;
}
// override
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
// override
void
SetShape
(
int
aShape
)
{
m_Shape
=
aShape
;
}
void
SetShape
(
int
aShape
)
{
m_Shape
=
aShape
;
}
int
GetShape
()
const
{
return
m_Shape
;
}
int
GetShape
()
const
{
return
m_Shape
;
}
...
...
pcbnew/class_module.h
View file @
107ef8f1
...
@@ -163,8 +163,8 @@ public:
...
@@ -163,8 +163,8 @@ public:
*/
*/
EDA_RECT
GetBoundingBox
()
const
;
EDA_RECT
GetBoundingBox
()
const
;
void
SetPosition
(
const
wxPoint
&
aPos
);
//
overload
void
SetPosition
(
const
wxPoint
&
aPos
);
// was
overload
const
wxPoint
GetPosition
()
const
{
return
m_Pos
;
}
//
overload
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
// was
overload
void
SetOrientation
(
double
newangle
);
void
SetOrientation
(
double
newangle
);
double
GetOrientation
()
const
{
return
m_Orient
;
}
double
GetOrientation
()
const
{
return
m_Orient
;
}
...
...
pcbnew/class_pad.h
View file @
107ef8f1
...
@@ -140,8 +140,8 @@ public:
...
@@ -140,8 +140,8 @@ public:
PAD_SHAPE_T
GetShape
()
const
{
return
m_PadShape
;
}
PAD_SHAPE_T
GetShape
()
const
{
return
m_PadShape
;
}
void
SetShape
(
PAD_SHAPE_T
aShape
)
{
m_PadShape
=
aShape
;
m_boundingRadius
=
-
1
;
}
void
SetShape
(
PAD_SHAPE_T
aShape
)
{
m_PadShape
=
aShape
;
m_boundingRadius
=
-
1
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
// overload
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Pos
=
aPos
;
}
//
was
overload
const
wxPoint
GetPosition
()
const
{
return
m_Pos
;
}
//
overload
const
wxPoint
&
GetPosition
()
const
{
return
m_Pos
;
}
// was
overload
void
SetY
(
int
y
)
{
m_Pos
.
y
=
y
;
}
void
SetY
(
int
y
)
{
m_Pos
.
y
=
y
;
}
void
SetX
(
int
x
)
{
m_Pos
.
x
=
x
;
}
void
SetX
(
int
x
)
{
m_Pos
.
x
=
x
;
}
...
...
pcbnew/class_pcb_text.h
View file @
107ef8f1
...
@@ -47,12 +47,12 @@ public:
...
@@ -47,12 +47,12 @@ public:
~
TEXTE_PCB
();
~
TEXTE_PCB
();
const
wxPoint
GetPosition
()
const
// is an
overload
const
wxPoint
&
GetPosition
()
const
// was
overload
{
{
return
m_Pos
;
// within EDA_TEXT
return
m_Pos
;
// within EDA_TEXT
}
}
void
SetPosition
(
const
wxPoint
&
aPos
)
//
is an
overload
void
SetPosition
(
const
wxPoint
&
aPos
)
//
was
overload
{
{
m_Pos
=
aPos
;
// within EDA_TEXT
m_Pos
=
aPos
;
// within EDA_TEXT
}
}
...
...
pcbnew/class_text_mod.h
View file @
107ef8f1
...
@@ -76,12 +76,12 @@ public:
...
@@ -76,12 +76,12 @@ public:
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
TEXTE_MODULE
*
Back
()
const
{
return
(
TEXTE_MODULE
*
)
Pback
;
}
void
SetPosition
(
const
wxPoint
&
aPos
)
// overload a base
void
SetPosition
(
const
wxPoint
&
aPos
)
// was overload
{
{
m_Pos
=
aPos
;
// in EDA_TEXT
m_Pos
=
aPos
;
// in EDA_TEXT
}
}
const
wxPoint
GetPosition
()
const
// overload a base
const
wxPoint
&
GetPosition
()
const
// was overload
{
{
return
m_Pos
;
// from EDA_TEXT
return
m_Pos
;
// from EDA_TEXT
}
}
...
...
pcbnew/class_track.h
View file @
107ef8f1
...
@@ -125,8 +125,8 @@ public:
...
@@ -125,8 +125,8 @@ public:
*/
*/
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
virtual
void
Flip
(
const
wxPoint
&
aCentre
);
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
// overload
void
SetPosition
(
const
wxPoint
&
aPos
)
{
m_Start
=
aPos
;
}
//
was
overload
const
wxPoint
GetPosition
()
const
{
return
m_Start
;
}
//
overload
const
wxPoint
&
GetPosition
()
const
{
return
m_Start
;
}
// was
overload
void
SetWidth
(
int
aWidth
)
{
m_Width
=
aWidth
;
}
void
SetWidth
(
int
aWidth
)
{
m_Width
=
aWidth
;
}
int
GetWidth
()
const
{
return
m_Width
;
}
int
GetWidth
()
const
{
return
m_Width
;
}
...
@@ -479,12 +479,8 @@ public:
...
@@ -479,12 +479,8 @@ public:
*/
*/
void
ReturnLayerPair
(
int
*
top_layer
,
int
*
bottom_layer
)
const
;
void
ReturnLayerPair
(
int
*
top_layer
,
int
*
bottom_layer
)
const
;
const
wxPoint
GetPosition
()
const
// overload
const
wxPoint
&
GetPosition
()
const
{
return
m_Start
;
}
// was overload
{
void
SetPosition
(
const
wxPoint
&
aPoint
)
{
m_Start
=
aPoint
;
m_End
=
aPoint
;
}
// was overload
return
m_Start
;
}
void
SetPosition
(
const
wxPoint
&
aPoint
)
{
m_Start
=
aPoint
;
m_End
=
aPoint
;
}
// overload
/**
/**
* Function GetClass
* Function GetClass
...
...
pcbnew/class_zone.cpp
View file @
107ef8f1
...
@@ -113,9 +113,11 @@ bool ZONE_CONTAINER::UnFill()
...
@@ -113,9 +113,11 @@ bool ZONE_CONTAINER::UnFill()
}
}
const
wxPoint
ZONE_CONTAINER
::
GetPosition
()
const
const
wxPoint
&
ZONE_CONTAINER
::
GetPosition
()
const
{
{
return
m_Poly
?
GetCornerPosition
(
0
)
:
wxPoint
(
0
,
0
);
static
const
wxPoint
dummy
;
return
m_Poly
?
GetCornerPosition
(
0
)
:
dummy
;
}
}
...
...
pcbnew/class_zone.h
View file @
107ef8f1
...
@@ -150,8 +150,8 @@ public:
...
@@ -150,8 +150,8 @@ public:
* Function GetPosition
* Function GetPosition
* @return a wxPoint, position of the first point of the outline
* @return a wxPoint, position of the first point of the outline
*/
*/
const
wxPoint
GetPosition
()
const
;
//
overload
const
wxPoint
&
GetPosition
()
const
;
// was
overload
void
SetPosition
(
const
wxPoint
&
aPos
);
//
overload
void
SetPosition
(
const
wxPoint
&
aPos
);
// was
overload
/**
/**
* Function SetPriority
* Function SetPriority
...
@@ -481,9 +481,9 @@ public:
...
@@ -481,9 +481,9 @@ public:
m_Poly
->
RemoveAllContours
();
m_Poly
->
RemoveAllContours
();
}
}
wxPoint
GetCornerPosition
(
int
aCornerIndex
)
const
const
wxPoint
&
GetCornerPosition
(
int
aCornerIndex
)
const
{
{
return
wxPoint
(
m_Poly
->
GetX
(
aCornerIndex
),
m_Poly
->
GetY
(
aCornerIndex
)
);
return
m_Poly
->
GetPos
(
aCornerIndex
);
}
}
void
SetCornerPosition
(
int
aCornerIndex
,
wxPoint
new_pos
)
void
SetCornerPosition
(
int
aCornerIndex
,
wxPoint
new_pos
)
...
...
pcbnew/drc_marker_functions.cpp
View file @
107ef8f1
...
@@ -55,19 +55,21 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
...
@@ -55,19 +55,21 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
if
(
aItem
)
// aItem might be NULL
if
(
aItem
)
// aItem might be NULL
{
{
textB
=
aItem
->
GetSelectMenuText
();
textB
=
aItem
->
GetSelectMenuText
();
posB
=
aItem
->
GetPosition
();
if
(
aItem
->
Type
()
==
PCB_PAD_T
)
if
(
aItem
->
Type
()
==
PCB_PAD_T
)
{
{
pos
ition
=
aItem
->
GetPosition
();
pos
B
=
position
=
((
D_PAD
*
)
aItem
)
->
GetPosition
();
}
}
else
if
(
aItem
->
Type
()
==
PCB_VIA_T
)
else
if
(
aItem
->
Type
()
==
PCB_VIA_T
)
{
{
pos
ition
=
aItem
->
GetPosition
();
pos
B
=
position
=
((
SEGVIA
*
)
aItem
)
->
GetPosition
();
}
}
else
if
(
aItem
->
Type
()
==
PCB_TRACE_T
)
else
if
(
aItem
->
Type
()
==
PCB_TRACE_T
)
{
{
TRACK
*
track
=
(
TRACK
*
)
aItem
;
TRACK
*
track
=
(
TRACK
*
)
aItem
;
posB
=
track
->
GetPosition
();
wxPoint
endPos
=
track
->
m_End
;
wxPoint
endPos
=
track
->
m_End
;
// either of aItem's start or end will be used for the marker position
// either of aItem's start or end will be used for the marker position
...
@@ -95,7 +97,7 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
...
@@ -95,7 +97,7 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
textB
,
posB
);
textB
,
posB
);
else
else
fillMe
->
SetData
(
aErrorCode
,
position
,
fillMe
->
SetData
(
aErrorCode
,
position
,
textA
,
aTrack
->
GetPosition
()
);
textA
,
aTrack
->
GetPosition
()
);
}
}
else
else
{
{
...
@@ -105,7 +107,7 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
...
@@ -105,7 +107,7 @@ MARKER_PCB* DRC::fillMarker( TRACK* aTrack, BOARD_ITEM* aItem, int aErrorCode, M
textB
,
posB
);
textB
,
posB
);
else
else
fillMe
=
new
MARKER_PCB
(
aErrorCode
,
position
,
fillMe
=
new
MARKER_PCB
(
aErrorCode
,
position
,
textA
,
aTrack
->
GetPosition
()
);
textA
,
aTrack
->
GetPosition
()
);
}
}
return
fillMe
;
return
fillMe
;
...
...
pcbnew/move-drag_pads.cpp
View file @
107ef8f1
...
@@ -179,6 +179,9 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
...
@@ -179,6 +179,9 @@ void PCB_BASE_FRAME::Import_Pad_Settings( D_PAD* aPad, bool aDraw )
case
PAD_CONN
:
case
PAD_CONN
:
aPad
->
SetDrillSize
(
wxSize
(
0
,
0
)
);
aPad
->
SetDrillSize
(
wxSize
(
0
,
0
)
);
aPad
->
SetOffset
(
wxPoint
(
0
,
0
)
);
aPad
->
SetOffset
(
wxPoint
(
0
,
0
)
);
break
;
default
:
;
}
}
if
(
aDraw
)
if
(
aDraw
)
...
...
polygon/PolyLine.cpp
View file @
107ef8f1
...
@@ -1172,18 +1172,6 @@ void CPolyLine::UnHatch()
...
@@ -1172,18 +1172,6 @@ void CPolyLine::UnHatch()
}
}
int
CPolyLine
::
GetX
(
int
ic
)
{
return
corner
[
ic
].
x
;
}
int
CPolyLine
::
GetY
(
int
ic
)
{
return
corner
[
ic
].
y
;
}
int
CPolyLine
::
GetEndContour
(
int
ic
)
int
CPolyLine
::
GetEndContour
(
int
ic
)
{
{
return
corner
[
ic
].
end_contour
;
return
corner
[
ic
].
end_contour
;
...
...
polygon/PolyLine.h
View file @
107ef8f1
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
#include <kbool/include/kbool/booleng.h>
#include <kbool/include/kbool/booleng.h>
#include <pad_shapes.h>
#include <pad_shapes.h>
#include <wx/gdicmn.h>
// inflection modes for DS_LINE and DS_LINE_VERTEX, used in math_for_graphics.cpp
// inflection modes for DS_LINE and DS_LINE_VERTEX, used in math_for_graphics.cpp
enum
enum
...
@@ -48,6 +49,7 @@ public:
...
@@ -48,6 +49,7 @@ public:
int
left
,
right
,
top
,
bottom
;
int
left
,
right
,
top
,
bottom
;
};
};
class
CPoint
class
CPoint
{
{
public
:
public
:
...
@@ -57,6 +59,7 @@ public:
...
@@ -57,6 +59,7 @@ public:
CPoint
(
int
i
,
int
j
)
{
x
=
i
;
y
=
j
;
};
CPoint
(
int
i
,
int
j
)
{
x
=
i
;
y
=
j
;
};
};
};
class
CSegment
class
CSegment
{
{
public
:
public
:
...
@@ -82,14 +85,13 @@ public:
...
@@ -82,14 +85,13 @@ public:
bool
bFound
;
bool
bFound
;
};
};
class
CPolyPt
class
CPolyPt
:
public
wxPoint
{
{
public
:
public
:
CPolyPt
(
int
qx
=
0
,
int
qy
=
0
,
bool
qf
=
false
,
int
aUtility
=
0
)
CPolyPt
(
int
qx
=
0
,
int
qy
=
0
,
bool
qf
=
false
,
int
aUtility
=
0
)
{
x
=
qx
;
y
=
qy
;
end_contour
=
qf
;
utility
=
aUtility
;
};
{
x
=
qx
;
y
=
qy
;
end_contour
=
qf
;
utility
=
aUtility
;
};
int
x
;
int
y
;
bool
end_contour
;
bool
end_contour
;
int
utility
;
int
utility
;
...
@@ -100,6 +102,7 @@ public:
...
@@ -100,6 +102,7 @@ public:
{
return
(
x
!=
cpt2
.
x
)
||
(
y
!=
cpt2
.
y
)
||
(
end_contour
!=
cpt2
.
end_contour
);
}
{
return
(
x
!=
cpt2
.
x
)
||
(
y
!=
cpt2
.
y
)
||
(
end_contour
!=
cpt2
.
end_contour
);
}
};
};
#include <polygon_test_point_inside.h>
#include <polygon_test_point_inside.h>
class
CPolyLine
class
CPolyLine
...
@@ -166,8 +169,12 @@ public:
...
@@ -166,8 +169,12 @@ public:
int
GetContourStart
(
int
icont
);
int
GetContourStart
(
int
icont
);
int
GetContourEnd
(
int
icont
);
int
GetContourEnd
(
int
icont
);
int
GetContourSize
(
int
icont
);
int
GetContourSize
(
int
icont
);
int
GetX
(
int
ic
);
int
GetY
(
int
ic
);
int
GetX
(
int
ic
)
const
{
return
corner
[
ic
].
x
;
}
int
GetY
(
int
ic
)
const
{
return
corner
[
ic
].
y
;
}
const
wxPoint
&
GetPos
(
int
ic
)
const
{
return
corner
[
ic
];
}
int
GetEndContour
(
int
ic
);
int
GetEndContour
(
int
ic
);
int
GetUtility
(
int
ic
)
{
return
corner
[
ic
].
utility
;
};
int
GetUtility
(
int
ic
)
{
return
corner
[
ic
].
utility
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment