Commit 3ddc57e6 authored by charras's avatar charras

fixed some minor bugs and code cleanup

parent 826daace
...@@ -235,17 +235,18 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine ) ...@@ -235,17 +235,18 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine )
// calculate the H and V size // calculate the H and V size
int dx = LenSize( *text ); int dx = LenSize( *text );
int dy = m_Size.y + m_Width; int dy = GetInterline();
int extra_dy = (m_Size.y * 3)/10; // extra dy value for letters like j and y
/* Creates bounding box (rectangle) for an horizontal text */ /* Creates bounding box (rectangle) for an horizontal text */
wxSize textsize = wxSize( dx, dy ); wxSize textsize = wxSize( dx, dy );
rect.SetOrigin( m_Pos ); rect.SetOrigin( m_Pos );
// extra dy interval for letters like j and y and ]
int extra_dy = dy - m_Size.y;
rect.Move(wxPoint(0, -extra_dy/2 ) ); // move origin by the half extra interval
// for multiline texts ans aLine < 0, merge all rectangles // for multiline texts and aLine < 0, merge all rectangles
if( m_MultilineAllowed && aLine < 0 ) if( m_MultilineAllowed && aLine < 0 )
{ {
dy = GetInterline();
for( unsigned ii = 1; ii < list->GetCount(); ii++ ) for( unsigned ii = 1; ii < list->GetCount(); ii++ )
{ {
text = &list->Item( ii ); text = &list->Item( ii );
...@@ -256,8 +257,8 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine ) ...@@ -256,8 +257,8 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine )
} }
delete list; delete list;
textsize.y += extra_dy;
rect.SetSize( textsize ); rect.SetSize( textsize );
rect.Inflate( m_Width/2 ); // ensure a small margin
/* Now, calculate the rect origin, according to text justification /* Now, calculate the rect origin, according to text justification
* At this point the rectangle origin is the text origin (m_Pos). * At this point the rectangle origin is the text origin (m_Pos).
...@@ -474,6 +475,16 @@ void EDA_Rect::Normalize() ...@@ -474,6 +475,16 @@ void EDA_Rect::Normalize()
} }
/** Function Move
* Move this rectangle by the aMoveVector value (this is a relative move)
* @param aMoveVector = a wxPoint that is the value to move this rectangle
*/
void EDA_Rect::Move( const wxPoint& aMoveVector )
{
m_Pos += aMoveVector;
}
/*******************************************/ /*******************************************/
bool EDA_Rect::Inside( const wxPoint& point ) bool EDA_Rect::Inside( const wxPoint& point )
/*******************************************/ /*******************************************/
......
...@@ -210,6 +210,14 @@ public: ...@@ -210,6 +210,14 @@ public:
void SetTimeStamp( long aNewTimeStamp); void SetTimeStamp( long aNewTimeStamp);
EDA_Rect GetBoundaryBox() const; EDA_Rect GetBoundaryBox() const;
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** /**
......
...@@ -144,15 +144,20 @@ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -144,15 +144,20 @@ void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) : DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) :
SCH_ITEM( NULL, DRAW_JUNCTION_STRUCT_TYPE ) SCH_ITEM( NULL, DRAW_JUNCTION_STRUCT_TYPE )
{ {
#define DRAWJUNCTION_DIAMETER 32 /* Diameter of junction symbol between wires */
m_Pos = pos; m_Pos = pos;
m_Layer = LAYER_JUNCTION; m_Layer = LAYER_JUNCTION;
m_Size.x = m_Size.y = DRAWJUNCTION_DIAMETER;
#undef DRAWJUNCTION_DIAMETER
} }
DrawJunctionStruct* DrawJunctionStruct::GenCopy() DrawJunctionStruct* DrawJunctionStruct::GenCopy()
{ {
DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos ); DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos );
newitem->m_Size = m_Size;
newitem->m_Layer = m_Layer; newitem->m_Layer = m_Layer;
newitem->m_Flags = m_Flags; newitem->m_Flags = m_Flags;
...@@ -183,13 +188,11 @@ EDA_Rect DrawJunctionStruct::GetBoundingBox() ...@@ -183,13 +188,11 @@ EDA_Rect DrawJunctionStruct::GetBoundingBox()
// return a bounding box // return a bounding box
{ {
int width = DRAWJUNCTION_DIAMETER; EDA_Rect rect;
int xmin = m_Pos.x - (DRAWJUNCTION_DIAMETER/2); rect.SetOrigin(m_Pos);
int ymin = m_Pos.y - (DRAWJUNCTION_DIAMETER/2); rect.Inflate( (GetPenSize() + m_Size.x)/2);
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( width, width ) );
return ret; return rect;
}; };
...@@ -202,7 +205,7 @@ bool DrawJunctionStruct::HitTest( const wxPoint& aPosRef ) ...@@ -202,7 +205,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_DIAMETER/2); ( (double) ( dist.y * dist.y ) ) ) < (m_Size.x/2);
} }
...@@ -231,7 +234,7 @@ void DrawJunctionStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -231,7 +234,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_DIAMETER/2), 0, color, m_Pos.y + offset.y, (m_Size.x/2), 0, color,
color ); color );
} }
...@@ -257,7 +260,10 @@ void DrawJunctionStruct::Show( int nestLevel, std::ostream& os ) ...@@ -257,7 +260,10 @@ void DrawJunctionStruct::Show( int nestLevel, std::ostream& os )
DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) : DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) :
SCH_ITEM( NULL, DRAW_NOCONNECT_STRUCT_TYPE ) SCH_ITEM( NULL, DRAW_NOCONNECT_STRUCT_TYPE )
{ {
#define DRAWNOCONNECT_SIZE 48 /* No symbol connection range. */
m_Pos = pos; m_Pos = pos;
m_Size.x = m_Size.y = DRAWNOCONNECT_SIZE;
#undef DRAWNOCONNECT_SIZE
} }
...@@ -265,6 +271,7 @@ DrawNoConnectStruct* DrawNoConnectStruct::GenCopy() ...@@ -265,6 +271,7 @@ DrawNoConnectStruct* DrawNoConnectStruct::GenCopy()
{ {
DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos ); DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos );
newitem->m_Size = m_Size;
newitem->m_Flags = m_Flags; newitem->m_Flags = m_Flags;
return newitem; return newitem;
...@@ -273,11 +280,11 @@ DrawNoConnectStruct* DrawNoConnectStruct::GenCopy() ...@@ -273,11 +280,11 @@ DrawNoConnectStruct* DrawNoConnectStruct::GenCopy()
EDA_Rect DrawNoConnectStruct::GetBoundingBox() EDA_Rect DrawNoConnectStruct::GetBoundingBox()
{ {
const int DELTA = DRAWNOCONNECT_SIZE / 2; int delta = (GetPenSize() + m_Size.x)/2;
EDA_Rect box( wxPoint( m_Pos.x - DELTA, m_Pos.y - DELTA ), EDA_Rect box;
wxSize( 2 * DELTA, 2 * DELTA ) ); box.SetOrigin( m_Pos );
box.Inflate(delta);
box.Normalize();
return box; return box;
} }
...@@ -290,7 +297,7 @@ EDA_Rect DrawNoConnectStruct::GetBoundingBox() ...@@ -290,7 +297,7 @@ EDA_Rect DrawNoConnectStruct::GetBoundingBox()
bool DrawNoConnectStruct::HitTest( const wxPoint& aPosRef ) bool DrawNoConnectStruct::HitTest( const wxPoint& aPosRef )
{ {
int width = g_DrawDefaultLineThickness; int width = g_DrawDefaultLineThickness;
int delta = ( DRAWNOCONNECT_SIZE + width) / 2; int delta = ( m_Size.x + width) / 2;
wxPoint dist = aPosRef - m_Pos; wxPoint dist = aPosRef - m_Pos;
...@@ -331,7 +338,7 @@ int DrawNoConnectStruct::GetPenSize() ...@@ -331,7 +338,7 @@ int DrawNoConnectStruct::GetPenSize()
void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
const wxPoint& offset, int DrawMode, int Color ) const wxPoint& offset, int DrawMode, int Color )
{ {
const int DELTA = (DRAWNOCONNECT_SIZE / 2); int delta = m_Size.x / 2;
int pX, pY, color; int pX, pY, color;
int width = g_DrawDefaultLineThickness; int width = g_DrawDefaultLineThickness;
...@@ -343,10 +350,10 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC, ...@@ -343,10 +350,10 @@ void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
color = ReturnLayerColor( LAYER_NOCONNECT ); color = ReturnLayerColor( LAYER_NOCONNECT );
GRSetDrawMode( DC, DrawMode ); GRSetDrawMode( DC, DrawMode );
GRLine( &panel->m_ClipBox, DC, pX - DELTA, pY - DELTA, pX + DELTA, GRLine( &panel->m_ClipBox, DC, pX - delta, pY - delta, pX + delta,
pY + DELTA, width, color ); pY + delta, width, color );
GRLine( &panel->m_ClipBox, DC, pX + DELTA, pY - DELTA, pX - DELTA, GRLine( &panel->m_ClipBox, DC, pX + delta, pY - delta, pX - delta,
pY + DELTA, width, color ); pY + delta, width, color );
} }
......
...@@ -5,10 +5,6 @@ ...@@ -5,10 +5,6 @@
#ifndef CLASS_SCHEMATIC_ITEMS_H #ifndef CLASS_SCHEMATIC_ITEMS_H
#define CLASS_SCHEMATIC_ITEMS_H #define CLASS_SCHEMATIC_ITEMS_H
#define DRAWJUNCTION_DIAMETER 32 /* Diameter of junction symbol between
* wires */
#define DRAWNOCONNECT_SIZE 48 /* No symbol connection range. */
/* Flags for BUS ENTRY (bus to bus or wire to bus */ /* Flags for BUS ENTRY (bus to bus or wire to bus */
#define WIRE_TO_BUS 0 #define WIRE_TO_BUS 0
#define BUS_TO_BUS 1 #define BUS_TO_BUS 1
...@@ -51,6 +47,13 @@ public: ...@@ -51,6 +47,13 @@ public:
} }
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, virtual void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset,
...@@ -107,6 +110,7 @@ class DrawNoConnectStruct : public SCH_ITEM ...@@ -107,6 +110,7 @@ class DrawNoConnectStruct : public SCH_ITEM
{ {
public: public:
wxPoint m_Pos; /* XY coordinates of NoConnect. */ wxPoint m_Pos; /* XY coordinates of NoConnect. */
wxSize m_Size; // size of this symbol
public: public:
DrawNoConnectStruct( const wxPoint& pos ); DrawNoConnectStruct( const wxPoint& pos );
...@@ -143,7 +147,15 @@ public: ...@@ -143,7 +147,15 @@ public:
*/ */
bool HitTest( const wxPoint& aPosRef ); bool HitTest( const wxPoint& aPosRef );
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
// Geometric transforms (used in block operations): // Geometric transforms (used in block operations):
/** virtual function Move /** virtual function Move
* move item to a new position. * move item to a new position.
...@@ -204,6 +216,13 @@ public: ...@@ -204,6 +216,13 @@ public:
*/ */
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** Function GetPenSize /** Function GetPenSize
...@@ -313,6 +332,7 @@ class DrawJunctionStruct : public SCH_ITEM ...@@ -313,6 +332,7 @@ class DrawJunctionStruct : public SCH_ITEM
{ {
public: public:
wxPoint m_Pos; /* XY coordinates of connection. */ wxPoint m_Pos; /* XY coordinates of connection. */
wxSize m_Size;
public: public:
DrawJunctionStruct( const wxPoint& pos ); DrawJunctionStruct( const wxPoint& pos );
...@@ -330,6 +350,13 @@ public: ...@@ -330,6 +350,13 @@ public:
*/ */
bool HitTest( const wxPoint& aPosRef ); bool HitTest( const wxPoint& aPosRef );
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
DrawJunctionStruct* GenCopy(); DrawJunctionStruct* GenCopy();
......
...@@ -600,6 +600,19 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset, ...@@ -600,6 +600,19 @@ void SCH_TEXT::Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& aOffset,
EXCHG( linewidth, m_Width ); // set initial value EXCHG( linewidth, m_Width ); // set initial value
if( m_IsDangling ) if( m_IsDangling )
DrawDanglingSymbol( panel, DC, m_Pos + aOffset, color ); DrawDanglingSymbol( panel, DC, m_Pos + aOffset, color );
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
int x1 = BoundaryBox.GetX();
int y1 = BoundaryBox.GetY();
int x2 = BoundaryBox.GetRight();
int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
} }
...@@ -844,6 +857,19 @@ void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel, ...@@ -844,6 +857,19 @@ void SCH_HIERLABEL::Draw( WinEDA_DrawPanel* panel,
if( m_IsDangling ) if( m_IsDangling )
DrawDanglingSymbol( panel, DC, m_Pos + offset, color ); DrawDanglingSymbol( panel, DC, m_Pos + offset, color );
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
int x1 = BoundaryBox.GetX();
int y1 = BoundaryBox.GetY();
int x2 = BoundaryBox.GetRight();
int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
} }
...@@ -965,6 +991,19 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel, ...@@ -965,6 +991,19 @@ void SCH_GLOBALLABEL::Draw( WinEDA_DrawPanel* panel,
if( m_IsDangling ) if( m_IsDangling )
DrawDanglingSymbol( panel, DC, m_Pos + aOffset, color ); DrawDanglingSymbol( panel, DC, m_Pos + aOffset, color );
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox;
BoundaryBox = GetBoundingBox();
int x1 = BoundaryBox.GetX();
int y1 = BoundaryBox.GetY();
int x2 = BoundaryBox.GetRight();
int y2 = BoundaryBox.GetBottom();
GRRect( &panel->m_ClipBox, DC, x1, y1, x2, y2, BROWN );
}
#endif
} }
...@@ -1109,9 +1148,9 @@ EDA_Rect SCH_GLOBALLABEL::GetBoundingBox() ...@@ -1109,9 +1148,9 @@ EDA_Rect SCH_GLOBALLABEL::GetBoundingBox()
/***********************************/ /***********************************/
EDA_Rect SCH_TEXT::GetBoundingBox() EDA_Rect SCH_LABEL::GetBoundingBox()
{
/***********************************/ /***********************************/
{
int x, y, dx, dy, length, height; int x, y, dx, dy, length, height;
x = m_Pos.x; x = m_Pos.x;
...@@ -1156,3 +1195,29 @@ EDA_Rect SCH_TEXT::GetBoundingBox() ...@@ -1156,3 +1195,29 @@ EDA_Rect SCH_TEXT::GetBoundingBox()
box.Normalize(); box.Normalize();
return box; return box;
} }
/***********************************/
EDA_Rect SCH_TEXT::GetBoundingBox()
/***********************************/
{
// We must pass the effective text thickness to GetTextBox
// when calculating the bounding box
int linewidth =
(m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold );
EXCHG( linewidth, m_Width ); // Set the real width
EDA_Rect rect = GetTextBox( -1 );
EXCHG( linewidth, m_Width ); // set initial value
if( m_Orient ) // Rotate rect
{
wxPoint pos = rect.GetOrigin();
wxPoint end = rect.GetEnd();
RotatePoint( &pos, m_Pos, m_Orient );
RotatePoint( &end, m_Pos, m_Orient );
rect.SetOrigin(pos);
rect.SetEnd(end);
}
return rect;
}
...@@ -104,6 +104,13 @@ public: ...@@ -104,6 +104,13 @@ public:
*/ */
bool HitTest( const wxPoint& aPosRef ); bool HitTest( const wxPoint& aPosRef );
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** /**
...@@ -186,6 +193,15 @@ public: ...@@ -186,6 +193,15 @@ public:
*/ */
virtual wxPoint GetSchematicTextOffset(); virtual wxPoint GetSchematicTextOffset();
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox();
/** /**
* Function Save * Function Save
* writes the data structures for this object out to a FILE in "*.sch" * writes the data structures for this object out to a FILE in "*.sch"
...@@ -253,6 +269,13 @@ public: ...@@ -253,6 +269,13 @@ public:
*/ */
bool HitTest( const wxPoint& aPosRef ); bool HitTest( const wxPoint& aPosRef );
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** function CreateGraphicShape /** function CreateGraphicShape
...@@ -335,6 +358,13 @@ public: ...@@ -335,6 +358,13 @@ public:
*/ */
bool HitTest( const wxPoint& aPosRef ); bool HitTest( const wxPoint& aPosRef );
/**
* Function GetBoundingBox
* returns the orthogonal, bounding box of this object for display purposes.
* This box should be an enclosing perimeter for visible components of this
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
EDA_Rect GetBoundingBox(); EDA_Rect GetBoundingBox();
/** virtual function Mirror_Y /** virtual function Mirror_Y
......
This diff is collapsed.
...@@ -25,16 +25,16 @@ static void PlotTextField( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem, ...@@ -25,16 +25,16 @@ static void PlotTextField( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem,
static void PlotNoConnectStruct( PLOTTER* plotter, DrawNoConnectStruct* Struct ) static void PlotNoConnectStruct( PLOTTER* plotter, DrawNoConnectStruct* Struct )
{ {
#define DELTA (DRAWNOCONNECT_SIZE / 2) int delta = Struct->m_Size.x / 2;
int pX, pY; int pX, pY;
pX = Struct->m_Pos.x; pY = Struct->m_Pos.y; pX = Struct->m_Pos.x; pY = Struct->m_Pos.y;
plotter->set_current_line_width( Struct->GetPenSize() ); plotter->set_current_line_width( Struct->GetPenSize() );
plotter->move_to( wxPoint( pX - DELTA, pY - DELTA ) ); plotter->move_to( wxPoint( pX - delta, pY - delta ) );
plotter->finish_to( wxPoint( pX + DELTA, pY + DELTA ) ); plotter->finish_to( wxPoint( pX + delta, pY + delta ) );
plotter->move_to( wxPoint( pX + DELTA, pY - DELTA ) ); plotter->move_to( wxPoint( pX + delta, pY - delta ) );
plotter->finish_to( wxPoint( pX - DELTA, pY + DELTA ) ); plotter->finish_to( wxPoint( pX - delta, pY + delta ) );
} }
...@@ -462,8 +462,7 @@ void PlotDrawlist( PLOTTER* plotter, SCH_ITEM* aDrawlist ) ...@@ -462,8 +462,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_DIAMETER, plotter->circle( STRUCT->m_Pos, STRUCT->m_Size.x, FILLED_SHAPE );
FILLED_SHAPE );
break; break;
case TYPE_SCH_TEXT: case TYPE_SCH_TEXT:
......
...@@ -102,6 +102,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame ) ...@@ -102,6 +102,7 @@ BEGIN_EVENT_TABLE( WinEDA_SchematicFrame, WinEDA_DrawFrame )
EVT_MENU( ID_KICAD_ABOUT, WinEDA_DrawFrame::GetKicadAbout ) EVT_MENU( ID_KICAD_ABOUT, WinEDA_DrawFrame::GetKicadAbout )
// Tools and buttons for vertical toolbar. // Tools and buttons for vertical toolbar.
EVT_TOOL( ID_NO_SELECT_BUTT, WinEDA_SchematicFrame::Process_Special_Functions )
EVT_TOOL_RANGE( ID_SCHEMATIC_VERTICAL_TOOLBAR_START, EVT_TOOL_RANGE( ID_SCHEMATIC_VERTICAL_TOOLBAR_START,
ID_SCHEMATIC_VERTICAL_TOOLBAR_END, ID_SCHEMATIC_VERTICAL_TOOLBAR_END,
WinEDA_SchematicFrame::Process_Special_Functions ) WinEDA_SchematicFrame::Process_Special_Functions )
......
...@@ -166,8 +166,11 @@ public: ...@@ -166,8 +166,11 @@ public:
} }
void Normalize(); // Ensure the height and width are /* Move this by the aMoveVector value (this is a relative move
// >= 0 */
void Move( const wxPoint& aMoveVector );
void Normalize(); // Ensure the height and width are >= 0
bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect bool Inside( const wxPoint& point ); // Return TRUE if point is in Rect
bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); } bool Inside( int x, int y ) { return Inside( wxPoint( x, y ) ); }
...@@ -662,7 +665,7 @@ public: ...@@ -662,7 +665,7 @@ public:
*/ */
int GetInterline() int GetInterline()
{ {
return ( ( m_Size.y * 13 ) / 10 ) + m_Width; return (( m_Size.y * 14 ) / 10) + m_Width;
} }
}; };
......
No preview for this file type
...@@ -2,8 +2,8 @@ msgid "" ...@@ -2,8 +2,8 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: kicad\n" "Project-Id-Version: kicad\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2009-11-23 18:13+0100\n" "POT-Creation-Date: 2009-11-27 09:37+0100\n"
"PO-Revision-Date: 2009-11-23 18:22+0100\n" "PO-Revision-Date: 2009-11-27 09:51+0100\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n" "Language-Team: kicad team <jean-pierre.charras@ujf-grenoble.fr>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
...@@ -968,7 +968,7 @@ msgstr "Pas en Netliste:" ...@@ -968,7 +968,7 @@ msgstr "Pas en Netliste:"
msgid "File <%s> not found, use Netlist for lib module selection" msgid "File <%s> not found, use Netlist for lib module selection"
msgstr "Fichier <%s> non trouvé, Netliste utilisée pour sélection des modules en lib." msgstr "Fichier <%s> non trouvé, Netliste utilisée pour sélection des modules en lib."
#: pcbnew/netlist.cpp:1018 #: pcbnew/netlist.cpp:1016
#, c-format #, c-format
msgid "Component [%s]: footprint <%s> not found" msgid "Component [%s]: footprint <%s> not found"
msgstr "Composant [%s]: Module <%s> non trouvé en librairie" msgstr "Composant [%s]: Module <%s> non trouvé en librairie"
...@@ -1005,121 +1005,121 @@ msgstr "Fenêtre 3D déjà ouverte" ...@@ -1005,121 +1005,121 @@ msgstr "Fenêtre 3D déjà ouverte"
msgid "3D Viewer" msgid "3D Viewer"
msgstr "Visu 3D" msgstr "Visu 3D"
#: pcbnew/muonde.cpp:225 #: pcbnew/muonde.cpp:227
msgid "Length(inch):" msgid "Length(inch):"
msgstr "Longueur (pouces):" msgstr "Longueur (pouces):"
#: pcbnew/muonde.cpp:225 #: pcbnew/muonde.cpp:227
#: pcbnew/muonde.cpp:231 #: pcbnew/muonde.cpp:233
msgid "Length" msgid "Length"
msgstr "Longueur" msgstr "Longueur"
#: pcbnew/muonde.cpp:231 #: pcbnew/muonde.cpp:233
msgid "Length(mm):" msgid "Length(mm):"
msgstr "Long. (mm):" msgstr "Long. (mm):"
#: pcbnew/muonde.cpp:239 #: pcbnew/muonde.cpp:241
#: pcbnew/muonde.cpp:695 #: pcbnew/muonde.cpp:697
#: pcbnew/muonde.cpp:708 #: pcbnew/muonde.cpp:710
msgid "Incorrect number, abort" msgid "Incorrect number, abort"
msgstr "Nombre incorrect, arrêt" msgstr "Nombre incorrect, arrêt"
#: pcbnew/muonde.cpp:247 #: pcbnew/muonde.cpp:249
msgid "Requested length < minimum length" msgid "Requested length < minimum length"
msgstr "Longueur demandée < longueur minimum" msgstr "Longueur demandée < longueur minimum"
#: pcbnew/muonde.cpp:269 #: pcbnew/muonde.cpp:271
msgid "Unable to create line: Requested length is too big" msgid "Unable to create line: Requested length is too big"
msgstr "Incapable de créer la ligne: longueur demandée trop grande" msgstr "Incapable de créer la ligne: longueur demandée trop grande"
#: pcbnew/muonde.cpp:281 #: pcbnew/muonde.cpp:283
#, c-format #, c-format
msgid "Segment count = %d, length = " msgid "Segment count = %d, length = "
msgstr "Nbr segm = %d, longueur = " msgstr "Nbr segm = %d, longueur = "
#: pcbnew/muonde.cpp:656 #: pcbnew/muonde.cpp:658
msgid "Gap" msgid "Gap"
msgstr "Gap" msgstr "Gap"
#: pcbnew/muonde.cpp:661 #: pcbnew/muonde.cpp:663
msgid "Stub" msgid "Stub"
msgstr "Stub" msgstr "Stub"
#: pcbnew/muonde.cpp:667 #: pcbnew/muonde.cpp:669
msgid "Arc Stub" msgid "Arc Stub"
msgstr "Arc Stub" msgstr "Arc Stub"
#: pcbnew/muonde.cpp:682 #: pcbnew/muonde.cpp:684
msgid " (mm):" msgid " (mm):"
msgstr " (mm):" msgstr " (mm):"
#: pcbnew/muonde.cpp:688 #: pcbnew/muonde.cpp:690
msgid " (inch):" msgid " (inch):"
msgstr " (pouce):" msgstr " (pouce):"
#: pcbnew/muonde.cpp:690 #: pcbnew/muonde.cpp:692
#: pcbnew/muonde.cpp:705 #: pcbnew/muonde.cpp:707
msgid "Create microwave module" msgid "Create microwave module"
msgstr "Créer Module MicroOnde" msgstr "Créer Module MicroOnde"
#: pcbnew/muonde.cpp:704 #: pcbnew/muonde.cpp:706
msgid "Angle (0.1deg):" msgid "Angle (0.1deg):"
msgstr "Angle (0.1deg):" msgstr "Angle (0.1deg):"
#: pcbnew/muonde.cpp:826 #: pcbnew/muonde.cpp:828
msgid "Complex shape" msgid "Complex shape"
msgstr "Forme complexe" msgstr "Forme complexe"
#: pcbnew/muonde.cpp:851 #: pcbnew/muonde.cpp:853
msgid "Read Shape Description File..." msgid "Read Shape Description File..."
msgstr "Lire Fichier de Description de Forme..." msgstr "Lire Fichier de Description de Forme..."
#: pcbnew/muonde.cpp:854 #: pcbnew/muonde.cpp:856
msgid "Symmetrical" msgid "Symmetrical"
msgstr "Symétrique" msgstr "Symétrique"
#: pcbnew/muonde.cpp:855 #: pcbnew/muonde.cpp:857
msgid "Mirrored" msgid "Mirrored"
msgstr "Miroir" msgstr "Miroir"
#: pcbnew/muonde.cpp:856 #: pcbnew/muonde.cpp:858
msgid "Shape Option" msgid "Shape Option"
msgstr "Option Forme" msgstr "Option Forme"
#: pcbnew/muonde.cpp:916 #: pcbnew/muonde.cpp:918
msgid "Read descr shape file" msgid "Read descr shape file"
msgstr "Lire fichier de description de forme" msgstr "Lire fichier de description de forme"
#: pcbnew/muonde.cpp:931 #: pcbnew/muonde.cpp:933
msgid "File not found" msgid "File not found"
msgstr "fichier non trouvé" msgstr "fichier non trouvé"
#: pcbnew/muonde.cpp:1039 #: pcbnew/muonde.cpp:1041
msgid "Shape has a null size!" msgid "Shape has a null size!"
msgstr "La forme a une taille nulle" msgstr "La forme a une taille nulle"
#: pcbnew/muonde.cpp:1044 #: pcbnew/muonde.cpp:1046
msgid "Shape has no points!" msgid "Shape has no points!"
msgstr "La forme n'a pas de points" msgstr "La forme n'a pas de points"
#: pcbnew/muonde.cpp:1148 #: pcbnew/muonde.cpp:1150
msgid "No pad for this module" msgid "No pad for this module"
msgstr "Pas de pad dans ce module" msgstr "Pas de pad dans ce module"
#: pcbnew/muonde.cpp:1154 #: pcbnew/muonde.cpp:1156
msgid "Only one pad for this module" msgid "Only one pad for this module"
msgstr "Seulement un pad dans ce module" msgstr "Seulement un pad dans ce module"
#: pcbnew/muonde.cpp:1168 #: pcbnew/muonde.cpp:1170
msgid "Gap (mm):" msgid "Gap (mm):"
msgstr "Gap (mm):" msgstr "Gap (mm):"
#: pcbnew/muonde.cpp:1168 #: pcbnew/muonde.cpp:1170
#: pcbnew/muonde.cpp:1174 #: pcbnew/muonde.cpp:1176
msgid "Create Microwave Gap" msgid "Create Microwave Gap"
msgstr "Créer Gap MicroOnde " msgstr "Créer Gap MicroOnde "
#: pcbnew/muonde.cpp:1174 #: pcbnew/muonde.cpp:1176
msgid "Gap (inch):" msgid "Gap (inch):"
msgstr "Gap (inch):" msgstr "Gap (inch):"
...@@ -1464,58 +1464,58 @@ msgstr "Erreur. Vous devez choisir une équipotentielle" ...@@ -1464,58 +1464,58 @@ msgstr "Erreur. Vous devez choisir une équipotentielle"
msgid "You have chosen the \"not connected\" option. This will create insulated copper islands. Are you sure ?" msgid "You have chosen the \"not connected\" option. This will create insulated copper islands. Are you sure ?"
msgstr "Vous avez choisi l'option \"non connecté\". Cela créera des blocs non connectés. Etes vous sûr ?" msgstr "Vous avez choisi l'option \"non connecté\". Cela créera des blocs non connectés. Etes vous sûr ?"
#: pcbnew/class_text_mod.cpp:443 #: pcbnew/class_text_mod.cpp:442
msgid "Ref." msgid "Ref."
msgstr "Ref." msgstr "Ref."
#: pcbnew/class_text_mod.cpp:443 #: pcbnew/class_text_mod.cpp:442
msgid "Value" msgid "Value"
msgstr "Valeur" msgstr "Valeur"
#: pcbnew/class_text_mod.cpp:443 #: pcbnew/class_text_mod.cpp:442
#: pcbnew/class_text_mod.cpp:452 #: pcbnew/class_text_mod.cpp:451
msgid "Text" msgid "Text"
msgstr "Texte" msgstr "Texte"
#: pcbnew/class_text_mod.cpp:449 #: pcbnew/class_text_mod.cpp:448
msgid "Module" msgid "Module"
msgstr "Module" msgstr "Module"
#: pcbnew/class_text_mod.cpp:457 #: pcbnew/class_text_mod.cpp:456
#: pcbnew/class_zone.cpp:915 #: pcbnew/class_zone.cpp:915
msgid "Type" msgid "Type"
msgstr "Type" msgstr "Type"
#: pcbnew/class_text_mod.cpp:460 #: pcbnew/class_text_mod.cpp:459
msgid "No" msgid "No"
msgstr "Non" msgstr "Non"
#: pcbnew/class_text_mod.cpp:462 #: pcbnew/class_text_mod.cpp:461
msgid "Yes" msgid "Yes"
msgstr "Oui" msgstr "Oui"
#: pcbnew/class_text_mod.cpp:472 #: pcbnew/class_text_mod.cpp:471
#: pcbnew/class_zone.cpp:945 #: pcbnew/class_zone.cpp:945
msgid "Layer" msgid "Layer"
msgstr "Couche" msgstr "Couche"
#: pcbnew/class_text_mod.cpp:474 #: pcbnew/class_text_mod.cpp:473
msgid " No" msgid " No"
msgstr "Non" msgstr "Non"
#: pcbnew/class_text_mod.cpp:476 #: pcbnew/class_text_mod.cpp:475
msgid " Yes" msgid " Yes"
msgstr "Oui" msgstr "Oui"
#: pcbnew/class_text_mod.cpp:480 #: pcbnew/class_text_mod.cpp:479
msgid "Orient" msgid "Orient"
msgstr "Orient" msgstr "Orient"
#: pcbnew/class_text_mod.cpp:486 #: pcbnew/class_text_mod.cpp:485
msgid "H Size" msgid "H Size"
msgstr "Taille H" msgstr "Taille H"
#: pcbnew/class_text_mod.cpp:489 #: pcbnew/class_text_mod.cpp:488
msgid "V Size" msgid "V Size"
msgstr "Taille V" msgstr "Taille V"
...@@ -5164,6 +5164,9 @@ msgid "" ...@@ -5164,6 +5164,9 @@ msgid ""
"can be used to replace default Netclass values \n" "can be used to replace default Netclass values \n"
"on demand, for arbitrary via or track segments." "on demand, for arbitrary via or track segments."
msgstr "" msgstr ""
"Diamètres de vias et largeurs de pistes spécifiques, qui\n"
"peuvent être utilisées pour remplacer les valeurs par défault des Netclass\n"
"quand c'est nécessaire, pour des vias ou segments de pistes arbitraires."
#: pcbnew/dialog_design_rules_base.cpp:268 #: pcbnew/dialog_design_rules_base.cpp:268
msgid "Custom Via Sizes:" msgid "Custom Via Sizes:"
...@@ -7180,7 +7183,7 @@ msgstr "Ne peut ajouter un double de l'alias <%s> en librairie <%s>." ...@@ -7180,7 +7183,7 @@ msgstr "Ne peut ajouter un double de l'alias <%s> en librairie <%s>."
#: eeschema/class_library.cpp:246 #: eeschema/class_library.cpp:246
#, c-format #, c-format
msgid "Conflict in library <%s>: alias <%s> already has root name <%s> and will not be assigned to root name <%s>." msgid "Conflict in library <%s>: alias <%s> already has root name <%s> and will not be assigned to root name <%s>."
msgstr "" msgstr "Conflit en librairie <%s>: l'alias <%s> a déjà un composant racine <%s> et ne peut prendre ce nom <%s>."
#: eeschema/class_library.cpp:476 #: eeschema/class_library.cpp:476
msgid "The component library file name is not set." msgid "The component library file name is not set."
...@@ -8680,7 +8683,7 @@ msgstr "" ...@@ -8680,7 +8683,7 @@ msgstr ""
#: eeschema/edit_component_in_lib.cpp:402 #: eeschema/edit_component_in_lib.cpp:402
msgid "Delete alternate body style (DeMorgan) draw items from component?" msgid "Delete alternate body style (DeMorgan) draw items from component?"
msgstr "" msgstr "Supprimer les éléments de la représentation alternative (DeMorgan) di composant?"
#: eeschema/edit_component_in_lib.cpp:426 #: eeschema/edit_component_in_lib.cpp:426
msgid "Doc Files" msgid "Doc Files"
...@@ -9263,6 +9266,8 @@ msgid "" ...@@ -9263,6 +9266,8 @@ msgid ""
"Check this option to have pin names inside the body and pin number outside.\n" "Check this option to have pin names inside the body and pin number outside.\n"
"If not checked pins names and pins numbers are outside." "If not checked pins names and pins numbers are outside."
msgstr "" msgstr ""
"Cocher cette option pour avoir les noms de pins à l'intérieur du corps et les numéros de pins à l'extérieur.\n"
"Si non coché, les noms de pins et les numéros de pins sont à l'extérieur."
#: eeschema/dialog_edit_component_in_lib_base.cpp:65 #: eeschema/dialog_edit_component_in_lib_base.cpp:65
msgid "Number of Units:" msgid "Number of Units:"
...@@ -11035,7 +11040,7 @@ msgstr "Masque pate à souder composant (*.GTP)|*.GTP;*.gtp|" ...@@ -11035,7 +11040,7 @@ msgstr "Masque pate à souder composant (*.GTP)|*.GTP;*.gtp|"
#: gerbview/files.cpp:126 #: gerbview/files.cpp:126
msgid "Keep-out layer (*.GKO)|*.GKO;*.gko|" msgid "Keep-out layer (*.GKO)|*.GKO;*.gko|"
msgstr "" msgstr "Couche de \"Keep-out\" (*.GKO)|*.GKO;*.gko|"
#: gerbview/files.cpp:127 #: gerbview/files.cpp:127
msgid "Mechanical layers (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|" msgid "Mechanical layers (*.GMx)|*.GM1;*.gm1;*.GM2;*.gm2;*.GM3;*.gm3|"
......
No preview for this file type
This diff is collapsed.
...@@ -100,7 +100,7 @@ void TEXTE_PCB::TransformShapeWithClearanceToPolygon( ...@@ -100,7 +100,7 @@ void TEXTE_PCB::TransformShapeWithClearanceToPolygon(
CPolyPt corners[4]; // Buffer of polygon corners CPolyPt corners[4]; // Buffer of polygon corners
EDA_Rect rect = GetTextBox( -1 ); EDA_Rect rect = GetTextBox( -1 );
rect.Inflate( aClearanceValue, aClearanceValue ); rect.Inflate( aClearanceValue );
corners[0].x = rect.GetOrigin().x; corners[0].x = rect.GetOrigin().x;
corners[0].y = rect.GetOrigin().y; corners[0].y = rect.GetOrigin().y;
corners[1].y = corners[0].y; corners[1].y = corners[0].y;
......
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