Gerbview: code refactor: change name of a D_CODE member:

D_CODE::m_Shape -> m_ApertType (it is not a shape, it is a aperture type)
Fix also an outdated/incorrect comment
No actual code change.
This commit is contained in:
jean-pierre charras
2023-02-10 11:20:16 +01:00
parent 0d0c9aee3a
commit fa1591d021
10 changed files with 24 additions and 23 deletions
+4 -4
View File
@@ -71,7 +71,7 @@ void D_CODE::Clear_D_CODE_Data()
{
m_Size.x = DCODE_DEFAULT_SIZE;
m_Size.y = DCODE_DEFAULT_SIZE;
m_Shape = APT_CIRCLE;
m_ApertType = APT_CIRCLE;
m_Drill.x = m_Drill.y = 0;
m_DrillShape = APT_DEF_NO_HOLE;
m_InUse = false;
@@ -116,7 +116,7 @@ int D_CODE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
{
int dim = 0;
switch( m_Shape )
switch( m_ApertType )
{
case APT_CIRCLE:
dim = m_Size.x;
@@ -155,7 +155,7 @@ void D_CODE::DrawFlashedShape( const GERBER_DRAW_ITEM* aParent, wxDC* aDC, const
{
int radius;
switch( m_Shape )
switch( m_ApertType )
{
case APT_CIRCLE:
radius = m_Size.x >> 1;
@@ -301,7 +301,7 @@ void D_CODE::ConvertShapeToPolygon( const GERBER_DRAW_ITEM* aParent )
m_Polygon.RemoveAllContours();
switch( m_Shape )
switch( m_ApertType )
{
case APT_CIRCLE: // creates only a circle with rectangular hole
TransformCircleToPolygon( m_Polygon, initialpos, m_Size.x >> 1, ARC_HIGH_DEF,