minor code cleanup

This commit is contained in:
charras 2009-07-01 17:32:16 +00:00
parent 3370b1348c
commit 76fc40427f
3 changed files with 7 additions and 7 deletions

View File

@ -196,9 +196,9 @@ EDA_Rect DrawJunctionStruct::GetBoundingBox()
// return a bounding box
{
int width = DRAWJUNCTION_SIZE * 2;
int xmin = m_Pos.x - DRAWJUNCTION_SIZE;
int ymin = m_Pos.y - DRAWJUNCTION_SIZE;
int width = DRAWJUNCTION_DIAMETER;
int xmin = m_Pos.x - (DRAWJUNCTION_DIAMETER/2);
int ymin = m_Pos.y - (DRAWJUNCTION_DIAMETER/2);
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( width, width ) );
@ -215,7 +215,7 @@ bool DrawJunctionStruct::HitTest( const wxPoint& aPosRef )
wxPoint dist = aPosRef - m_Pos;
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,
GRSetDrawMode( DC, DrawMode );
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 );
}

View File

@ -5,7 +5,7 @@
#ifndef 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 DRAWNOCONNECT_SIZE 48 /* Rayon du symbole No Connexion */

View File

@ -735,7 +735,7 @@ void PlotDrawlist( Plotter* plotter, SCH_ITEM* aDrawlist )
#undef STRUCT
#define STRUCT ( (DrawJunctionStruct*) aDrawlist )
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;
case TYPE_SCH_TEXT: