2007-06-05 12:10:51 +00:00
|
|
|
|
/***********************************************************************/
|
|
|
|
|
/* Methodes de base de gestion des classes des elements de schematique */
|
|
|
|
|
/***********************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "fctsys.h"
|
|
|
|
|
#include "gr_basic.h"
|
2009-04-05 20:49:15 +00:00
|
|
|
|
#include "class_drawpanel.h"
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include "program.h"
|
|
|
|
|
#include "libcmp.h"
|
|
|
|
|
#include "general.h"
|
|
|
|
|
#include "id.h"
|
|
|
|
|
|
|
|
|
|
#include "protos.h"
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/****************************/
|
|
|
|
|
/* class DrawBusEntryStruct */
|
|
|
|
|
/***************************/
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
const wxChar* NameMarqueurType[] =
|
|
|
|
|
{
|
|
|
|
|
wxT( "" ),
|
|
|
|
|
wxT( "ERC" ),
|
|
|
|
|
wxT( "PCB" ),
|
|
|
|
|
wxT( "SIMUL" ),
|
|
|
|
|
wxT( "?????" )
|
|
|
|
|
};
|
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawBusEntryStruct::DrawBusEntryStruct( const wxPoint& pos, int shape, int id ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_BUSENTRY_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_Pos = pos;
|
|
|
|
|
m_Size.x = 100;
|
|
|
|
|
m_Size.y = 100;
|
|
|
|
|
m_Layer = LAYER_WIRE;
|
|
|
|
|
m_Width = 0;
|
|
|
|
|
|
|
|
|
|
if( id == BUS_TO_BUS )
|
|
|
|
|
{
|
|
|
|
|
m_Layer = LAYER_BUS;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( shape == '/' )
|
|
|
|
|
m_Size.y = -100;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
wxPoint DrawBusEntryStruct::m_End() const
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return wxPoint( m_Pos.x + m_Size.x, m_Pos.y + m_Size.y );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawBusEntryStruct* DrawBusEntryStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawBusEntryStruct* newitem = new DrawBusEntryStruct( m_Pos, 0, 0 );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
newitem->m_Layer = m_Layer;
|
|
|
|
|
newitem->m_Width = m_Width;
|
|
|
|
|
newitem->m_Size = m_Size;
|
|
|
|
|
newitem->m_Flags = m_Flags;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool DrawBusEntryStruct::Save( FILE* aFile ) const
|
|
|
|
|
{
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
const char* layer = "Wire";
|
|
|
|
|
const char* width = "Line";
|
|
|
|
|
|
|
|
|
|
if( GetLayer() == LAYER_BUS )
|
|
|
|
|
{
|
|
|
|
|
layer = "Bus"; width = "Bus";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( fprintf( aFile, "Entry %s %s\n", layer, width ) == EOF )
|
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
}
|
|
|
|
|
if( fprintf( aFile, "\t%-4d %-4d %-4d %-4d\n",
|
2009-04-05 20:49:15 +00:00
|
|
|
|
m_Pos.x, m_Pos.y, m_End().x, m_End().y ) == EOF )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-01-31 18:08:47 +00:00
|
|
|
|
EDA_Rect DrawBusEntryStruct::GetBoundingBox()
|
|
|
|
|
{
|
|
|
|
|
int dx = m_Pos.x - m_End().x;
|
|
|
|
|
int dy = m_Pos.y - m_End().y;
|
|
|
|
|
EDA_Rect box( wxPoint( m_Pos.x, m_Pos.y ), wxSize( dx, dy ) );
|
|
|
|
|
|
|
|
|
|
box.Normalize();
|
2009-06-02 07:26:49 +00:00
|
|
|
|
int width = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
box.Inflate( width / 2, width / 2 );
|
2009-01-31 18:08:47 +00:00
|
|
|
|
|
|
|
|
|
return box;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
2009-06-30 19:21:41 +00:00
|
|
|
|
/** Function GetPenSize
|
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
|
*/
|
|
|
|
|
int DrawBusEntryStruct::GetPenSize( )
|
|
|
|
|
{
|
|
|
|
|
int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
|
|
|
|
|
if( m_Layer == LAYER_BUS ) // TODO: find a better way to handle bus thickness
|
|
|
|
|
{
|
|
|
|
|
pensize = wxRound(pensize * 1.3);
|
|
|
|
|
pensize = MAX(pensize, 3);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return pensize;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
void DrawBusEntryStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
int color;
|
|
|
|
|
|
|
|
|
|
if( Color >= 0 )
|
|
|
|
|
color = Color;
|
|
|
|
|
else
|
|
|
|
|
color = ReturnLayerColor( m_Layer );
|
|
|
|
|
GRSetDrawMode( DC, DrawMode );
|
|
|
|
|
|
|
|
|
|
GRLine( &panel->m_ClipBox, DC, m_Pos.x + offset.x, m_Pos.y + offset.y,
|
2009-06-30 19:21:41 +00:00
|
|
|
|
m_End().x + offset.x, m_End().y + offset.y, GetPenSize( ), color );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
/****************************/
|
|
|
|
|
/* class DrawJunctionStruct */
|
|
|
|
|
/***************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawJunctionStruct::DrawJunctionStruct( const wxPoint& pos ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_JUNCTION_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_Pos = pos;
|
|
|
|
|
m_Layer = LAYER_JUNCTION;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawJunctionStruct* DrawJunctionStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawJunctionStruct* newitem = new DrawJunctionStruct( m_Pos );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
newitem->m_Layer = m_Layer;
|
|
|
|
|
newitem->m_Flags = m_Flags;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool DrawJunctionStruct::Save( FILE* aFile ) const
|
|
|
|
|
{
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
if( fprintf( aFile, "Connection ~ %-4d %-4d\n", m_Pos.x, m_Pos.y ) == EOF )
|
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EDA_Rect DrawJunctionStruct::GetBoundingBox()
|
2009-01-31 18:08:47 +00:00
|
|
|
|
// return a bounding box
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
int width = DRAWJUNCTION_SIZE * 2;
|
|
|
|
|
int xmin = m_Pos.x - DRAWJUNCTION_SIZE;
|
|
|
|
|
int ymin = m_Pos.y - DRAWJUNCTION_SIZE;
|
|
|
|
|
|
|
|
|
|
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( width, width ) );
|
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
};
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
2009-01-31 18:08:47 +00:00
|
|
|
|
/** Function HitTest
|
|
|
|
|
* @return true if the point aPosRef is within item area
|
|
|
|
|
* @param aPosRef = a wxPoint to test
|
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
|
bool DrawJunctionStruct::HitTest( const wxPoint& aPosRef )
|
2009-01-31 18:08:47 +00:00
|
|
|
|
{
|
|
|
|
|
wxPoint dist = aPosRef - m_Pos;
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
return sqrt( ( (double) ( dist.x * dist.x ) ) +
|
|
|
|
|
( (double) ( dist.y * dist.y ) ) ) < DRAWJUNCTION_SIZE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 19:21:41 +00:00
|
|
|
|
/** Function GetPenSize
|
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
|
* has no meaning for DrawJunctionStruct
|
|
|
|
|
*/
|
|
|
|
|
int DrawJunctionStruct::GetPenSize( )
|
|
|
|
|
{
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
/*****************************************************************************
|
|
|
|
|
* Routine to redraw connection struct. *
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
void DrawJunctionStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
int color;
|
|
|
|
|
|
|
|
|
|
if( Color >= 0 )
|
|
|
|
|
color = Color;
|
|
|
|
|
else
|
|
|
|
|
color = ReturnLayerColor( m_Layer );
|
|
|
|
|
GRSetDrawMode( DC, DrawMode );
|
|
|
|
|
|
|
|
|
|
GRFilledCircle( &panel->m_ClipBox, DC, m_Pos.x + offset.x,
|
|
|
|
|
m_Pos.y + offset.y, DRAWJUNCTION_SIZE, 0, color, color );
|
2009-01-31 18:08:47 +00:00
|
|
|
|
}
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
|
2008-04-22 16:38:23 +00:00
|
|
|
|
#if defined(DEBUG)
|
|
|
|
|
void DrawJunctionStruct::Show( int nestLevel, std::ostream& os )
|
|
|
|
|
{
|
|
|
|
|
// XML output:
|
|
|
|
|
wxString s = GetClass();
|
|
|
|
|
|
|
|
|
|
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str()
|
2009-04-05 20:49:15 +00:00
|
|
|
|
<< m_Pos << "/>\n";
|
2008-04-22 16:38:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
/*****************************/
|
|
|
|
|
/* class DrawNoConnectStruct */
|
|
|
|
|
/*****************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawNoConnectStruct::DrawNoConnectStruct( const wxPoint& pos ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_NOCONNECT_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_Pos = pos;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawNoConnectStruct* DrawNoConnectStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawNoConnectStruct* newitem = new DrawNoConnectStruct( m_Pos );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
newitem->m_Flags = m_Flags;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
2009-01-31 18:08:47 +00:00
|
|
|
|
EDA_Rect DrawNoConnectStruct::GetBoundingBox()
|
|
|
|
|
{
|
|
|
|
|
const int DELTA = DRAWNOCONNECT_SIZE / 2;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
EDA_Rect box( wxPoint( m_Pos.x - DELTA, m_Pos.y - DELTA ),
|
|
|
|
|
wxSize( 2 * DELTA, 2 * DELTA ) );
|
2009-01-31 18:08:47 +00:00
|
|
|
|
|
|
|
|
|
box.Normalize();
|
|
|
|
|
return box;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function HitTest
|
2009-01-31 18:08:47 +00:00
|
|
|
|
* @return true if the point aPosRef is within item area
|
|
|
|
|
* @param aPosRef = a wxPoint to test
|
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
|
bool DrawNoConnectStruct::HitTest( const wxPoint& aPosRef )
|
2009-01-31 18:08:47 +00:00
|
|
|
|
{
|
2009-06-02 07:26:49 +00:00
|
|
|
|
int width = g_DrawDefaultLineThickness;
|
2009-01-31 18:08:47 +00:00
|
|
|
|
int delta = ( DRAWNOCONNECT_SIZE + width) / 2;
|
|
|
|
|
|
|
|
|
|
wxPoint dist = aPosRef - m_Pos;
|
|
|
|
|
if( (ABS(dist.x) <= delta) && (ABS(dist.y) <= delta) )
|
|
|
|
|
return true;
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool DrawNoConnectStruct::Save( FILE* aFile ) const
|
|
|
|
|
{
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
if( fprintf( aFile, "NoConn ~ %-4d %-4d\n", m_Pos.x, m_Pos.y ) == EOF )
|
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-06-30 19:21:41 +00:00
|
|
|
|
/** Function GetPenSize
|
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
|
*/
|
|
|
|
|
int DrawNoConnectStruct::GetPenSize( )
|
|
|
|
|
{
|
|
|
|
|
return g_DrawDefaultLineThickness;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
void DrawNoConnectStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
const int DELTA = (DRAWNOCONNECT_SIZE / 2);
|
|
|
|
|
int pX, pY, color;
|
2009-06-02 07:26:49 +00:00
|
|
|
|
int width = g_DrawDefaultLineThickness;
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
pX = m_Pos.x + offset.x; pY = m_Pos.y + offset.y;
|
|
|
|
|
|
|
|
|
|
if( Color >= 0 )
|
|
|
|
|
color = Color;
|
|
|
|
|
else
|
|
|
|
|
color = ReturnLayerColor( LAYER_NOCONNECT );
|
|
|
|
|
GRSetDrawMode( DC, DrawMode );
|
|
|
|
|
|
|
|
|
|
GRLine( &panel->m_ClipBox, DC, pX - DELTA, pY - DELTA, pX + DELTA,
|
|
|
|
|
pY + DELTA, width, color );
|
|
|
|
|
GRLine( &panel->m_ClipBox, DC, pX + DELTA, pY - DELTA, pX - DELTA,
|
|
|
|
|
pY + DELTA, width, color );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
/**************************/
|
|
|
|
|
/* class DrawMarkerStruct */
|
|
|
|
|
/**************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
char marq_bitmap[] =
|
|
|
|
|
{
|
|
|
|
|
12, 12, 0, 0, /* Dimensions x et y, offsets x et y du bitmap de marqueurs*/
|
|
|
|
|
YELLOW, /* Couleur */
|
|
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, /* bitmap: >= 1 : color, */
|
|
|
|
|
1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, /* 0 = notrace */
|
|
|
|
|
1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0,
|
|
|
|
|
1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0,
|
|
|
|
|
1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0,
|
|
|
|
|
1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
char marqERC_bitmap[] =
|
|
|
|
|
{
|
|
|
|
|
8, 8, 0, 0, /* Dimensions x et y , offsets x et y du bitmap de marqueurs*/
|
|
|
|
|
-1, /* Color: -1 = couleur non pr<70>cis<69>e */
|
|
|
|
|
1, 1, 1, 1, 1, 0, 0, 0,
|
|
|
|
|
1, 1, 1, 0, 1, 0, 0, 0,
|
|
|
|
|
1, 1, 1, 1, 0, 0, 0, 0,
|
|
|
|
|
1, 0, 1, 1, 1, 0, 0, 0,
|
|
|
|
|
1, 1, 0, 1, 1, 1, 0, 0,
|
|
|
|
|
0, 0, 0, 0, 1, 1, 1, 0,
|
|
|
|
|
0, 0, 0, 0, 0, 1, 1, 1,
|
|
|
|
|
0, 0, 0, 0, 0, 0, 1, 0,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawMarkerStruct::DrawMarkerStruct( const wxPoint& pos, const wxString& text ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_MARKER_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_Pos = pos; /* XY coordinates of marker. */
|
|
|
|
|
m_Type = MARQ_UNSPEC;
|
|
|
|
|
m_MarkFlags = 0; // complements d'information
|
|
|
|
|
m_Comment = text;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawMarkerStruct::~DrawMarkerStruct()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawMarkerStruct* DrawMarkerStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawMarkerStruct* newitem = new DrawMarkerStruct( m_Pos, m_Comment );
|
|
|
|
|
|
|
|
|
|
newitem->m_Type = m_Type;
|
|
|
|
|
newitem->m_MarkFlags = m_MarkFlags;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
wxString DrawMarkerStruct::GetComment()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return m_Comment;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
#if defined (DEBUG)
|
|
|
|
|
|
2007-09-20 21:06:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Show
|
|
|
|
|
* is used to output the object tree, currently for debugging only.
|
2008-03-13 05:04:59 +00:00
|
|
|
|
* @param nestLevel An aid to prettier tree indenting, and is the level
|
2007-09-20 21:06:49 +00:00
|
|
|
|
* of nesting of this object within the overall tree.
|
|
|
|
|
* @param os The ostream& to output to.
|
|
|
|
|
*/
|
|
|
|
|
void DrawMarkerStruct::Show( int nestLevel, std::ostream& os )
|
|
|
|
|
{
|
|
|
|
|
// for now, make it look like XML:
|
2008-04-15 19:38:19 +00:00
|
|
|
|
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << m_Pos
|
|
|
|
|
<< "/>\n";
|
2007-09-20 21:06:49 +00:00
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool DrawMarkerStruct::Save( FILE* aFile ) const
|
|
|
|
|
{
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
if( fprintf( aFile, "Kmarq %c %-4d %-4d \"%s\" F=%X\n",
|
2009-04-05 20:49:15 +00:00
|
|
|
|
int( m_Type ) + 'A', m_Pos.x, m_Pos.y,
|
|
|
|
|
CONV_TO_UTF8( m_Comment ), m_MarkFlags ) == EOF )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
void DrawMarkerStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
#define WAR 1 // utilis<69> aussi dans erc.cpp
|
|
|
|
|
|
|
|
|
|
if( m_Type == MARQ_ERC )
|
|
|
|
|
{
|
|
|
|
|
int color = Color;
|
|
|
|
|
if( Color <= 0 )
|
|
|
|
|
{
|
|
|
|
|
color = (m_MarkFlags == WAR ) ?
|
|
|
|
|
g_LayerDescr.LayerColor[LAYER_ERC_WARN] :
|
|
|
|
|
g_LayerDescr.LayerColor[LAYER_ERC_ERR];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Draw_Marqueur( panel, DC, m_Pos + offset, marqERC_bitmap, DrawMode,
|
|
|
|
|
color );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
Draw_Marqueur( panel, DC, m_Pos + offset, marq_bitmap, DrawMode, Color );
|
|
|
|
|
}
|
|
|
|
|
|
2007-09-20 21:06:49 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
/***************************/
|
|
|
|
|
/* Class EDA_DrawLineStruct */
|
|
|
|
|
/***************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
EDA_DrawLineStruct::EDA_DrawLineStruct( const wxPoint& pos, int layer ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_SEGMENT_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_Start = pos;
|
|
|
|
|
m_End = pos;
|
2009-06-02 07:26:49 +00:00
|
|
|
|
m_Width = 0; // Default thickness used
|
2007-08-23 04:28:46 +00:00
|
|
|
|
m_StartIsDangling = m_EndIsDangling = FALSE;
|
|
|
|
|
|
|
|
|
|
switch( layer )
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
m_Layer = LAYER_NOTES; /* Mettre ds Notes */
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case LAYER_WIRE:
|
|
|
|
|
m_Layer = LAYER_WIRE;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case LAYER_BUS:
|
|
|
|
|
m_Layer = LAYER_BUS;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
EDA_DrawLineStruct* EDA_DrawLineStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
EDA_DrawLineStruct* newitem = new EDA_DrawLineStruct( m_Start, m_Layer );
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
newitem->m_End = m_End;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
|
|
|
|
bool EDA_DrawLineStruct::IsOneEndPointAt( const wxPoint& pos )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2007-08-23 04:28:46 +00:00
|
|
|
|
if( (pos.x == m_Start.x) && (pos.y == m_Start.y) )
|
|
|
|
|
return TRUE;
|
|
|
|
|
if( (pos.x == m_End.x) && (pos.y == m_End.y) )
|
|
|
|
|
return TRUE;
|
|
|
|
|
return FALSE;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
#if defined (DEBUG)
|
|
|
|
|
|
2007-09-20 21:06:49 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Show
|
|
|
|
|
* is used to output the object tree, currently for debugging only.
|
2008-03-13 05:04:59 +00:00
|
|
|
|
* @param nestLevel An aid to prettier tree indenting, and is the level
|
2007-09-20 21:06:49 +00:00
|
|
|
|
* of nesting of this object within the overall tree.
|
|
|
|
|
* @param os The ostream& to output to.
|
|
|
|
|
*/
|
|
|
|
|
void EDA_DrawLineStruct::Show( int nestLevel, std::ostream& os )
|
|
|
|
|
{
|
2008-03-13 05:04:59 +00:00
|
|
|
|
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() <<
|
2008-04-15 19:38:19 +00:00
|
|
|
|
" layer=\"" << m_Layer << '"' <<
|
|
|
|
|
" width=\"" << m_Width << '"' <<
|
|
|
|
|
" startIsDangling=\"" << m_StartIsDangling << '"' <<
|
|
|
|
|
" endIsDangling=\"" << m_EndIsDangling << '"' << ">" <<
|
|
|
|
|
" <start" << m_Start << "/>" <<
|
|
|
|
|
" <end" << m_End << "/>" <<
|
|
|
|
|
"</" << GetClass().Lower().mb_str() << ">\n";
|
2007-09-20 21:06:49 +00:00
|
|
|
|
}
|
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
#endif
|
|
|
|
|
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
2008-03-15 04:18:32 +00:00
|
|
|
|
EDA_Rect EDA_DrawLineStruct::GetBoundingBox()
|
2008-03-13 05:04:59 +00:00
|
|
|
|
{
|
2008-04-15 19:38:19 +00:00
|
|
|
|
int width = 25;
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
int xmin = MIN( m_Start.x, m_End.x ) - width;
|
|
|
|
|
int ymin = MIN( m_Start.y, m_End.y ) - width;
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
int xmax = MAX( m_Start.x, m_End.x ) + width;
|
|
|
|
|
int ymax = MAX( m_Start.y, m_End.y ) + width;
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
|
|
|
|
// return a rectangle which is [pos,dim) in nature. therefore the +1
|
2009-04-05 20:49:15 +00:00
|
|
|
|
EDA_Rect ret( wxPoint( xmin, ymin ),
|
|
|
|
|
wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
}
|
|
|
|
|
|
2008-03-15 04:18:32 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool EDA_DrawLineStruct::Save( FILE* aFile ) const
|
2008-03-15 04:18:32 +00:00
|
|
|
|
{
|
2008-04-15 19:38:19 +00:00
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
const char* layer = "Notes";
|
|
|
|
|
const char* width = "Line";
|
|
|
|
|
|
|
|
|
|
if( GetLayer() == LAYER_WIRE )
|
|
|
|
|
layer = "Wire";
|
|
|
|
|
if( GetLayer() == LAYER_BUS )
|
|
|
|
|
layer = "Bus";
|
|
|
|
|
if( fprintf( aFile, "Wire %s %s\n", layer, width ) == EOF )
|
2008-03-15 04:18:32 +00:00
|
|
|
|
{
|
2008-04-15 19:38:19 +00:00
|
|
|
|
success = false;
|
|
|
|
|
}
|
2009-04-05 20:49:15 +00:00
|
|
|
|
if ( fprintf( aFile, "\t%-4d %-4d %-4d %-4d\n", m_Start.x,m_Start.y,
|
|
|
|
|
m_End.x,m_End.y ) == EOF )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
success = false;
|
2008-03-15 04:18:32 +00:00
|
|
|
|
}
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
return success;
|
2008-03-15 04:18:32 +00:00
|
|
|
|
}
|
2008-03-13 05:04:59 +00:00
|
|
|
|
|
2008-04-15 19:38:19 +00:00
|
|
|
|
|
2009-06-30 19:21:41 +00:00
|
|
|
|
/** Function GetPenSize
|
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
|
*/
|
|
|
|
|
int EDA_DrawLineStruct::GetPenSize( )
|
|
|
|
|
{
|
|
|
|
|
int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
|
|
|
|
|
return pensize;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
void EDA_DrawLineStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
int color;
|
2009-06-30 19:21:41 +00:00
|
|
|
|
int width = GetPenSize( );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
if( Color >= 0 )
|
|
|
|
|
color = Color;
|
|
|
|
|
else
|
|
|
|
|
color = ReturnLayerColor( m_Layer );
|
|
|
|
|
|
|
|
|
|
GRSetDrawMode( DC, DrawMode );
|
|
|
|
|
|
|
|
|
|
// FIXME: Not compatable with new zoom.
|
2009-06-02 07:26:49 +00:00
|
|
|
|
if( m_Layer == LAYER_BUS)
|
|
|
|
|
{
|
|
|
|
|
width = wxRound(width * 1.4);
|
|
|
|
|
width = MAX(width, 3);
|
|
|
|
|
}
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
if( m_Layer == LAYER_NOTES )
|
|
|
|
|
GRDashedLine( &panel->m_ClipBox, DC, m_Start.x + offset.x,
|
|
|
|
|
m_Start.y + offset.y, m_End.x + offset.x,
|
|
|
|
|
m_End.y + offset.y, width, color );
|
|
|
|
|
else
|
|
|
|
|
GRLine( &panel->m_ClipBox, DC, m_Start.x + offset.x,
|
|
|
|
|
m_Start.y + offset.y, m_End.x + offset.x, m_End.y + offset.y,
|
|
|
|
|
width, color );
|
|
|
|
|
|
|
|
|
|
if( m_StartIsDangling )
|
|
|
|
|
DrawDanglingSymbol( panel, DC, m_Start + offset, color );
|
|
|
|
|
|
|
|
|
|
if( m_EndIsDangling )
|
|
|
|
|
DrawDanglingSymbol( panel, DC, m_End + offset, color );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
/****************************/
|
|
|
|
|
/* Class DrawPolylineStruct */
|
|
|
|
|
/****************************/
|
2007-06-05 12:10:51 +00:00
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
DrawPolylineStruct::DrawPolylineStruct( int layer ) :
|
2008-04-14 19:22:48 +00:00
|
|
|
|
SCH_ITEM( NULL, DRAW_POLYLINE_STRUCT_TYPE )
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2009-06-02 07:26:49 +00:00
|
|
|
|
m_Width = 0;
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
|
|
|
|
switch( layer )
|
|
|
|
|
{
|
|
|
|
|
default:
|
|
|
|
|
m_Layer = LAYER_NOTES;
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case LAYER_WIRE:
|
|
|
|
|
case LAYER_NOTES:
|
|
|
|
|
case LAYER_BUS:
|
|
|
|
|
m_Layer = layer;
|
|
|
|
|
break;
|
|
|
|
|
}
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawPolylineStruct::~DrawPolylineStruct()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2007-08-23 04:28:46 +00:00
|
|
|
|
|
2007-09-01 12:00:30 +00:00
|
|
|
|
DrawPolylineStruct* DrawPolylineStruct::GenCopy()
|
2007-06-05 12:10:51 +00:00
|
|
|
|
{
|
2009-04-05 20:49:15 +00:00
|
|
|
|
DrawPolylineStruct* newitem = new DrawPolylineStruct( m_Layer );
|
2009-01-02 17:07:50 +00:00
|
|
|
|
newitem->m_PolyPoints = m_PolyPoints; // std::vector copy
|
2007-08-23 04:28:46 +00:00
|
|
|
|
return newitem;
|
2007-06-05 12:10:51 +00:00
|
|
|
|
}
|
2008-04-15 19:38:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Function Save
|
|
|
|
|
* writes the data structures for this object out to a FILE in "*.brd" format.
|
|
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
|
*/
|
|
|
|
|
bool DrawPolylineStruct::Save( FILE* aFile ) const
|
|
|
|
|
{
|
|
|
|
|
bool success = true;
|
|
|
|
|
|
|
|
|
|
const char* layer = "Notes";
|
|
|
|
|
const char* width = "Line";
|
|
|
|
|
|
|
|
|
|
if( GetLayer() == LAYER_WIRE )
|
|
|
|
|
layer = "Wire";
|
|
|
|
|
if( GetLayer() == LAYER_BUS )
|
|
|
|
|
layer = "Bus";
|
|
|
|
|
if( fprintf( aFile, "Poly %s %s %d\n",
|
2009-04-05 20:49:15 +00:00
|
|
|
|
width, layer, GetCornerCount() ) == EOF )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
2009-04-05 20:49:15 +00:00
|
|
|
|
return false;
|
2008-04-15 19:38:19 +00:00
|
|
|
|
}
|
2009-01-02 17:07:50 +00:00
|
|
|
|
for( unsigned ii = 0; ii < GetCornerCount(); ii++ )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
if( fprintf( aFile, "\t%-4d %-4d\n",
|
2009-04-05 20:49:15 +00:00
|
|
|
|
m_PolyPoints[ii ].x, m_PolyPoints[ii].y ) == EOF )
|
2008-04-15 19:38:19 +00:00
|
|
|
|
{
|
|
|
|
|
success = false;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success;
|
|
|
|
|
}
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
|
2009-06-30 19:21:41 +00:00
|
|
|
|
/** Function GetPenSize
|
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
|
*/
|
|
|
|
|
int DrawPolylineStruct::GetPenSize( )
|
|
|
|
|
{
|
|
|
|
|
int pensize = (m_Width == 0) ? g_DrawDefaultLineThickness : m_Width;
|
|
|
|
|
return pensize;
|
|
|
|
|
}
|
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
void DrawPolylineStruct::Draw( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
|
const wxPoint& offset, int DrawMode, int Color )
|
|
|
|
|
{
|
|
|
|
|
int color;
|
2009-06-30 19:21:41 +00:00
|
|
|
|
int width = GetPenSize( );
|
2009-04-05 20:49:15 +00:00
|
|
|
|
|
|
|
|
|
if( Color >= 0 )
|
|
|
|
|
color = Color;
|
|
|
|
|
else
|
|
|
|
|
color = ReturnLayerColor( m_Layer );
|
|
|
|
|
|
|
|
|
|
GRSetDrawMode( DC, DrawMode );
|
|
|
|
|
|
|
|
|
|
if( m_Layer == LAYER_BUS )
|
|
|
|
|
{
|
|
|
|
|
width *= 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
GRMoveTo( m_PolyPoints[0].x, m_PolyPoints[0].y );
|
|
|
|
|
|
|
|
|
|
if( m_Layer == LAYER_NOTES )
|
|
|
|
|
{
|
|
|
|
|
for( unsigned i = 1; i < GetCornerCount(); i++ )
|
|
|
|
|
GRDashedLineTo( &panel->m_ClipBox, DC, m_PolyPoints[i].x + offset.x,
|
|
|
|
|
m_PolyPoints[i].y + offset.y, width, color );
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
for( unsigned i = 1; i < GetCornerCount(); i++ )
|
|
|
|
|
GRLineTo( &panel->m_ClipBox, DC, m_PolyPoints[i].x + offset.x,
|
|
|
|
|
m_PolyPoints[i].y + offset.y, width, color );
|
|
|
|
|
}
|
|
|
|
|
}
|