2008-09-13 18:59:57 +00:00
|
|
|
/****************************************************************/
|
2009-09-02 18:12:45 +00:00
|
|
|
/* Headers for library definition and lib component definitions */
|
2008-09-13 18:59:57 +00:00
|
|
|
/****************************************************************/
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
/* Definitions of graphic items used to create shapes in component libraries.
|
2009-01-02 17:07:50 +00:00
|
|
|
*/
|
2008-09-13 18:59:57 +00:00
|
|
|
#ifndef CLASSES_BODY_ITEMS_H
|
|
|
|
#define CLASSES_BODY_ITEMS_H
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
#define TARGET_PIN_DIAM 12 /* Circle diameter drawn at the active end of
|
|
|
|
* pins */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
#define DEFAULT_TEXT_SIZE 50 /* Default size for field texts */
|
|
|
|
#define PART_NAME_LEN 15 /* Maximum length of part name. */
|
|
|
|
#define PREFIX_NAME_LEN 5 /* Maximum length of prefix (IC, R, SW etc.). */
|
|
|
|
#define PIN_WIDTH 100 /* Width between 2 pins in internal units. */
|
|
|
|
#define PIN_LENGTH 300 /* Default Length of each pin to be drawn. */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-16 09:03:40 +00:00
|
|
|
#if defined(KICAD_GOST)
|
|
|
|
#define INVERT_PIN_RADIUS 20 /* Radius of inverted pin circle. */
|
|
|
|
#else
|
2009-04-05 20:49:15 +00:00
|
|
|
#define INVERT_PIN_RADIUS 35 /* Radius of inverted pin circle. */
|
2009-06-16 09:03:40 +00:00
|
|
|
#endif
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
#define CLOCK_PIN_DIM 40 /* Dim of clock pin symbol. */
|
|
|
|
#define IEEE_SYMBOL_PIN_DIM 40 /* Dim of special pin symbol. */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enum ElectricPinType
|
|
|
|
* is the set of schematic pin types, used in ERC tests.
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
enum ElectricPinType {
|
2008-09-13 18:59:57 +00:00
|
|
|
PIN_INPUT,
|
|
|
|
PIN_OUTPUT,
|
|
|
|
PIN_BIDI,
|
|
|
|
PIN_TRISTATE,
|
|
|
|
PIN_PASSIVE,
|
|
|
|
PIN_UNSPECIFIED,
|
|
|
|
PIN_POWER_IN,
|
|
|
|
PIN_POWER_OUT,
|
|
|
|
PIN_OPENCOLLECTOR,
|
|
|
|
PIN_OPENEMITTER,
|
|
|
|
PIN_NC, /* No connect */
|
|
|
|
PIN_NMAX /* End of List (no used as pin type) */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* Messages d'affichage du type electrique */
|
2009-04-05 20:49:15 +00:00
|
|
|
extern const wxChar* MsgPinElectricType[];
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
/* Autres bits: bits du membre .Flag des Pins */
|
|
|
|
#define PINNOTDRAW 1 /* si 1: pin invisible */
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enum DrawPinShape
|
|
|
|
* is the set of shapes allowed for pins.
|
|
|
|
*/
|
|
|
|
enum DrawPinShape {
|
|
|
|
NONE = 0,
|
|
|
|
INVERT = 1,
|
|
|
|
CLOCK = 2,
|
|
|
|
LOWLEVEL_IN = 4,
|
|
|
|
LOWLEVEL_OUT = 8
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Enum DrawPinOrient
|
|
|
|
* is the set of orientations allowed for pins.
|
|
|
|
*/
|
|
|
|
enum DrawPinOrient {
|
|
|
|
PIN_RIGHT = 'R',
|
|
|
|
PIN_LEFT = 'L',
|
|
|
|
PIN_UP = 'U',
|
|
|
|
PIN_DOWN = 'D',
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/****************************************************************************/
|
2009-09-02 18:12:45 +00:00
|
|
|
/* Classes for handle the body items of a component: pins add graphic items */
|
2008-09-13 18:59:57 +00:00
|
|
|
/****************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
/* class LibEDA_BaseStruct : Basic class for items used in a library component
|
|
|
|
* (graphic shapes, texts, fields, pins)
|
|
|
|
*/
|
|
|
|
|
|
|
|
class LibEDA_BaseStruct : public EDA_BaseStruct
|
|
|
|
{
|
|
|
|
public:
|
2009-09-04 18:57:37 +00:00
|
|
|
int m_Unit; /* Unit identification (for multi part per package)
|
2009-04-05 20:49:15 +00:00
|
|
|
* 0 if the item is common to all units */
|
2009-09-04 18:57:37 +00:00
|
|
|
int m_Convert; /* Shape identification (for parts which have a convert
|
2009-04-05 20:49:15 +00:00
|
|
|
* shape) 0 if the item is common to all shapes */
|
2009-09-04 18:57:37 +00:00
|
|
|
FILL_T m_Fill; /* NO_FILL, FILLED_SHAPE or FILLED_WITH_BG_BODYCOLOR.
|
2009-04-05 20:49:15 +00:00
|
|
|
* has meaning only for some items */
|
|
|
|
wxString m_typeName; /* Name of object displayed in the message panel. */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
LibEDA_BaseStruct* Next()
|
|
|
|
{
|
|
|
|
return (LibEDA_BaseStruct*) Pnext;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-06-18 13:30:52 +00:00
|
|
|
LibEDA_BaseStruct( KICAD_T struct_type, EDA_LibComponentStruct * aParent );
|
2008-09-13 18:59:57 +00:00
|
|
|
virtual ~LibEDA_BaseStruct() { }
|
|
|
|
|
|
|
|
/** Function Draw (virtual pure)
|
2008-12-16 19:44:57 +00:00
|
|
|
* Draw A body item
|
2009-04-05 20:49:15 +00:00
|
|
|
* @param aPanel = DrawPanel to use (can be null) mainly used for clipping
|
|
|
|
* purposes
|
2008-12-16 19:44:57 +00:00
|
|
|
* @param aDC = Device Context (can be null)
|
|
|
|
* @param aOffset = offset to draw
|
2009-04-05 20:49:15 +00:00
|
|
|
* @param aColor = -1 to use the normal body item color, or use this color
|
|
|
|
* if >= 0
|
2008-12-16 19:44:57 +00:00
|
|
|
* @param aDrawMode = GR_OR, GR_XOR, ...
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aData = value or pointer used to pass others parameters,
|
2009-04-05 20:49:15 +00:00
|
|
|
* depending on body items. used for some items to force
|
|
|
|
* to force no fill mode ( has meaning only for items what
|
|
|
|
* can be filled ). used in printing or moving objects mode
|
2009-09-02 18:12:45 +00:00
|
|
|
* or to pass reference to the lib component for pins
|
|
|
|
* @param aTransformMatrix = Transform Matrix (rotation, mirror ..)
|
2008-09-13 18:59:57 +00:00
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC,
|
|
|
|
const wxPoint &aOffset, int aColor, int aDrawMode,
|
|
|
|
void* aData, const int aTransformMatrix[2][2] ) = 0;
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize virtual pure
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( ) = 0;
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-01-02 17:07:50 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const = 0;
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Load( char* line, wxString& errorMsg ) = 0;
|
|
|
|
|
2009-06-18 13:30:52 +00:00
|
|
|
EDA_LibComponentStruct * GetParent()
|
|
|
|
{
|
|
|
|
return (EDA_LibComponentStruct *)m_Parent;
|
|
|
|
}
|
2009-06-13 17:06:07 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param refPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& refPos )
|
|
|
|
{
|
|
|
|
return false; // derived classes should override this function
|
|
|
|
}
|
|
|
|
|
2009-09-02 18:12:45 +00:00
|
|
|
/** Function HitTest (overlaid)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] ) = 0;
|
2009-06-13 17:06:07 +00:00
|
|
|
|
|
|
|
/** Function GetBoundingBox
|
|
|
|
* @return the boundary box for this, in library coordinates
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual EDA_Rect GetBoundingBox()
|
|
|
|
{
|
|
|
|
return EDA_BaseStruct::GetBoundingBox();
|
|
|
|
}
|
2008-09-18 17:10:54 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Make a copy of this draw item.
|
|
|
|
*
|
|
|
|
* Classes derived from LibEDA_BaseStruct must implement DoGenCopy().
|
|
|
|
* This is just a placeholder for the derived class.
|
|
|
|
*
|
|
|
|
* @return Copy of this draw item.
|
|
|
|
*/
|
|
|
|
LibEDA_BaseStruct* GenCopy() { return DoGenCopy(); }
|
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy() = 0;
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/********/
|
|
|
|
/* Pins */
|
|
|
|
/********/
|
|
|
|
class LibDrawPin : public LibEDA_BaseStruct
|
|
|
|
{
|
|
|
|
public:
|
2009-09-02 18:12:45 +00:00
|
|
|
int m_PinLen; /* Pin length */
|
2008-09-13 18:59:57 +00:00
|
|
|
int m_Orient; /* Pin orientation (Up, Down, Left, Right) */
|
|
|
|
int m_PinShape; /* Bitwise ORed: Pin shape (see enum DrawPinShape) */
|
|
|
|
int m_PinType; /* Electrical pin properties */
|
|
|
|
int m_Attributs; /* bit 0 != 0: pin invisible */
|
2009-09-02 18:12:45 +00:00
|
|
|
long m_PinNum; /* Pin number: 4 ASCII code like "12" or "anod"
|
2009-04-05 20:49:15 +00:00
|
|
|
* or "G6" "12" is stored as "12\0\0" ans does not
|
|
|
|
* depend on endian type*/
|
2008-09-13 18:59:57 +00:00
|
|
|
wxString m_PinName;
|
2009-04-05 20:49:15 +00:00
|
|
|
int m_PinNumSize;
|
|
|
|
int m_PinNameSize; /* Pin num and Pin name sizes */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-09-02 18:12:45 +00:00
|
|
|
/* (Currently Unused) Pin num and Pin name text options: italic/normal
|
|
|
|
* /bold, 0 = default */
|
2009-09-04 18:57:37 +00:00
|
|
|
char m_PinNumShapeOpt;
|
|
|
|
char m_PinNameShapeOpt;
|
2009-09-02 18:12:45 +00:00
|
|
|
// (Currently Unused) Pin num and Pin name text opt position, 0 = default:
|
2009-09-04 18:57:37 +00:00
|
|
|
char m_PinNumPositionOpt;
|
|
|
|
char m_PinNamePositionOpt;
|
2009-06-13 17:06:07 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start
|
2009-04-05 20:49:15 +00:00
|
|
|
* point (segments) */
|
|
|
|
int m_Width; /* Line width */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawPin(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawPin() { }
|
2008-11-24 06:53:43 +00:00
|
|
|
|
|
|
|
LibDrawPin* Next() const { return (LibDrawPin*) Pnext; }
|
|
|
|
LibDrawPin* Back() const { return (LibDrawPin*) Pback; }
|
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawPin" );
|
|
|
|
}
|
2008-11-24 06:53:43 +00:00
|
|
|
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-01-02 17:07:50 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2009-06-13 17:06:07 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
|
|
|
virtual EDA_Rect GetBoundingBox();
|
2009-09-02 18:12:45 +00:00
|
|
|
wxPoint ReturnPinEndPoint();
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-01-02 17:07:50 +00:00
|
|
|
int ReturnPinDrawOrient( const int TransMat[2][2] );
|
2009-07-05 12:09:41 +00:00
|
|
|
|
|
|
|
/** Function ReturnPinStringNum
|
|
|
|
* fill a buffer with pin num as a wxString
|
2009-09-02 18:12:45 +00:00
|
|
|
* Pin num is coded as a long or 4 ASCII chars
|
2009-07-05 12:09:41 +00:00
|
|
|
* Used to print/draw the pin num
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aStringBuffer = the wxString to store the pin num as an unicode
|
|
|
|
* string
|
2009-07-05 12:09:41 +00:00
|
|
|
*/
|
|
|
|
void ReturnPinStringNum( wxString& aStringBuffer ) const;
|
|
|
|
|
|
|
|
/** Function ReturnPinStringNum (static function)
|
|
|
|
* Pin num is coded as a long or 4 ascii chars
|
|
|
|
* @param aPinNum = a long containing a pin num
|
2009-09-02 18:12:45 +00:00
|
|
|
* @return aStringBuffer = the wxString to store the pin num as an
|
|
|
|
* unicode string
|
2009-07-05 12:09:41 +00:00
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
static wxString ReturnPinStringNum( long aPinNum );
|
2009-07-05 12:09:41 +00:00
|
|
|
|
2009-01-02 17:07:50 +00:00
|
|
|
void SetPinNumFromString( wxString& buffer );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
2009-01-02 17:07:50 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void DrawPinSymbol( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
const wxPoint& pin_pos, int orient,
|
2009-01-02 17:07:50 +00:00
|
|
|
int DrawMode, int Color = -1 );
|
|
|
|
|
|
|
|
void DrawPinTexts( WinEDA_DrawPanel* panel, wxDC* DC,
|
|
|
|
wxPoint& pin_pos, int orient,
|
2009-04-05 20:49:15 +00:00
|
|
|
int TextInside, bool DrawPinNum,
|
|
|
|
bool DrawPinName, int Color, int DrawMode );
|
2009-08-29 10:20:48 +00:00
|
|
|
void PlotPinTexts( PLOTTER *plotter,
|
2009-09-02 18:12:45 +00:00
|
|
|
wxPoint& pin_pos,
|
2009-01-02 17:07:50 +00:00
|
|
|
int orient,
|
|
|
|
int TextInside,
|
|
|
|
bool DrawPinNum,
|
|
|
|
bool DrawPinNameint,
|
2009-05-28 17:39:40 +00:00
|
|
|
int aWidth);
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**************************/
|
|
|
|
/* Graphic Body Item: Arc */
|
|
|
|
/**************************/
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
class LibDrawArc : public LibEDA_BaseStruct
|
2008-09-13 18:59:57 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
int m_Rayon;
|
2009-04-05 20:49:15 +00:00
|
|
|
int t1, t2; /* position des 2 extremites de l'arc en 0.1 degres */
|
|
|
|
wxPoint m_ArcStart;
|
|
|
|
wxPoint m_ArcEnd; /* position des 2 extremites de l'arc en coord reelles*/
|
|
|
|
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point
|
|
|
|
* (segments) */
|
|
|
|
int m_Width; /* Line width */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawArc(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawArc() { }
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawArc" );
|
|
|
|
}
|
2008-12-16 19:44:57 +00:00
|
|
|
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-01-02 17:07:50 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-11 14:26:17 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
2009-06-13 17:06:07 +00:00
|
|
|
|
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
|
|
|
|
|
|
|
virtual EDA_Rect GetBoundingBox();
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-09-02 18:12:45 +00:00
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
/*****************************/
|
|
|
|
/* Graphic Body Item: Circle */
|
|
|
|
/*****************************/
|
2009-04-05 20:49:15 +00:00
|
|
|
class LibDrawCircle : public LibEDA_BaseStruct
|
2008-09-13 18:59:57 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-01-02 17:07:50 +00:00
|
|
|
int m_Rayon;
|
2009-04-05 20:49:15 +00:00
|
|
|
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start
|
|
|
|
* point (segments) */
|
|
|
|
int m_Width; /* Line width */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawCircle(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawCircle() { }
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawCircle" );
|
|
|
|
}
|
2008-12-16 19:44:57 +00:00
|
|
|
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-11 14:26:17 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
|
|
|
|
|
|
|
virtual EDA_Rect GetBoundingBox();
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/*********************************************/
|
|
|
|
/* Graphic Body Item: Text */
|
|
|
|
/* This is only a graphic text. */
|
|
|
|
/* Fields like Ref , value... are not Text, */
|
|
|
|
/* they are a separate class */
|
|
|
|
/*********************************************/
|
2009-04-05 20:49:15 +00:00
|
|
|
class LibDrawText : public LibEDA_BaseStruct, public EDA_TextStruct
|
2008-09-13 18:59:57 +00:00
|
|
|
{
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawText(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawText() { }
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawText" );
|
|
|
|
}
|
2008-12-16 19:44:57 +00:00
|
|
|
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-01-02 17:07:50 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-11 14:26:17 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param refPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& refPos );
|
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near a segment
|
|
|
|
* @param aPosRef = a wxPoint to test, in eeschema coordinates
|
|
|
|
* @param aThreshold = max distance to a segment
|
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2009-06-13 17:06:07 +00:00
|
|
|
|
2009-06-11 14:26:17 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest (overlayed)
|
|
|
|
* tests if the given EDA_Rect intersect this object.
|
|
|
|
* For now, an ending point must be inside this rect.
|
|
|
|
* @param refArea : the given EDA_Rect
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( EDA_Rect& refArea )
|
|
|
|
{
|
|
|
|
return TextHitTest( refArea );
|
|
|
|
}
|
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
|
|
|
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/********************************/
|
|
|
|
/* Graphic Body Item: Rectangle */
|
|
|
|
/********************************/
|
|
|
|
class LibDrawSquare : public LibEDA_BaseStruct
|
|
|
|
{
|
|
|
|
public:
|
2009-04-05 20:49:15 +00:00
|
|
|
wxPoint m_End; /* Rectangle end point. */
|
|
|
|
wxPoint m_Pos; /* Rectangle start point. */
|
|
|
|
int m_Width; /* Line width */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawSquare(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawSquare() { }
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawSquare" );
|
|
|
|
}
|
2008-12-16 19:44:57 +00:00
|
|
|
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
|
|
|
|
|
|
|
virtual EDA_Rect GetBoundingBox();
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/**********************************/
|
|
|
|
/* Graphic Body Item: single line */
|
|
|
|
/**********************************/
|
|
|
|
class LibDrawSegment : public LibEDA_BaseStruct
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxPoint m_End;
|
2009-04-05 20:49:15 +00:00
|
|
|
wxPoint m_Pos; /* Position or centre (Arc and Circle) or start point
|
|
|
|
* (segments) */
|
|
|
|
int m_Width; /* Line width */
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawSegment(EDA_LibComponentStruct * aParent);
|
2008-09-13 18:59:57 +00:00
|
|
|
~LibDrawSegment() { }
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawSegment" );
|
|
|
|
}
|
2008-12-16 19:44:57 +00:00
|
|
|
|
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near this object
|
|
|
|
* @param aPosRef = a wxPoint to test
|
2009-09-02 18:12:45 +00:00
|
|
|
* @param aThreshold = max distance to this object (usually the half
|
|
|
|
* thickness of a line)
|
2009-06-13 17:06:07 +00:00
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
|
|
|
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
|
2009-01-02 13:19:34 +00:00
|
|
|
/**********************************************************/
|
|
|
|
/* Graphic Body Item: Polygon and polyline (set of lines) */
|
|
|
|
/**********************************************************/
|
2008-09-13 18:59:57 +00:00
|
|
|
class LibDrawPolyline : public LibEDA_BaseStruct
|
|
|
|
{
|
|
|
|
public:
|
2009-04-05 20:49:15 +00:00
|
|
|
int m_Width; /* Line width */
|
2009-01-02 17:07:50 +00:00
|
|
|
std::vector<wxPoint> m_PolyPoints; // list of points (>= 2)
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
public:
|
2009-06-18 13:30:52 +00:00
|
|
|
LibDrawPolyline(EDA_LibComponentStruct * aParent);
|
2009-01-02 13:19:34 +00:00
|
|
|
~LibDrawPolyline() { }
|
2008-09-13 18:59:57 +00:00
|
|
|
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawPolyline" );
|
|
|
|
}
|
|
|
|
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2008-09-18 17:10:54 +00:00
|
|
|
/**
|
|
|
|
* Function Save
|
2009-04-05 20:49:15 +00:00
|
|
|
* writes the data structures for this object out to a FILE in "*.brd"
|
|
|
|
* format.
|
2008-09-18 17:10:54 +00:00
|
|
|
* @param aFile The FILE to write to.
|
|
|
|
* @return bool - true if success writing else false.
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual bool Save( FILE* aFile ) const;
|
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
2008-12-16 19:44:57 +00:00
|
|
|
|
2009-09-02 18:12:45 +00:00
|
|
|
void AddPoint( const wxPoint& point );
|
2008-09-13 18:59:57 +00:00
|
|
|
|
2009-01-02 13:19:34 +00:00
|
|
|
/** Function GetCornerCount
|
|
|
|
* @return the number of corners
|
|
|
|
*/
|
|
|
|
unsigned GetCornerCount() const { return m_PolyPoints.size(); }
|
|
|
|
|
2009-06-13 17:06:07 +00:00
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
2009-01-02 13:19:34 +00:00
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near a segment
|
|
|
|
* @param aPosRef = a wxPoint to test
|
|
|
|
* @param aThreshold = max distance to a segment
|
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2009-01-02 13:19:34 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
/** Function GetBoundingBox
|
2009-01-02 13:19:34 +00:00
|
|
|
* @return the boundary box for this, in library coordinates
|
|
|
|
*/
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual EDA_Rect GetBoundingBox();
|
|
|
|
|
2009-06-30 17:57:27 +00:00
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
2009-01-02 13:19:34 +00:00
|
|
|
|
2009-04-05 20:49:15 +00:00
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2008-09-13 18:59:57 +00:00
|
|
|
};
|
|
|
|
|
2009-06-25 20:45:27 +00:00
|
|
|
/**********************************************************/
|
|
|
|
/* Graphic Body Item: Bezier Curve (set of lines) */
|
|
|
|
/**********************************************************/
|
|
|
|
class LibDrawBezier : public LibEDA_BaseStruct
|
2009-06-30 17:57:27 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
int m_Width; /* Line width */
|
|
|
|
std::vector<wxPoint> m_BezierPoints; // list of parameter (3|4)
|
|
|
|
std::vector<wxPoint> m_PolyPoints; // list of points (>= 2)
|
|
|
|
|
|
|
|
public:
|
|
|
|
LibDrawBezier(EDA_LibComponentStruct * aParent);
|
|
|
|
~LibDrawBezier() { }
|
|
|
|
|
|
|
|
virtual wxString GetClass() const
|
|
|
|
{
|
|
|
|
return wxT( "LibDrawBezier" );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
virtual bool Save( FILE* aFile ) const;
|
|
|
|
virtual bool Load( char* line, wxString& errorMsg );
|
|
|
|
|
|
|
|
void AddPoint( const wxPoint& point );
|
|
|
|
|
|
|
|
/** Function GetCornerCount
|
|
|
|
* @return the number of corners
|
|
|
|
*/
|
|
|
|
unsigned GetCornerCount() const { return m_PolyPoints.size(); }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Function HitTest
|
|
|
|
* tests if the given wxPoint is within the bounds of this object.
|
|
|
|
* @param aRefPos A wxPoint to test
|
|
|
|
* @return bool - true if a hit, else false
|
|
|
|
*/
|
|
|
|
virtual bool HitTest( const wxPoint& aRefPos );
|
|
|
|
|
|
|
|
/** Function HitTest
|
|
|
|
* @return true if the point aPosRef is near a segment
|
|
|
|
* @param aPosRef = a wxPoint to test
|
|
|
|
* @param aThreshold = max distance to a segment
|
|
|
|
* @param aTransMat = the transform matrix
|
|
|
|
*/
|
2009-09-02 18:12:45 +00:00
|
|
|
virtual bool HitTest( wxPoint aPosRef, int aThreshold,
|
|
|
|
const int aTransMat[2][2] );
|
2009-06-30 17:57:27 +00:00
|
|
|
|
|
|
|
/** Function GetBoundingBox
|
|
|
|
* @return the boundary box for this, in library coordinates
|
|
|
|
*/
|
|
|
|
virtual EDA_Rect GetBoundingBox();
|
|
|
|
|
|
|
|
/** Function GetPenSize
|
|
|
|
* @return the size of the "pen" that be used to draw or plot this item
|
|
|
|
*/
|
|
|
|
virtual int GetPenSize( );
|
|
|
|
|
|
|
|
void Draw( WinEDA_DrawPanel * aPanel, wxDC * aDC, const wxPoint &aOffset,
|
2009-09-02 18:12:45 +00:00
|
|
|
int aColor, int aDrawMode, void* aData,
|
|
|
|
const int aTransformMatrix[2][2] );
|
2009-06-30 17:57:27 +00:00
|
|
|
|
|
|
|
virtual void DisplayInfo( WinEDA_DrawFrame* frame );
|
2009-09-02 18:12:45 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual LibEDA_BaseStruct* DoGenCopy();
|
2009-06-30 17:57:27 +00:00
|
|
|
};
|
2009-06-25 20:45:27 +00:00
|
|
|
|
2008-09-13 18:59:57 +00:00
|
|
|
#endif // CLASSES_BODY_ITEMS_H
|