Commit 76fc4042 authored by charras's avatar charras

minor code cleanup

parent 3370b134
...@@ -196,9 +196,9 @@ EDA_Rect DrawJunctionStruct::GetBoundingBox() ...@@ -196,9 +196,9 @@ EDA_Rect DrawJunctionStruct::GetBoundingBox()
// return a bounding box // return a bounding box
{ {
int width = DRAWJUNCTION_SIZE * 2; int width = DRAWJUNCTION_DIAMETER;
int xmin = m_Pos.x - DRAWJUNCTION_SIZE; int xmin = m_Pos.x - (DRAWJUNCTION_DIAMETER/2);
int ymin = m_Pos.y - DRAWJUNCTION_SIZE; int ymin = m_Pos.y - (DRAWJUNCTION_DIAMETER/2);
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( width, width ) ); EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( width, width ) );
...@@ -215,7 +215,7 @@ bool DrawJunctionStruct::HitTest( const wxPoint& aPosRef ) ...@@ -215,7 +215,7 @@ bool DrawJunctionStruct::HitTest( const wxPoint& aPosRef )
wxPoint dist = aPosRef - m_Pos; wxPoint dist = aPosRef - m_Pos;
return sqrt( ( (double) ( dist.x * dist.x ) ) + return sqrt( ( (double) ( dist.x * dist.x ) ) +
( (double) ( dist.y * dist.y ) ) ) < DRAWJUNCTION_SIZE; ( (double) ( dist.y * dist.y ) ) ) < (DRAWJUNCTION_DIAMETER/2);
} }
...@@ -244,7 +244,7 @@ void DrawJunctionStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -244,7 +244,7 @@ void DrawJunctionStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode );
GRFilledCircle( &panel->m_ClipBox, DC, m_Pos.x + offset.x, GRFilledCircle( &panel->m_ClipBox, DC, m_Pos.x + offset.x,
m_Pos.y + offset.y, DRAWJUNCTION_SIZE, 0, color, color ); m_Pos.y + offset.y, (DRAWJUNCTION_DIAMETER/2), 0, color, color );
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#ifndef CLASS_SCHEMATIC_ITEMS_H #ifndef CLASS_SCHEMATIC_ITEMS_H
#define CLASS_SCHEMATIC_ITEMS_H #define CLASS_SCHEMATIC_ITEMS_H
#define DRAWJUNCTION_SIZE 16 /* Rayon du symbole connexion */ #define DRAWJUNCTION_DIAMETER 32 /* Size (diameter) of junctions between wires */
#define DRAWMARKER_SIZE 16 /* Rayon du symbole marqueur */ #define DRAWMARKER_SIZE 16 /* Rayon du symbole marqueur */
#define DRAWNOCONNECT_SIZE 48 /* Rayon du symbole No Connexion */ #define DRAWNOCONNECT_SIZE 48 /* Rayon du symbole No Connexion */
......
...@@ -735,7 +735,7 @@ void PlotDrawlist( Plotter* plotter, SCH_ITEM* aDrawlist ) ...@@ -735,7 +735,7 @@ void PlotDrawlist( Plotter* plotter, SCH_ITEM* aDrawlist )
#undef STRUCT #undef STRUCT
#define STRUCT ( (DrawJunctionStruct*) aDrawlist ) #define STRUCT ( (DrawJunctionStruct*) aDrawlist )
plotter->set_color( ReturnLayerColor( STRUCT->GetLayer() ) ); plotter->set_color( ReturnLayerColor( STRUCT->GetLayer() ) );
plotter->circle( STRUCT->m_Pos, DRAWJUNCTION_SIZE * 2, FILLED_SHAPE ); plotter->circle( STRUCT->m_Pos, DRAWJUNCTION_DIAMETER, FILLED_SHAPE );
break; break;
case TYPE_SCH_TEXT: case TYPE_SCH_TEXT:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment