Coding style and Doxygen comment fixes.

* Rename EDA_Rect class to EDA_RECT.
* Rename EDA_TextStruct class to EDA_TEXT.
* Remove duplicate Doxygen comments from sch_sheet_path.cpp.
This commit is contained in:
Wayne Stambaugh 2011-03-29 15:33:07 -04:00
parent e6c70dca8f
commit 67f70fe079
109 changed files with 492 additions and 569 deletions

View File

@ -1,7 +1,7 @@
/****************************************/
/* Basic classes for Kicad: */
/* EDA_ITEM */
/* EDA_TextStruct */
/* EDA_TEXT */
/****************************************/
#include "fctsys.h"
@ -180,9 +180,9 @@ std::ostream& EDA_ITEM::NestedSpace( int nestLevel, std::ostream& os )
/**************************************************/
/* EDA_TextStruct (basic class, not directly used */
/* EDA_TEXT (basic class, not directly used */
/**************************************************/
EDA_TextStruct::EDA_TextStruct( const wxString& text )
EDA_TEXT::EDA_TEXT( const wxString& text )
{
m_Size.x = m_Size.y = DEFAULT_SIZE_TEXT; // Width and height of font.
m_Orient = 0; // Rotation angle in 0.1 degrees.
@ -198,7 +198,7 @@ EDA_TextStruct::EDA_TextStruct( const wxString& text )
}
EDA_TextStruct::EDA_TextStruct( const EDA_TextStruct& aText )
EDA_TEXT::EDA_TEXT( const EDA_TEXT& aText )
{
m_Pos = aText.m_Pos;
m_Size = aText.m_Size;
@ -215,20 +215,20 @@ EDA_TextStruct::EDA_TextStruct( const EDA_TextStruct& aText )
}
EDA_TextStruct::~EDA_TextStruct()
EDA_TEXT::~EDA_TEXT()
{
}
int EDA_TextStruct::LenSize( const wxString& aLine ) const
int EDA_TEXT::LenSize( const wxString& aLine ) const
{
return ReturnGraphicTextWidth(aLine, m_Size.x, m_Italic, m_Bold ) + m_Thickness;
}
EDA_Rect EDA_TextStruct::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
EDA_RECT EDA_TEXT::GetTextBox( int aLine, int aThickness, bool aInvertY ) const
{
EDA_Rect rect;
EDA_RECT rect;
wxPoint pos;
wxArrayString* list = NULL;
wxString text = m_Text;
@ -322,9 +322,9 @@ EDA_Rect EDA_TextStruct::GetTextBox( int aLine, int aThickness, bool aInvertY )
}
bool EDA_TextStruct::TextHitTest( const wxPoint& aPoint, int aAccuracy ) const
bool EDA_TEXT::TextHitTest( const wxPoint& aPoint, int aAccuracy ) const
{
EDA_Rect rect = GetTextBox( -1 ); // Get the full text area.
EDA_RECT rect = GetTextBox( -1 ); // Get the full text area.
wxPoint location = aPoint;
rect.Inflate( aAccuracy );
@ -334,9 +334,9 @@ bool EDA_TextStruct::TextHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool EDA_TextStruct::TextHitTest( const EDA_Rect& aRect, bool aContains, int aAccuracy ) const
bool EDA_TEXT::TextHitTest( const EDA_RECT& aRect, bool aContains, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );
@ -347,7 +347,7 @@ bool EDA_TextStruct::TextHitTest( const EDA_Rect& aRect, bool aContains, int aAc
}
void EDA_TextStruct::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
void EDA_TEXT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
EDA_Colors aColor, int aDrawMode,
GRTraceMode aFillMode, EDA_Colors aAnchor_color )
{
@ -391,7 +391,7 @@ void EDA_TextStruct::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOf
}
void EDA_TextStruct::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
void EDA_TEXT::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
const wxPoint& aOffset, EDA_Colors aColor,
int aDrawMode, GRTraceMode aFillMode,
EDA_Colors aAnchor_color,
@ -435,7 +435,7 @@ void EDA_TextStruct::DrawOneLineOfText( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
m_HJustify, m_VJustify, width, m_Italic, m_Bold );
}
wxString EDA_TextStruct::GetTextStyleName()
wxString EDA_TEXT::GetTextStyleName()
{
int style = 0;
@ -457,10 +457,10 @@ wxString EDA_TextStruct::GetTextStyleName()
/******************/
/* Class EDA_Rect */
/* Class EDA_RECT */
/******************/
void EDA_Rect::Normalize()
void EDA_RECT::Normalize()
{
if( m_Size.y < 0 )
{
@ -476,13 +476,13 @@ void EDA_Rect::Normalize()
}
void EDA_Rect::Move( const wxPoint& aMoveVector )
void EDA_RECT::Move( const wxPoint& aMoveVector )
{
m_Pos += aMoveVector;
}
bool EDA_Rect::Contains( const wxPoint& aPoint ) const
bool EDA_RECT::Contains( const wxPoint& aPoint ) const
{
wxPoint rel_pos = aPoint - m_Pos;
wxSize size = m_Size;
@ -505,7 +505,7 @@ bool EDA_Rect::Contains( const wxPoint& aPoint ) const
/*
* return true if aRect is inside me (or on boundaries)
*/
bool EDA_Rect::Contains( const EDA_Rect& aRect ) const
bool EDA_RECT::Contains( const EDA_RECT& aRect ) const
{
return Contains( aRect.GetOrigin() ) && Contains( aRect.GetEnd() );
}
@ -515,12 +515,12 @@ bool EDA_Rect::Contains( const EDA_Rect& aRect ) const
* test for a common area between 2 rect.
* return true if at least a common point is found
*/
bool EDA_Rect::Intersects( const EDA_Rect& aRect ) const
bool EDA_RECT::Intersects( const EDA_RECT& aRect ) const
{
// this logic taken from wxWidgets' geometry.cpp file:
bool rc;
EDA_Rect me(*this);
EDA_Rect rect(aRect);
EDA_RECT me(*this);
EDA_RECT rect(aRect);
me.Normalize(); // ensure size is >= 0
rect.Normalize(); // ensure size is >= 0
@ -543,14 +543,14 @@ bool EDA_Rect::Intersects( const EDA_Rect& aRect ) const
}
EDA_Rect& EDA_Rect::Inflate( int aDelta )
EDA_RECT& EDA_RECT::Inflate( int aDelta )
{
Inflate( aDelta, aDelta );
return *this;
}
EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy )
EDA_RECT& EDA_RECT::Inflate( wxCoord dx, wxCoord dy )
{
if( m_Size.x >= 0 )
{
@ -618,10 +618,10 @@ EDA_Rect& EDA_Rect::Inflate( wxCoord dx, wxCoord dy )
}
void EDA_Rect::Merge( const EDA_Rect& aRect )
void EDA_RECT::Merge( const EDA_RECT& aRect )
{
Normalize(); // ensure width and height >= 0
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Normalize(); // ensure width and height >= 0
wxPoint end = GetEnd();
wxPoint rect_end = rect.GetEnd();
@ -635,7 +635,7 @@ void EDA_Rect::Merge( const EDA_Rect& aRect )
}
void EDA_Rect::Merge( const wxPoint& aPoint )
void EDA_RECT::Merge( const wxPoint& aPoint )
{
Normalize(); // ensure width and height >= 0
@ -649,7 +649,7 @@ void EDA_Rect::Merge( const wxPoint& aPoint )
}
double EDA_Rect::GetArea() const
double EDA_RECT::GetArea() const
{
return (double) GetWidth() * (double) GetHeight();
}

View File

@ -17,7 +17,7 @@
BLOCK_SELECTOR::BLOCK_SELECTOR() :
EDA_ITEM( BLOCK_LOCATE_STRUCT_TYPE ),
EDA_Rect()
EDA_RECT()
{
m_State = STATE_NO_BLOCK; /* State (enum BlockState) of block. */
m_Command = BLOCK_IDLE; /* Type (enum CmdBlockType) of operation. */

View File

@ -133,7 +133,7 @@ bool MARKER_BASE::HitTestMarker( const wxPoint& refPos ) const
}
EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const
EDA_RECT MARKER_BASE::GetBoundingBoxMarker() const
{
wxSize realsize = m_ShapeBoundingBox.GetSize();
wxPoint realposition = m_ShapeBoundingBox.GetPosition();
@ -142,7 +142,7 @@ EDA_Rect MARKER_BASE::GetBoundingBoxMarker() const
realposition.x *= m_ScalingFactor;
realposition.y *= m_ScalingFactor;
realposition += m_Pos;
return EDA_Rect( m_Pos, realsize );
return EDA_RECT( m_Pos, realsize );
}
void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode,

View File

@ -76,7 +76,7 @@ bool DrawPageOnClipboard( EDA_DRAW_FRAME* aFrame )
wxMetafileDC dc;
EDA_Rect tmp = aFrame->DrawPanel->m_ClipBox;
EDA_RECT tmp = aFrame->DrawPanel->m_ClipBox;
GRResetPenAndBrush( &dc );
const bool plotBlackAndWhite = false;
GRForceBlackPen( plotBlackAndWhite );

View File

@ -185,7 +185,7 @@ wxRealPoint EDA_DRAW_PANEL::GetGrid()
bool EDA_DRAW_PANEL::IsPointOnDisplay( const wxPoint& aPosition )
{
wxPoint pos;
EDA_Rect display_rect;
EDA_RECT display_rect;
INSTALL_UNBUFFERED_DC( dc, this ); // Refresh the clip box to the entire screen size.
SetClipBox( dc );
@ -200,7 +200,7 @@ bool EDA_DRAW_PANEL::IsPointOnDisplay( const wxPoint& aPosition )
}
void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_Rect& aRect, bool aEraseBackground )
void EDA_DRAW_PANEL::RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackground )
{
INSTALL_UNBUFFERED_DC( dc, this );
@ -418,7 +418,7 @@ void EDA_DRAW_PANEL::EraseScreen( wxDC* DC )
/* Set to one (1) to draw bounding box validate bounding box calculation. */
#if DEBUG_SHOW_CLIP_RECT
EDA_Rect bBox = m_ClipBox;
EDA_RECT bBox = m_ClipBox;
GRRect( NULL, DC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
#endif

View File

@ -153,7 +153,7 @@ int ReturnGraphicTextWidth( const wxString& aText, int aXSize, bool aItalic, boo
/* Helper function for drawing character polygons */
static void DrawGraphicTextPline(
EDA_Rect* aClipBox,
EDA_RECT* aClipBox,
wxDC* aDC,
EDA_Colors aColor,
int aWidth,
@ -247,7 +247,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
wxPoint overbar_pos; // Start point for the current overbar
int overbars; // Number of ~ seen
int overbar_italic_comp; // Italic compensation for overbar
EDA_Rect* clipBox; // Clip box used in basic draw functions
EDA_RECT* clipBox; // Clip box used in basic draw functions
clipBox = aPanel ? &aPanel->m_ClipBox : NULL;
#define BUF_SIZE 100

View File

@ -56,7 +56,7 @@ int g_DrawBgColor = WHITE;
#define USE_CLIP_FILLED_POLYGONS
#ifdef USE_CLIP_FILLED_POLYGONS
static void ClipAndDrawFilledPoly( EDA_Rect * ClipBox, wxDC * DC, wxPoint Points[], int n );
static void ClipAndDrawFilledPoly( EDA_RECT * ClipBox, wxDC * DC, wxPoint Points[], int n );
#endif
/* These functions are used by corresponding functions
@ -64,7 +64,7 @@ static void ClipAndDrawFilledPoly( EDA_Rect * ClipBox, wxDC * DC, wxPoint Points
* from user units to screen units(pixels coordinates)
*/
static void GRSMoveTo( int x, int y );
static void GRSRect( EDA_Rect* aClipBox, wxDC* aDC, int x1, int y1,
static void GRSRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1,
int x2, int y2, int aWidth, int aColor,
wxPenStyle aStyle = wxPENSTYLE_SOLID );
@ -99,7 +99,7 @@ static wxDC* s_DC_lastDC = NULL;
*
* @return - False if any part of the line lies within the rectangle.
*/
static bool clipLine( EDA_Rect* aClipBox, int& x1, int& y1, int& x2, int& y2 )
static bool clipLine( EDA_RECT* aClipBox, int& x1, int& y1, int& x2, int& y2 )
{
if( aClipBox->Contains( x1, y1 ) && aClipBox->Contains( x2, y2 ) )
return false;
@ -318,7 +318,7 @@ static bool clipLine( EDA_Rect* aClipBox, int& x1, int& y1, int& x2, int& y2 )
}
static void WinClipAndDrawLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
static void WinClipAndDrawLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int Color, int width = 1 )
{
GRLastMoveToX = x2;
@ -493,7 +493,7 @@ void GRSetDrawMode( wxDC* DC, int draw_mode )
}
void GRPutPixel( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int Color )
void GRPutPixel( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int Color )
{
if( ClipBox && !ClipBox->Contains( x, y ) )
return;
@ -506,7 +506,7 @@ void GRPutPixel( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int Color )
/*
* Draw a line, in object space.
*/
void GRLine( EDA_Rect* ClipBox,
void GRLine( EDA_RECT* ClipBox,
wxDC* DC,
int x1,
int y1,
@ -521,13 +521,13 @@ void GRLine( EDA_Rect* ClipBox,
}
void GRLine( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor )
void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor )
{
GRLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, aColor );
}
void GRDashedLineTo( EDA_Rect* ClipBox, wxDC* DC, int x2, int y2, int width, int Color )
void GRDashedLineTo( EDA_RECT* ClipBox, wxDC* DC, int x2, int y2, int width, int Color )
{
s_DC_lastcolor = -1;
GRSetColorPen( DC, Color, width, wxPENSTYLE_SHORT_DASH );
@ -539,7 +539,7 @@ void GRDashedLineTo( EDA_Rect* ClipBox, wxDC* DC, int x2, int y2, int width, int
}
void GRDashedLine( EDA_Rect* ClipBox,
void GRDashedLine( EDA_RECT* ClipBox,
wxDC* DC,
int x1,
int y1,
@ -571,7 +571,7 @@ void GRMoveTo( int x, int y )
/*
* Draw line to a new position, in object space.
*/
void GRLineTo( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int width, int Color )
void GRLineTo( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int width, int Color )
{
int GRLineToX, GRLineToY;
@ -582,7 +582,7 @@ void GRLineTo( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int width, int Color )
}
void GRMixedLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRMixedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color )
{
GRSetColorPen( DC, Color, width, wxPENSTYLE_DOT_DASH );
@ -611,7 +611,7 @@ void GRSMoveTo( int x, int y )
* @param aColor = an index into our color table of RGB colors.
* @see EDA_Colors and colors.h
*/
void GRLineArray( EDA_Rect* aClipBox, wxDC* aDC, std::vector<wxPoint>& aLines,
void GRLineArray( EDA_RECT* aClipBox, wxDC* aDC, std::vector<wxPoint>& aLines,
int aWidth, int aColor )
{
GRSetColorPen( aDC, aColor, aWidth );
@ -647,7 +647,7 @@ void GRLineArray( EDA_Rect* aClipBox, wxDC* aDC, std::vector<wxPoint>& aLines,
}
void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int aPenSize, int Color )
{
long radius;
@ -800,14 +800,14 @@ void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
}
void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color )
{
GRCSegm( ClipBox, DC, x1, y1, x2, y2, width, 0, Color );
}
void GRCSegm( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRCSegm( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
int aWidth, int aColor )
{
GRCSegm( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aWidth, 0, aColor );
@ -817,21 +817,21 @@ void GRCSegm( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
/*
* Draw segment (full) with rounded ends in object space (real coords.).
*/
void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRFillCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color )
{
WinClipAndDrawLine( ClipBox, DC, x1, y1, x2, y2, Color, width );
}
void GRFilledSegment( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRFilledSegment( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
int aWidth, int aColor )
{
WinClipAndDrawLine( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aColor, aWidth );
}
static bool IsGRSPolyDrawable( EDA_Rect* ClipBox, int n, wxPoint Points[] )
static bool IsGRSPolyDrawable( EDA_RECT* ClipBox, int n, wxPoint Points[] )
{
if( !ClipBox )
return true;
@ -873,7 +873,7 @@ static bool IsGRSPolyDrawable( EDA_Rect* ClipBox, int n, wxPoint Points[] )
/*
* Draw a new polyline and fill it if Fill, in screen space.
*/
static void GRSPoly( EDA_Rect* ClipBox,
static void GRSPoly( EDA_RECT* ClipBox,
wxDC* DC,
int n,
wxPoint Points[],
@ -919,7 +919,7 @@ static void GRSPoly( EDA_Rect* ClipBox,
/*
* Draw a new closed polyline and fill it if Fill, in screen space.
*/
static void GRSClosedPoly( EDA_Rect* ClipBox,
static void GRSClosedPoly( EDA_RECT* ClipBox,
wxDC* DC,
int aPointCount,
wxPoint aPoints[],
@ -967,7 +967,7 @@ static void GRSClosedPoly( EDA_Rect* ClipBox,
/*
* Draw a new polyline and fill it if Fill, in drawing space.
*/
void GRPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint Points[],
void GRPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
bool Fill, int width, int Color, int BgColor )
{
GRSPoly( ClipBox, DC, n, Points, Fill, width, Color, BgColor );
@ -977,21 +977,21 @@ void GRPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint Points[],
/*
* Draw a closed polyline and fill it if Fill, in object space.
*/
void GRClosedPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint Points[],
void GRClosedPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
bool Fill, int Color, int BgColor )
{
GRClosedPoly( ClipBox, DC, n, Points, Fill, 0, Color, BgColor );
}
void GRClosedPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint Points[],
void GRClosedPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[],
bool Fill, int width, int Color, int BgColor )
{
GRSClosedPoly( ClipBox, DC, n, Points, Fill, width, Color, BgColor );
}
void GRCircle( EDA_Rect* ClipBox, wxDC* DC, int xc, int yc, int r, int width, int Color )
void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int r, int width, int Color )
{
/* Clip circles off screen. */
if( ClipBox )
@ -1021,19 +1021,19 @@ void GRCircle( EDA_Rect* ClipBox, wxDC* DC, int xc, int yc, int r, int width, in
}
void GRCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r, int Color )
void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r, int Color )
{
GRCircle( ClipBox, DC, x, y, r, 0, Color );
}
void GRCircle( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aWidth, int aColor )
void GRCircle( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aWidth, int aColor )
{
GRCircle( aClipBox, aDC, aPos.x, aPos.y, aRadius, aWidth, aColor );
}
void GRFilledCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r,
void GRFilledCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r,
int width, int Color, int BgColor )
{
/* Clip circles off screen. */
@ -1060,7 +1060,7 @@ void GRFilledCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r,
}
void GRFilledCircle( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aColor )
void GRFilledCircle( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aColor )
{
GRFilledCircle( aClipBox, aDC, aPos.x, aPos.y, aRadius, 0, aColor, aColor );
}
@ -1069,7 +1069,7 @@ void GRFilledCircle( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, i
/*
* Draw an arc in user space.
*/
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int xc, int yc, int Color )
{
GRArc1( ClipBox, DC, x1, y1, x2, y2, xc, yc, 0, Color );
@ -1079,7 +1079,7 @@ void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
/*
* Draw an arc, width = width in user space.
*/
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int xc, int yc, int width, int Color )
{
/* Clip arcs off screen. */
@ -1107,7 +1107,7 @@ void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
}
void GRArc1( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRArc1( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
wxPoint aCenter, int aWidth, int aColor )
{
GRArc1( aClipBox, aDC, aStart.x, aStart.y, aEnd.x, aEnd.y, aCenter.x, aCenter.y,
@ -1118,7 +1118,7 @@ void GRArc1( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
/*
* Draw a filled arc in drawing space.
*/
void GRFilledArc( EDA_Rect* ClipBox,
void GRFilledArc( EDA_RECT* ClipBox,
wxDC* DC,
int x,
int y,
@ -1167,7 +1167,7 @@ void GRFilledArc( EDA_Rect* ClipBox,
}
void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y,
void GRFilledArc( EDA_RECT* ClipBox, wxDC* DC, int x, int y,
int StAngle, int EndAngle, int r, int Color, int BgColor )
{
GRFilledArc( ClipBox, DC, x, y, StAngle, EndAngle, r, 0, Color, BgColor );
@ -1177,7 +1177,7 @@ void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y,
/*
* Draw an arc in drawing space.
*/
void GRArc( EDA_Rect* ClipBox, wxDC* DC, int xc, int yc, int StAngle,
void GRArc( EDA_RECT* ClipBox, wxDC* DC, int xc, int yc, int StAngle,
int EndAngle, int r, int Color )
{
int x1, y1, x2, y2;
@ -1221,7 +1221,7 @@ void GRArc( EDA_Rect* ClipBox, wxDC* DC, int xc, int yc, int StAngle,
/*
* Draw an arc with width = width in drawing space.
*/
void GRArc( EDA_Rect* ClipBox,
void GRArc( EDA_RECT* ClipBox,
wxDC* DC,
int x,
int y,
@ -1272,13 +1272,13 @@ void GRArc( EDA_Rect* ClipBox,
/*
* Draw a rectangle in drawing space.
*/
void GRRect( EDA_Rect* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y2, int aColor )
void GRRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y2, int aColor )
{
GRSRect( aClipBox, aDC, x1, y1, x2, y2, 0, aColor );
}
void GRRectPs( EDA_Rect* aClipBox, wxDC* aDC, const EDA_Rect& aRect, int aColor, wxPenStyle aStyle )
void GRRectPs( EDA_RECT* aClipBox, wxDC* aDC, const EDA_RECT& aRect, int aColor, wxPenStyle aStyle )
{
int x1 = aRect.GetX();
int y1 = aRect.GetY();
@ -1292,13 +1292,13 @@ void GRRectPs( EDA_Rect* aClipBox, wxDC* aDC, const EDA_Rect& aRect, int aColor,
/*
* Draw a rectangle (thick lines) in drawing space.
*/
void GRRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color )
void GRRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color )
{
GRSRect( ClipBox, DC, x1, y1, x2, y2, width, Color );
}
void GRRect( EDA_Rect* aClipBox, wxDC* aDC, const EDA_Rect& aRect, int aWidth, int aColor )
void GRRect( EDA_RECT* aClipBox, wxDC* aDC, const EDA_RECT& aRect, int aWidth, int aColor )
{
int x1 = aRect.GetX();
int y1 = aRect.GetY();
@ -1312,7 +1312,7 @@ void GRRect( EDA_Rect* aClipBox, wxDC* aDC, const EDA_Rect& aRect, int aWidth, i
/*
* Draw a rectangle (filled with AreaColor) in drawing space.
*/
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int Color, int BgColor )
{
GRSFilledRect( ClipBox, DC, x1, y1, x2, y2, 0, Color, BgColor );
@ -1322,7 +1322,7 @@ void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
/*
* Draw a rectangle (filled with AreaColor) in drawing space.
*/
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color, int BgColor )
{
GRSFilledRect( ClipBox, DC, x1, y1, x2, y2, width, Color, BgColor );
@ -1333,7 +1333,7 @@ void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
* Draw a rectangle in screen space.
*/
void GRSRect( EDA_Rect* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y2,
void GRSRect( EDA_RECT* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y2,
int aWidth, int aColor, wxPenStyle aStyle )
{
if( x1 > x2 )
@ -1374,7 +1374,7 @@ void GRSRect( EDA_Rect* aClipBox, wxDC* aDC, int x1, int y1, int x2, int y2,
}
void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRSFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color, int BgColor )
{
if( x1 > x2 )
@ -1442,7 +1442,7 @@ void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
*/
#include "SutherlandHodgmanClipPoly.h"
void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPoints[], int n )
void ClipAndDrawFilledPoly( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPoints[], int n )
{
if( aClipBox == NULL )
{
@ -1480,7 +1480,7 @@ void ClipAndDrawFilledPoly( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPoints[], in
#endif
void GRBezier( EDA_Rect* ClipBox,
void GRBezier( EDA_RECT* ClipBox,
wxDC* DC,
int x1,
int y1,
@ -1496,7 +1496,7 @@ void GRBezier( EDA_Rect* ClipBox,
}
void GRBezier( EDA_Rect* ClipBox,
void GRBezier( EDA_RECT* ClipBox,
wxDC* DC,
int x1,
int y1,

View File

@ -60,7 +60,7 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer )
* selected area (Rect) in full window screen
* @param Rect = selected area to show after zooming
*/
void EDA_DRAW_FRAME::Window_Zoom( EDA_Rect& Rect )
void EDA_DRAW_FRAME::Window_Zoom( EDA_RECT& Rect )
{
double scalex, bestscale;
wxSize size;

View File

@ -377,7 +377,7 @@ void LIB_COMPONENT::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDc, const wxPoint& aOff
/* Enable this to draw the bounding box around the component to validate
* the bounding box calculations. */
#if 0
EDA_Rect bBox = GetBoundingBox( aMulti, aConvert );
EDA_RECT bBox = GetBoundingBox( aMulti, aConvert );
GRRect( &aPanel->m_ClipBox, aDc, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
#endif
@ -966,9 +966,9 @@ bool LIB_COMPONENT::LoadFootprints( FILE* aFile, char* aLine,
* if aConvert == 0 Convert is non used
* Invisible fields are not taken in account
**/
EDA_Rect LIB_COMPONENT::GetBoundingBox( int aUnit, int aConvert ) const
EDA_RECT LIB_COMPONENT::GetBoundingBox( int aUnit, int aConvert ) const
{
EDA_Rect bBox( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
EDA_RECT bBox( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
BOOST_FOREACH( const LIB_DRAW_ITEM& item, drawings )
{
@ -996,9 +996,9 @@ EDA_Rect LIB_COMPONENT::GetBoundingBox( int aUnit, int aConvert ) const
* if aConvert == 0 Convert is non used
* Fields are not take in account
**/
EDA_Rect LIB_COMPONENT::GetBodyBoundingBox( int aUnit, int aConvert ) const
EDA_RECT LIB_COMPONENT::GetBodyBoundingBox( int aUnit, int aConvert ) const
{
EDA_Rect bBox( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
EDA_RECT bBox( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
BOOST_FOREACH( const LIB_DRAW_ITEM& item, drawings )
{
@ -1220,7 +1220,7 @@ void LIB_COMPONENT::ClearStatus()
}
int LIB_COMPONENT::SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, bool aEditPinByPin )
int LIB_COMPONENT::SelectItems( EDA_RECT& aRect, int aUnit, int aConvert, bool aEditPinByPin )
{
int itemCount = 0;

View File

@ -242,7 +242,7 @@ public:
* if aConvert == 0 Convert is non used
* Invisible fields are not taken in account
**/
EDA_Rect GetBoundingBox( int aUnit, int aConvert ) const;
EDA_RECT GetBoundingBox( int aUnit, int aConvert ) const;
/**
* Function GetBodyBoundingBox
@ -253,7 +253,7 @@ public:
* if aConvert == 0 Convert is non used
* Fields are not taken in account
**/
EDA_Rect GetBodyBoundingBox( int aUnit, int aConvert ) const;
EDA_RECT GetBodyBoundingBox( int aUnit, int aConvert ) const;
bool SaveDateAndTime( FILE* aFile );
bool LoadDateAndTime( char* aLine );
@ -475,7 +475,7 @@ public:
* @return The number of draw objects found inside the block select
* rectangle.
*/
int SelectItems( EDA_Rect& aRect, int aUnit, int aConvert, bool aEditPinByPin );
int SelectItems( EDA_RECT& aRect, int aUnit, int aConvert, bool aEditPinByPin );
/**
* Clears all the draw items marked by a block select.

View File

@ -199,7 +199,7 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( EDA_DRAW_FRAME* frame,
float dpi = (float) frame->m_InternalUnits;
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
EDA_Rect tmp = panel->m_ClipBox;
EDA_RECT tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc );
GRForceBlackPen( aPrintBlackAndWhite );

View File

@ -308,7 +308,7 @@ void SCH_PRINTOUT::DrawPage( SCH_SCREEN* aScreen )
wxPoint tmp_startvisu;
wxSize SheetSize; // Page size in internal units
wxPoint old_org;
EDA_Rect oldClipBox;
EDA_RECT oldClipBox;
wxRect fitRect;
wxDC* dc = GetDC();
SCH_EDIT_FRAME* parent = m_Parent->GetParent();

View File

@ -261,7 +261,7 @@ void LIB_ARC::DoOffset( const wxPoint& aOffset )
}
bool LIB_ARC::DoTestInside( EDA_Rect& aRect ) const
bool LIB_ARC::DoTestInside( EDA_RECT& aRect ) const
{
return aRect.Contains( m_ArcStart.x, -m_ArcStart.y )
|| aRect.Contains( m_ArcEnd.x, -m_ArcEnd.y );
@ -325,7 +325,7 @@ int LIB_ARC::GetPenSize()
}
void LIB_ARC::drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor )
void LIB_ARC::drawEditGraphics( EDA_RECT* aClipBox, wxDC* aDC, int aColor )
{
// The edit indicators only get drawn when a new arc is being drawn.
if( !IsNew() )
@ -407,17 +407,17 @@ void LIB_ARC::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOf
/* Set to one (1) to draw bounding box around arc to validate bounding box
* calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
#endif
}
EDA_Rect LIB_ARC::GetBoundingBox() const
EDA_RECT LIB_ARC::GetBoundingBox() const
{
int minX, minY, maxX, maxY, angleStart, angleEnd;
EDA_Rect rect;
EDA_RECT rect;
wxPoint nullPoint, startPos, endPos, centerPos;
wxPoint normStart = m_ArcStart - m_Pos;
wxPoint normEnd = m_ArcEnd - m_Pos;
@ -477,7 +477,7 @@ start(%d, %d), end(%d, %d), radius %d" ),
void LIB_ARC::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{
wxString msg;
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
LIB_DRAW_ITEM::DisplayInfo( aFrame );

View File

@ -43,7 +43,7 @@ class LIB_ARC : public LIB_DRAW_ITEM
/**
* Draw the graphics when the arc is being edited.
*/
void drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor );
void drawEditGraphics( EDA_RECT* aClipBox, wxDC* aDC, int aColor );
/**
* Calculates the center, radius, and angles at \a aPosition when the arc is being edited.
@ -96,7 +96,7 @@ public:
*/
virtual bool HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM& aTransform );
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
virtual void DisplayInfo( EDA_DRAW_FRAME* frame );
/**
@ -133,7 +133,7 @@ protected:
*/
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_Pos; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -160,7 +160,7 @@ void LIB_BEZIER::DoOffset( const wxPoint& aOffset )
}
bool LIB_BEZIER::DoTestInside( EDA_Rect& aRect ) const
bool LIB_BEZIER::DoTestInside( EDA_RECT& aRect ) const
{
for( size_t i = 0; i < m_PolyPoints.size(); i++ )
{
@ -289,7 +289,7 @@ void LIB_BEZIER::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
/* Set to one (1) to draw bounding box around bezier curve to validate
* bounding box calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
bBox.Inflate( m_Thickness + 1, m_Thickness + 1 );
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
@ -340,9 +340,9 @@ bool LIB_BEZIER::HitTest( wxPoint aPosRef, int aThreshold, const TRANSFORM& aTra
* Function GetBoundingBox
* @return the boundary box for this, in library coordinates
*/
EDA_Rect LIB_BEZIER::GetBoundingBox() const
EDA_RECT LIB_BEZIER::GetBoundingBox() const
{
EDA_Rect rect;
EDA_RECT rect;
int xmin, xmax, ymin, ymax;
if( !GetCornerCount() )
@ -370,7 +370,7 @@ EDA_Rect LIB_BEZIER::GetBoundingBox() const
void LIB_BEZIER::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{
wxString msg;
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
LIB_DRAW_ITEM::DisplayInfo( aFrame );

View File

@ -67,7 +67,7 @@ public:
/**
* @return the boundary box for this, in library coordinates
*/
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
/**
* @return the size of the "pen" that be used to draw or plot this item
@ -89,7 +89,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_PolyPoints[0]; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -146,7 +146,7 @@ void LIB_CIRCLE::DoOffset( const wxPoint& aOffset )
}
bool LIB_CIRCLE::DoTestInside( EDA_Rect& aRect ) const
bool LIB_CIRCLE::DoTestInside( EDA_RECT& aRect ) const
{
/*
* FIXME: This fails to take into account the radius around the center
@ -231,16 +231,16 @@ void LIB_CIRCLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint&
/* Set to one (1) to draw bounding box around circle to validate bounding
* box calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
#endif
}
EDA_Rect LIB_CIRCLE::GetBoundingBox() const
EDA_RECT LIB_CIRCLE::GetBoundingBox() const
{
EDA_Rect rect;
EDA_RECT rect;
rect.SetOrigin( m_Pos.x - m_Radius, ( m_Pos.y - m_Radius ) * -1 );
rect.SetEnd( m_Pos.x + m_Radius, ( m_Pos.y + m_Radius ) * -1 );
@ -253,7 +253,7 @@ EDA_Rect LIB_CIRCLE::GetBoundingBox() const
void LIB_CIRCLE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{
wxString msg;
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
LIB_DRAW_ITEM::DisplayInfo( aFrame );

View File

@ -69,7 +69,7 @@ public:
*/
virtual int GetPenSize( );
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
/**
@ -101,7 +101,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_Pos; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -66,7 +66,7 @@ class LIB_DRAW_ITEM : public EDA_ITEM
* @param aDC - The device context to draw on.
* @param aColor - The index of the color to draw.
*/
virtual void drawEditGraphics( EDA_Rect* aClipBox, wxDC* aDC, int aColor ) {}
virtual void drawEditGraphics( EDA_RECT* aClipBox, wxDC* aDC, int aColor ) {}
/**
* Calculates the attributes of an item at \a aPosition when it is being edited.
@ -226,7 +226,7 @@ public:
/**
* @return the boundary box for this, in library coordinates
*/
virtual EDA_Rect GetBoundingBox() const { return EDA_ITEM::GetBoundingBox(); }
virtual EDA_RECT GetBoundingBox() const { return EDA_ITEM::GetBoundingBox(); }
/**
* Displays basic info (type, part and convert) about item
@ -281,7 +281,7 @@ public:
* @param aRect - Rectangle to check against.
* @return - True if object is inside rectangle.
*/
bool Inside( EDA_Rect& aRect ) const { return DoTestInside( aRect ); }
bool Inside( EDA_RECT& aRect ) const { return DoTestInside( aRect ); }
/**
* Move a draw object to a new \a aPosition.
@ -384,7 +384,7 @@ protected:
*/
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const = 0;
virtual void DoOffset( const wxPoint& aOffset ) = 0;
virtual bool DoTestInside( EDA_Rect& aRect ) const = 0;
virtual bool DoTestInside( EDA_RECT& aRect ) const = 0;
virtual void DoMove( const wxPoint& aPosition ) = 0;
virtual wxPoint DoGetPosition() const = 0;
virtual void DoMirrorHorizontal( const wxPoint& aCenter ) = 0;

View File

@ -328,7 +328,7 @@ void LIB_FIELD::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a
#if 0
wxString tmp = m_Text;
m_Text = *text;
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
m_Text = tmp;
bBox.Inflate( 1, 1 );
GRRect( &aPanel->m_ClipBox, aDC, bBox, 0, LIGHTMAGENTA );
@ -453,7 +453,7 @@ void LIB_FIELD::DoOffset( const wxPoint& offset )
}
bool LIB_FIELD::DoTestInside( EDA_Rect& rect ) const
bool LIB_FIELD::DoTestInside( EDA_RECT& rect ) const
{
/*
* FIXME: This fails to take into acount the size and/or orientation of
@ -504,9 +504,9 @@ wxString LIB_FIELD::GetFullText( int unit )
}
EDA_Rect LIB_FIELD::GetBoundingBox() const
EDA_RECT LIB_FIELD::GetBoundingBox() const
{
EDA_Rect rect = GetTextBox();
EDA_RECT rect = GetTextBox();
rect.m_Pos.y *= -1;
rect.m_Pos.y -= rect.GetHeight();

View File

@ -15,7 +15,7 @@
* the component property editor assumes it.
* @see enum NumFieldType
*/
class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TextStruct
class LIB_FIELD : public LIB_DRAW_ITEM, public EDA_TEXT
{
int m_id; ///< @see enum NumFieldType
wxString m_name; ///< Name (not the field text value itself, that is .m_Text)
@ -131,7 +131,7 @@ public:
* Return the bounding rectangle of the field text.
* @return Bounding rectangle.
*/
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
/**
* Displays info (type, part convert filed name and value)
@ -237,7 +237,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& other ) const;
virtual void DoOffset( const wxPoint& offset );
virtual bool DoTestInside( EDA_Rect& rect ) const;
virtual bool DoTestInside( EDA_RECT& rect ) const;
virtual void DoMove( const wxPoint& newPosition );
virtual wxPoint DoGetPosition( void ) const { return m_Pos; }
virtual void DoMirrorHorizontal( const wxPoint& center );

View File

@ -831,7 +831,7 @@ void LIB_PIN::drawGraphic( EDA_DRAW_PANEL* aPanel,
/* Set to one (1) to draw bounding box around pin to validate bounding
* box calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
bBox.Inflate( 5, 5 );
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
@ -1652,7 +1652,7 @@ void LIB_PIN::DoOffset( const wxPoint& offset )
}
bool LIB_PIN::DoTestInside( EDA_Rect& rect ) const
bool LIB_PIN::DoTestInside( EDA_RECT& rect ) const
{
wxPoint end = ReturnPinEndPoint();
@ -1755,13 +1755,13 @@ void LIB_PIN::DisplayInfo( EDA_DRAW_FRAME* frame )
* Function GetBoundingBox
* @return the boundary box for this, in schematic coordinates
*/
EDA_Rect LIB_PIN::GetBoundingBox() const
EDA_RECT LIB_PIN::GetBoundingBox() const
{
wxPoint pt = m_position;
pt.y *= -1; // Reverse the Y axis, according to the schematic orientation
return EDA_Rect( pt, wxSize( 1, 1 ) );
return EDA_RECT( pt, wxSize( 1, 1 ) );
}

View File

@ -159,7 +159,7 @@ public:
virtual void DisplayInfo( EDA_DRAW_FRAME* frame );
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
wxPoint ReturnPinEndPoint() const;
@ -468,7 +468,7 @@ protected:
*/
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_position; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -158,7 +158,7 @@ void LIB_POLYLINE::DoOffset( const wxPoint& aOffset )
}
bool LIB_POLYLINE::DoTestInside( EDA_Rect& aRect ) const
bool LIB_POLYLINE::DoTestInside( EDA_RECT& aRect ) const
{
for( size_t i = 0; i < m_PolyPoints.size(); i++ )
{
@ -305,7 +305,7 @@ void LIB_POLYLINE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint
/* Set to one (1) to draw bounding box around polyline to validate
* bounding box calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
bBox.Inflate( m_Thickness + 1, m_Thickness + 1 );
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
@ -345,9 +345,9 @@ bool LIB_POLYLINE::HitTest( wxPoint aPosition, int aThreshold, const TRANSFORM&
* Function GetBoundingBox
* @return the boundary box for this, in library coordinates
*/
EDA_Rect LIB_POLYLINE::GetBoundingBox() const
EDA_RECT LIB_POLYLINE::GetBoundingBox() const
{
EDA_Rect rect;
EDA_RECT rect;
int xmin, xmax, ymin, ymax;
xmin = xmax = m_PolyPoints[0].x;
@ -388,7 +388,7 @@ void LIB_POLYLINE::DeleteSegment( const wxPoint aPosition )
void LIB_POLYLINE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
{
wxString msg;
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
LIB_DRAW_ITEM::DisplayInfo( aFrame );

View File

@ -81,7 +81,7 @@ public:
/**
* @return the boundary box for this, in library coordinates
*/
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
/**
* @return the size of the "pen" that be used to draw or plot this item
@ -118,7 +118,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_PolyPoints[0]; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -117,7 +117,7 @@ void LIB_RECTANGLE::DoOffset( const wxPoint& aOffset )
}
bool LIB_RECTANGLE::DoTestInside( EDA_Rect& aRect ) const
bool LIB_RECTANGLE::DoTestInside( EDA_RECT& aRect ) const
{
return aRect.Contains( m_Pos.x, -m_Pos.y ) || aRect.Contains( m_End.x, -m_End.y );
}
@ -209,7 +209,7 @@ void LIB_RECTANGLE::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
/* Set to one (1) to draw bounding box around rectangle to validate
* bounding box calculation. */
#if 0
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
bBox.Inflate( m_Thickness + 1, m_Thickness + 1 );
GRRect( &aPanel->m_ClipBox, aDC, bBox.GetOrigin().x, bBox.GetOrigin().y,
bBox.GetEnd().x, bBox.GetEnd().y, 0, LIGHTMAGENTA );
@ -229,9 +229,9 @@ void LIB_RECTANGLE::DisplayInfo( EDA_DRAW_FRAME* aFrame )
}
EDA_Rect LIB_RECTANGLE::GetBoundingBox() const
EDA_RECT LIB_RECTANGLE::GetBoundingBox() const
{
EDA_Rect rect;
EDA_RECT rect;
rect.SetOrigin( m_Pos.x, m_Pos.y * -1 );
rect.SetEnd( m_End.x, m_End.y * -1 );

View File

@ -74,7 +74,7 @@ public:
*/
virtual int GetPenSize( );
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
@ -108,7 +108,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_Pos; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -26,7 +26,7 @@
LIB_TEXT::LIB_TEXT(LIB_COMPONENT * aParent) :
LIB_DRAW_ITEM( LIB_TEXT_T, aParent ),
EDA_TextStruct()
EDA_TEXT()
{
m_Size = wxSize( 50, 50 );
m_typeName = _( "Text" );
@ -217,7 +217,7 @@ void LIB_TEXT::DoOffset( const wxPoint& offset )
}
bool LIB_TEXT::DoTestInside( EDA_Rect& rect ) const
bool LIB_TEXT::DoTestInside( EDA_RECT& rect ) const
{
/*
* FIXME: This should calculate the text size and justification and
@ -321,7 +321,7 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
* so the more easily way is to use no justifications ( Centered text )
* and use GetBoundaryBox to know the text coordinate considered as centered
*/
EDA_Rect bBox = GetBoundingBox();
EDA_RECT bBox = GetBoundingBox();
pos1 = bBox.Centre(); // this is the coordinates of the graphic text relative to the
// component position in schematic Y axis orientation.
@ -339,7 +339,7 @@ void LIB_TEXT::drawGraphic( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aO
* the bounding box calculations.
*/
#if 0
EDA_Rect grBox;
EDA_RECT grBox;
bBox.SetY( -bBox.GetY() );
bBox.SetHeight( -bBox.GetHeight());
grBox.SetOrigin( aTransform.TransformCoordinate( bBox.GetOrigin() ) );
@ -366,12 +366,12 @@ void LIB_TEXT::DisplayInfo( EDA_DRAW_FRAME* frame )
/**
* @return the boundary box for this, in schematic coordinates
*/
EDA_Rect LIB_TEXT::GetBoundingBox() const
EDA_RECT LIB_TEXT::GetBoundingBox() const
{
/* Y coordinates for LIB_ITEMS are bottom to top, so we must invert the Y position when
* calling GetTextBox() that works using top to bottom Y axis orientation.
*/
EDA_Rect rect = GetTextBox( -1, -1, true );
EDA_RECT rect = GetTextBox( -1, -1, true );
wxPoint orig = rect.GetOrigin();
wxPoint end = rect.GetEnd();

View File

@ -12,7 +12,7 @@
/* Fields like Ref , value... are not Text, */
/* they are a separate class */
/*********************************************/
class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TextStruct
class LIB_TEXT : public LIB_DRAW_ITEM, public EDA_TEXT
{
wxString m_savedText; ///< Temporary storage for the string when edition.
bool m_rotate; ///< Flag to indicate a rotation occurred while editing.
@ -83,10 +83,10 @@ public:
*
* For now, an ending point must be inside this rect.
*
* @param aRect - the given EDA_Rect
* @param aRect - the given EDA_RECT
* @return - true if a hit, else false
*/
virtual bool HitTest( EDA_Rect& aRect )
virtual bool HitTest( EDA_RECT& aRect )
{
return TextHitTest( aRect );
}
@ -98,7 +98,7 @@ public:
virtual void DisplayInfo( EDA_DRAW_FRAME* aFrame );
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
void Rotate();
@ -133,7 +133,7 @@ protected:
virtual int DoCompare( const LIB_DRAW_ITEM& aOther ) const;
virtual void DoOffset( const wxPoint& aOffset );
virtual bool DoTestInside( EDA_Rect& aRect ) const;
virtual bool DoTestInside( EDA_RECT& aRect ) const;
virtual void DoMove( const wxPoint& aPosition );
virtual wxPoint DoGetPosition() const { return m_Pos; }
virtual void DoMirrorHorizontal( const wxPoint& aCenter );

View File

@ -346,7 +346,7 @@ int LIB_EDIT_FRAME::BestZoom()
{
int dx, dy, ii, jj;
wxSize size;
EDA_Rect BoundaryBox;
EDA_RECT BoundaryBox;
if( m_component )
{

View File

@ -112,7 +112,7 @@ static void PlotTextField( PLOTTER* plotter, SCH_COMPONENT* DrawLibItem,
* so the more easily way is to use no justifications ( Centered text )
* and use GetBoundaryBox to know the text coordinate considered as centered
*/
EDA_Rect BoundaryBox = field->GetBoundingBox();
EDA_RECT BoundaryBox = field->GetBoundingBox();
GRTextHorizJustifyType hjustify = GR_TEXT_HJUSTIFY_CENTER;
GRTextVertJustifyType vjustify = GR_TEXT_VJUSTIFY_CENTER;
wxPoint textpos = BoundaryBox.Centre();

View File

@ -119,9 +119,9 @@ bool SCH_BUS_ENTRY::Load( LINE_READER& aLine, wxString& aErrorMsg )
}
EDA_Rect SCH_BUS_ENTRY::GetBoundingBox() const
EDA_RECT SCH_BUS_ENTRY::GetBoundingBox() const
{
EDA_Rect box;
EDA_RECT box;
box.SetOrigin( m_Pos );
box.SetEnd( m_End() );
@ -239,9 +239,9 @@ bool SCH_BUS_ENTRY::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_BUS_ENTRY::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_BUS_ENTRY::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -70,7 +70,7 @@ public:
* schematic coordinate system. It is OK to overestimate the size
* by a few counts.
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function GetPenSize
@ -113,7 +113,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -278,7 +278,7 @@ void SCH_COMPONENT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset
#if 0
/* Draw the component boundary box */
{
EDA_Rect BoundaryBox;
EDA_RECT BoundaryBox;
BoundaryBox = GetBoundingBox();
GRRect( &panel->m_ClipBox, DC, BoundaryBox, 0, BROWN );
#if 1
@ -1326,10 +1326,10 @@ bool SCH_COMPONENT::Load( LINE_READER& aLine, wxString& aErrorMsg )
}
EDA_Rect SCH_COMPONENT::GetBodyBoundingBox() const
EDA_RECT SCH_COMPONENT::GetBodyBoundingBox() const
{
LIB_COMPONENT* Entry = CMP_LIBRARY::FindLibraryComponent( m_ChipName );
EDA_Rect bBox;
EDA_RECT bBox;
int x0, xm, y0, ym;
if( Entry == NULL )
@ -1373,7 +1373,7 @@ EDA_Rect SCH_COMPONENT::GetBodyBoundingBox() const
}
EDA_Rect SCH_COMPONENT::GetBoundingBox() const
EDA_RECT SCH_COMPONENT::GetBoundingBox() const
{
return GetBodyBoundingBox();
}
@ -1579,7 +1579,7 @@ bool SCH_COMPONENT::IsSelectStateChanged( const wxRect& aRect )
{
bool previousState = IsSelected();
EDA_Rect boundingBox = GetBoundingBox();
EDA_RECT boundingBox = GetBoundingBox();
if( aRect.Intersects( boundingBox ) )
m_Flags |= SELECTED;
@ -1693,7 +1693,7 @@ bool SCH_COMPONENT::operator <( const SCH_ITEM& aItem ) const
SCH_COMPONENT* component = (SCH_COMPONENT*) &aItem;
EDA_Rect rect = GetBodyBoundingBox();
EDA_RECT rect = GetBodyBoundingBox();
if( rect.GetArea() != component->GetBodyBoundingBox().GetArea() )
return rect.GetArea() < component->GetBodyBoundingBox().GetArea();
@ -1710,7 +1710,7 @@ bool SCH_COMPONENT::operator <( const SCH_ITEM& aItem ) const
bool SCH_COMPONENT::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
{
EDA_Rect bBox = GetBodyBoundingBox();
EDA_RECT bBox = GetBodyBoundingBox();
bBox.Inflate( aAccuracy );
if( bBox.Contains( aPoint ) )
@ -1720,9 +1720,9 @@ bool SCH_COMPONENT::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_COMPONENT::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_COMPONENT::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -56,7 +56,7 @@ private:
void Init( const wxPoint& pos = wxPoint( 0, 0 ) );
EDA_Rect GetBodyBoundingBox() const;
EDA_RECT GetBodyBoundingBox() const;
public:
SCH_COMPONENT( const wxPoint& pos = wxPoint( 0, 0 ), SCH_ITEM* aParent = NULL );
@ -189,7 +189,7 @@ public:
* few counts.
* @return The bounding rectangle of the component.
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
//-----<Fields>-----------------------------------------------------------
@ -380,7 +380,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual bool doIsConnected( const wxPoint& aPosition ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -31,7 +31,7 @@
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent, wxString aName ) :
SCH_ITEM( aParent, SCH_FIELD_T ),
EDA_TextStruct()
EDA_TEXT()
{
m_Pos = aPos;
m_FieldId = aFieldId;
@ -45,7 +45,7 @@ SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent,
SCH_FIELD::SCH_FIELD( const SCH_FIELD& aField ) :
SCH_ITEM( aField ),
EDA_TextStruct( aField )
EDA_TEXT( aField )
{
m_FieldId = aField.m_FieldId;
m_Name = aField.m_Name;
@ -131,7 +131,7 @@ void SCH_FIELD::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
* so the more easily way is to use no justifications ( Centered text )
* and use GetBoundaryBox to know the text coordinate considered as centered
*/
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
GRTextHorizJustifyType hjustify = GR_TEXT_HJUSTIFY_CENTER;
GRTextVertJustifyType vjustify = GR_TEXT_VJUSTIFY_CENTER;
textpos = BoundaryBox.Centre();
@ -218,9 +218,9 @@ void SCH_FIELD::SwapData( SCH_FIELD* aField )
}
EDA_Rect SCH_FIELD::GetBoundingBox() const
EDA_RECT SCH_FIELD::GetBoundingBox() const
{
EDA_Rect BoundaryBox;
EDA_RECT BoundaryBox;
int hjustify, vjustify;
int orient;
wxSize size;
@ -429,7 +429,7 @@ bool SCH_FIELD::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
if( match )
{
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
if( aFindLocation )
*aFindLocation = GetBoundingBox().Centre();
@ -486,7 +486,7 @@ bool SCH_FIELD::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
if( !IsVisible() || IsVoid() )
return false;
EDA_Rect rect = GetBoundingBox();
EDA_RECT rect = GetBoundingBox();
rect.Inflate( aAccuracy );
@ -494,13 +494,13 @@ bool SCH_FIELD::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_FIELD::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_FIELD::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
// Do not hit test hidden fields.
if( !IsVisible() || IsVoid() )
return false;
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -27,7 +27,7 @@ class LIB_FIELD;
* <li>Fields 4 and higher are user defineable.</li></ul>
*/
class SCH_FIELD : public SCH_ITEM, public EDA_TextStruct
class SCH_FIELD : public SCH_ITEM, public EDA_TEXT
{
public:
int m_FieldId; ///< Field index, @see enum NumFieldType
@ -62,7 +62,7 @@ public:
void Place( SCH_EDIT_FRAME* frame, wxDC* DC );
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function IsVoid
@ -179,7 +179,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -89,9 +89,9 @@ bool SCH_JUNCTION::Load( LINE_READER& aLine, wxString& aErrorMsg )
}
EDA_Rect SCH_JUNCTION::GetBoundingBox() const
EDA_RECT SCH_JUNCTION::GetBoundingBox() const
{
EDA_Rect rect;
EDA_RECT rect;
rect.SetOrigin( m_Pos );
rect.Inflate( ( GetPenSize() + m_Size.x ) / 2 );
@ -179,7 +179,7 @@ void SCH_JUNCTION::Show( int nestLevel, std::ostream& os )
bool SCH_JUNCTION::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
{
EDA_Rect rect = GetBoundingBox();
EDA_RECT rect = GetBoundingBox();
rect.Inflate( aAccuracy );
@ -187,9 +187,9 @@ bool SCH_JUNCTION::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_JUNCTION::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_JUNCTION::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -36,7 +36,7 @@ public:
* schematic coordinate system. It is OK to overestimate the size
* by a few counts.
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
SCH_JUNCTION* GenCopy();
@ -101,7 +101,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual bool doIsConnected( const wxPoint& aPosition ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -91,7 +91,7 @@ void SCH_LINE::Show( int nestLevel, std::ostream& os ) const
#endif
EDA_Rect SCH_LINE::GetBoundingBox() const
EDA_RECT SCH_LINE::GetBoundingBox() const
{
int width = 25;
@ -102,7 +102,7 @@ EDA_Rect SCH_LINE::GetBoundingBox() const
int ymax = MAX( m_Start.y, m_End.y ) + width;
// return a rectangle which is [pos,dim) in nature. therefore the +1
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
EDA_RECT ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
return ret;
}
@ -490,9 +490,9 @@ bool SCH_LINE::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_LINE::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_LINE::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -52,7 +52,7 @@ public:
* 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() const;
EDA_RECT GetBoundingBox() const;
/**
* Function GetLength
@ -145,7 +145,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual bool doIsConnected( const wxPoint& aPosition ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -141,7 +141,7 @@ bool SCH_MARKER::Matches( wxFindReplaceData& aSearchData, wxPoint * aFindLocatio
* 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 SCH_MARKER::GetBoundingBox() const
EDA_RECT SCH_MARKER::GetBoundingBox() const
{
return GetBoundingBoxMarker();
}

View File

@ -57,7 +57,7 @@ public:
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
// Geometric transforms (used in block operations):

View File

@ -39,10 +39,10 @@ EDA_ITEM* SCH_NO_CONNECT::doClone() const
}
EDA_Rect SCH_NO_CONNECT::GetBoundingBox() const
EDA_RECT SCH_NO_CONNECT::GetBoundingBox() const
{
int delta = ( GetPenSize() + m_Size.x ) / 2;
EDA_Rect box;
EDA_RECT box;
box.SetOrigin( m_Pos );
box.Inflate( delta );
@ -170,9 +170,9 @@ bool SCH_NO_CONNECT::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_NO_CONNECT::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_NO_CONNECT::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -64,7 +64,7 @@ public:
* schematic coordinate system. It is OK to overestimate the size
* by a few counts.
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
// Geometric transforms (used in block operations):
@ -101,7 +101,7 @@ public:
private:
virtual bool doIsConnected( const wxPoint& aPosition ) const;
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -256,9 +256,9 @@ bool SCH_POLYLINE::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_POLYLINE::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_POLYLINE::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -100,7 +100,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -802,7 +802,7 @@ void SCH_SCREEN::addConnectedItemsToBlock( const wxPoint& position )
int SCH_SCREEN::UpdatePickList()
{
ITEM_PICKER picker;
EDA_Rect area;
EDA_RECT area;
area.SetOrigin( m_BlockLocate.GetOrigin());
area.SetSize( m_BlockLocate.GetSize() );
area.Normalize();

View File

@ -593,7 +593,7 @@ void SCH_SHEET::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC,
}
EDA_Rect SCH_SHEET::GetBoundingBox() const
EDA_RECT SCH_SHEET::GetBoundingBox() const
{
int dx, dy;
@ -607,7 +607,7 @@ EDA_Rect SCH_SHEET::GetBoundingBox() const
dx = MAX( m_Size.x, textlen1 );
dy = m_Size.y + m_SheetNameSize + m_FileNameSize + 16;
EDA_Rect box( wxPoint( m_Pos.x, m_Pos.y - m_SheetNameSize - 8 ), wxSize( dx, dy ) );
EDA_RECT box( wxPoint( m_Pos.x, m_Pos.y - m_SheetNameSize - 8 ), wxSize( dx, dy ) );
return box;
}
@ -935,7 +935,7 @@ bool SCH_SHEET::IsSelectStateChanged( const wxRect& aRect )
{
bool previousState = IsSelected();
EDA_Rect boundingBox = GetBoundingBox();
EDA_RECT boundingBox = GetBoundingBox();
if( aRect.Intersects( boundingBox ) )
m_Flags |= SELECTED;
@ -991,7 +991,7 @@ wxString SCH_SHEET::GetSelectMenuText() const
bool SCH_SHEET::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
{
EDA_Rect rect = GetBoundingBox();
EDA_RECT rect = GetBoundingBox();
rect.Inflate( aAccuracy );
@ -999,9 +999,9 @@ bool SCH_SHEET::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_SHEET::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_SHEET::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
EDA_Rect rect = aRect;
EDA_RECT rect = aRect;
rect.Inflate( aAccuracy );

View File

@ -369,9 +369,9 @@ public:
/**
* Function GetBoundingBox
* @return an EDA_Rect giving the bounding box of the sheet
* @return an EDA_RECT giving the bounding box of the sheet
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
void SwapData( SCH_SHEET* copyitem );
@ -541,7 +541,7 @@ protected:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};

View File

@ -25,10 +25,6 @@
#include "dialogs/dialog_schematic_find.h"
/**********************************************/
/* class to handle a series of sheets *********/
/* a 'path' so to speak.. *********************/
/**********************************************/
SCH_SHEET_PATH::SCH_SHEET_PATH()
{
for( int i = 0; i<DSLSZ; i++ )
@ -38,13 +34,6 @@ SCH_SHEET_PATH::SCH_SHEET_PATH()
}
/**
* Function BuildSheetPathInfoFromSheetPathValue
* Fill this with data to access to the hierarchical sheet known by its path
* aPath
* @param aPath = path of the sheet to reach (in non human readable format)
* @return true if success else false
*/
bool SCH_SHEET_PATH::BuildSheetPathInfoFromSheetPathValue( const wxString& aPath, bool aFound )
{
if( aFound )
@ -80,12 +69,6 @@ bool SCH_SHEET_PATH::BuildSheetPathInfoFromSheetPathValue( const wxString& aPath
}
/**
* Function Cmp
* Compare if this is the same sheet path as aSheetPathToTest
* @param aSheetPathToTest = sheet path to compare
* @return -1 if different, 0 if same
*/
int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const
{
if( m_numSheets > aSheetPathToTest.m_numSheets )
@ -108,11 +91,6 @@ int SCH_SHEET_PATH::Cmp( const SCH_SHEET_PATH& aSheetPathToTest ) const
}
/**
* Function Last
* returns a pointer to the last sheet of the list
* One can see the others sheet as the "path" to reach this last sheet
*/
SCH_SHEET* SCH_SHEET_PATH::Last()
{
if( m_numSheets )
@ -122,10 +100,6 @@ SCH_SHEET* SCH_SHEET_PATH::Last()
}
/**
* Function LastScreen
* @return the SCH_SCREEN relative to the last sheet in list
*/
SCH_SCREEN* SCH_SHEET_PATH::LastScreen()
{
SCH_SHEET* lastSheet = Last();
@ -137,11 +111,6 @@ SCH_SCREEN* SCH_SHEET_PATH::LastScreen()
}
/**
* Function LastScreen
* @return a pointer to the first schematic item handled by the
* SCH_SCREEN relative to the last sheet in list
*/
SCH_ITEM* SCH_SHEET_PATH::LastDrawList()
{
SCH_SHEET* lastSheet = Last();
@ -178,26 +147,15 @@ SCH_ITEM* SCH_SHEET_PATH::FirstDrawList()
void SCH_SHEET_PATH::Push( SCH_SHEET* aSheet )
{
if( m_numSheets > DSLSZ )
{
wxString msg;
msg.Printf( _( "Schematic sheets can only be nested %d levels deep." ), DSLSZ );
wxMessageBox( msg );
}
wxCHECK_RET( m_numSheets < DSLSZ,
wxString::Format( _( "Schematic sheets can only be nested %d levels deep." ),
DSLSZ ) );
if( m_numSheets < DSLSZ )
{
m_sheets[m_numSheets] = aSheet;
m_sheets[ m_numSheets ] = aSheet;
m_numSheets++;
}
}
/**
* Function Pop
* retrieves (pop) the last entered sheet and remove it from list
* @return a SCH_SHEET* pointer to the removed sheet in list
*/
SCH_SHEET* SCH_SHEET_PATH::Pop()
{
if( m_numSheets > 0 )
@ -210,12 +168,6 @@ SCH_SHEET* SCH_SHEET_PATH::Pop()
}
/**
* Function Path
* the path uses the time stamps which do not changes even when editing sheet
* parameters
* a path is something like / (root) or /34005677 or /34005677/00AE4523
*/
wxString SCH_SHEET_PATH::Path()
{
wxString s, t;
@ -235,13 +187,6 @@ wxString SCH_SHEET_PATH::Path()
}
/**
* Function PathHumanReadable
* Return the sheet path in a readable form, i.e.
* as a path made from sheet names.
* (the "normal" path uses the time stamps which do not changes even when
* editing sheet parameters)
*/
wxString SCH_SHEET_PATH::PathHumanReadable() const
{
wxString s, t;
@ -313,16 +258,18 @@ void SCH_SHEET_PATH::AnnotatePowerSymbols( int* aReference )
}
void SCH_SHEET_PATH::GetComponents( SCH_REFERENCE_LIST& aReferences,
bool aIncludePowerSymbols )
void SCH_SHEET_PATH::GetComponents( SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols )
{
// Search to sheet path number:
int sheetnumber = 1; // 1 = root
SCH_SHEET_LIST sheetList;
for( SCH_SHEET_PATH* path = sheetList.GetFirst(); path != NULL;
path = sheetList.GetNext(), sheetnumber++ )
{
if( Cmp(*path) == 0 )
break;
}
for( SCH_ITEM* item = LastDrawList(); item != NULL; item = item->Next() )
{
@ -416,7 +363,7 @@ SCH_ITEM* SCH_SHEET_PATH::FindPreviousItem( KICAD_T aType, SCH_ITEM* aLastItem,
SCH_ITEM* SCH_SHEET_PATH::MatchNextItem( wxFindReplaceData& aSearchData,
SCH_ITEM* aLastItem,
wxPoint * aFindLocation )
wxPoint* aFindLocation )
{
bool hasWrapped = false;
bool firstItemFound = false;
@ -494,15 +441,11 @@ bool SCH_SHEET_PATH::operator==( const SCH_SHEET_PATH& d1 ) const
}
/*********************************************************************/
/********************************************************************/
/* Class SCH_SHEET_LIST to handle the list of Sheets in a hierarchy */
/*********************************************************************/
/********************************************************************/
/* The constructor: build the list of sheets from aSheet.
* If aSheet == NULL (default) build the whole list of sheets in hierarchy
* So usually call it with no param.
*/
SCH_SHEET_LIST::SCH_SHEET_LIST( SCH_SHEET* aSheet )
{
m_index = 0;
@ -516,10 +459,6 @@ SCH_SHEET_LIST::SCH_SHEET_LIST( SCH_SHEET* aSheet )
}
/**
* Function GetFirst
* @return the first item (sheet) in m_List and prepare calls to GetNext()
*/
SCH_SHEET_PATH* SCH_SHEET_LIST::GetFirst()
{
m_index = 0;
@ -531,11 +470,6 @@ SCH_SHEET_PATH* SCH_SHEET_LIST::GetFirst()
}
/**
* Function GetNext
* @return the next item (sheet) in m_List or NULL if no more item in sheet
* list
*/
SCH_SHEET_PATH* SCH_SHEET_LIST::GetNext()
{
if( m_index < GetCount() )
@ -567,12 +501,6 @@ SCH_SHEET_PATH* SCH_SHEET_LIST::GetPrevious()
}
/**
* Function GetSheet
* @return the item (sheet) in aIndex position in m_List or NULL if less than
* index items
* @param aIndex = index in sheet list to get the sheet
*/
SCH_SHEET_PATH* SCH_SHEET_LIST::GetSheet( int aIndex )
{
if( aIndex < GetCount() )
@ -755,7 +683,7 @@ SCH_ITEM* SCH_SHEET_LIST::FindPreviousItem( KICAD_T aType, SCH_SHEET_PATH** aShe
SCH_ITEM* SCH_SHEET_LIST::MatchNextItem( wxFindReplaceData& aSearchData,
SCH_SHEET_PATH** aSheetFoundIn,
SCH_ITEM* aLastItem,
wxPoint * aFindLocation )
wxPoint* aFindLocation )
{
bool hasWrapped = false;
bool firstItemFound = false;

View File

@ -67,33 +67,28 @@ class SCH_REFERENCE_LIST;
* The _last_ sheet is usually the sheet we want to select or reach (which is
* what the function Last() returns).
* Others sheets constitute the "path" from the first to the last sheet.
* </p>
*/
class SCH_SHEET_PATH
{
private:
#define DSLSZ 32 // Max number of levels for a sheet path
SCH_SHEET* m_sheets[ DSLSZ ];
unsigned m_numSheets;
public:
#define DSLSZ 32 // Max number of levels for a sheet path
SCH_SHEET* m_sheets[DSLSZ];
public:
SCH_SHEET_PATH();
// ~SCH_SHEET_PATH() { };
void Clear()
{
m_numSheets = 0;
}
unsigned GetSheetsCount()
{
return m_numSheets;
}
/**
* Function Cmp
* Compare if this is the same sheet path as aSheetPathToTest
@ -116,7 +111,7 @@ public:
SCH_SCREEN* LastScreen();
/**
* Function LastScreen
* Function LastDrawList
* @return a pointer to the first schematic item handled by the
* SCH_SCREEN relative to the last sheet in list
*/
@ -299,6 +294,7 @@ public:
{
if( m_List )
free( m_List );
m_List = NULL;
}
@ -369,8 +365,7 @@ public:
* @param aReferences List of references to populate.
* @param aIncludePowerSymbols Set to false to only get normal components.
*/
void GetComponents( SCH_REFERENCE_LIST& aReferences,
bool aIncludePowerSymbols = true );
void GetComponents( SCH_REFERENCE_LIST& aReferences, bool aIncludePowerSymbols = true );
/**
* Function FindNextItem
@ -414,7 +409,7 @@ public:
SCH_ITEM* MatchNextItem( wxFindReplaceData& aSearchData,
SCH_SHEET_PATH** aSheetFound,
SCH_ITEM* aLastItem,
wxPoint * aFindLocation );
wxPoint* aFindLocation );
/**
* Function SetFootprintField

View File

@ -469,7 +469,7 @@ wxString SCH_SHEET_PIN::GetSelectMenuText() const
bool SCH_SHEET_PIN::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
{
EDA_Rect rect = GetBoundingBox();
EDA_RECT rect = GetBoundingBox();
rect.Inflate( aAccuracy );

View File

@ -77,7 +77,7 @@ static int* TemplateShape[5][4] =
SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType ) :
SCH_ITEM( NULL, aType ),
EDA_TextStruct( text )
EDA_TEXT( text )
{
m_Layer = LAYER_NOTES;
m_Pos = pos;
@ -90,7 +90,7 @@ SCH_TEXT::SCH_TEXT( const wxPoint& pos, const wxString& text, KICAD_T aType ) :
SCH_TEXT::SCH_TEXT( const SCH_TEXT& aText ) :
SCH_ITEM( aText ),
EDA_TextStruct( aText )
EDA_TEXT( aText )
{
m_Pos = aText.m_Pos;
m_Shape = aText.m_Shape;
@ -146,7 +146,7 @@ bool SCH_TEXT::Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint
{
if( SCH_ITEM::Matches( m_Text, aSearchData ) )
{
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
if( aFindLocation )
*aFindLocation = BoundaryBox.Centre();
return true;
@ -380,7 +380,7 @@ void SCH_TEXT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& aOffset,
wxPoint text_offset = aOffset + GetSchematicTextOffset();
EXCHG( linewidth, m_Thickness ); // Set the minimum width
EDA_TextStruct::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EDA_TEXT::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EXCHG( linewidth, m_Thickness ); // set initial value
if( m_IsDangling )
@ -389,7 +389,7 @@ void SCH_TEXT::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& aOffset,
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
GRRect( &panel->m_ClipBox, DC, BoundaryBox, 0, BROWN );
}
#endif
@ -595,7 +595,7 @@ void SCH_TEXT::GetConnectionPoints( vector< wxPoint >& aPoints ) const
}
EDA_Rect SCH_TEXT::GetBoundingBox() const
EDA_RECT SCH_TEXT::GetBoundingBox() const
{
// We must pass the effective text thickness to GetTextBox
// when calculating the bounding box
@ -603,7 +603,7 @@ EDA_Rect SCH_TEXT::GetBoundingBox() const
linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold );
EDA_Rect rect = GetTextBox( -1, linewidth );
EDA_RECT rect = GetTextBox( -1, linewidth );
if( m_Orient ) // Rotate rect
{
@ -640,7 +640,7 @@ bool SCH_TEXT::doHitTest( const wxPoint& aPoint, int aAccuracy ) const
}
bool SCH_TEXT::doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
bool SCH_TEXT::doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
return TextHitTest( aRect, aContained, aAccuracy );
}
@ -809,7 +809,7 @@ void SCH_LABEL::Draw( EDA_DRAW_PANEL* panel, wxDC* DC, const wxPoint& offset,
}
EDA_Rect SCH_LABEL::GetBoundingBox() const
EDA_RECT SCH_LABEL::GetBoundingBox() const
{
int x, y, dx, dy, length, height;
@ -851,7 +851,7 @@ EDA_Rect SCH_LABEL::GetBoundingBox() const
break;
}
EDA_Rect box( wxPoint( x, y ), wxSize( dx, dy ) );
EDA_RECT box( wxPoint( x, y ), wxSize( dx, dy ) );
box.Normalize();
return box;
}
@ -1136,7 +1136,7 @@ void SCH_GLOBALLABEL::Draw( EDA_DRAW_PANEL* panel,
int linewidth = (m_Thickness == 0) ? g_DrawDefaultLineThickness : m_Thickness;
linewidth = Clamp_Text_PenSize( linewidth, m_Size, m_Bold );
EXCHG( linewidth, m_Thickness ); // Set the minimum width
EDA_TextStruct::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EDA_TEXT::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EXCHG( linewidth, m_Thickness ); // set initial value
CreateGraphicShape( Poly, m_Pos + aOffset );
@ -1148,7 +1148,7 @@ void SCH_GLOBALLABEL::Draw( EDA_DRAW_PANEL* panel,
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
GRRect( &panel->m_ClipBox, DC, BoundaryBox, 0, BROWN );
}
#endif
@ -1239,7 +1239,7 @@ void SCH_GLOBALLABEL::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
}
EDA_Rect SCH_GLOBALLABEL::GetBoundingBox() const
EDA_RECT SCH_GLOBALLABEL::GetBoundingBox() const
{
int x, y, dx, dy, length, height;
@ -1284,7 +1284,7 @@ EDA_Rect SCH_GLOBALLABEL::GetBoundingBox() const
break;
}
EDA_Rect box( wxPoint( x, y ), wxSize( dx, dy ) );
EDA_RECT box( wxPoint( x, y ), wxSize( dx, dy ) );
box.Normalize();
return box;
}
@ -1471,7 +1471,7 @@ void SCH_HIERLABEL::Draw( EDA_DRAW_PANEL* panel,
EXCHG( linewidth, m_Thickness ); // Set the minimum width
wxPoint text_offset = offset + GetSchematicTextOffset();
EDA_TextStruct::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EDA_TEXT::Draw( panel, DC, text_offset, color, DrawMode, FILLED, UNSPECIFIED_COLOR );
EXCHG( linewidth, m_Thickness ); // set initial value
CreateGraphicShape( Poly, m_Pos + offset );
@ -1483,7 +1483,7 @@ void SCH_HIERLABEL::Draw( EDA_DRAW_PANEL* panel,
// Enable these line to draw the bounding box (debug tests purposes only)
#if 0
{
EDA_Rect BoundaryBox = GetBoundingBox();
EDA_RECT BoundaryBox = GetBoundingBox();
GRRect( &panel->m_ClipBox, DC, BoundaryBox, 0, BROWN );
}
#endif
@ -1514,7 +1514,7 @@ void SCH_HIERLABEL::CreateGraphicShape( std::vector <wxPoint>& aCorner_list,
}
EDA_Rect SCH_HIERLABEL::GetBoundingBox() const
EDA_RECT SCH_HIERLABEL::GetBoundingBox() const
{
int x, y, dx, dy, length, height;
@ -1560,7 +1560,7 @@ EDA_Rect SCH_HIERLABEL::GetBoundingBox() const
break;
}
EDA_Rect box( wxPoint( x, y ), wxSize( dx, dy ) );
EDA_RECT box( wxPoint( x, y ), wxSize( dx, dy ) );
box.Normalize();
return box;
}

View File

@ -28,7 +28,7 @@ typedef enum {
extern const char* SheetLabelType[]; /* names of types of labels */
class SCH_TEXT : public SCH_ITEM, public EDA_TextStruct
class SCH_TEXT : public SCH_ITEM, public EDA_TEXT
{
public:
int m_Shape;
@ -131,7 +131,7 @@ public:
* 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() const;
EDA_RECT GetBoundingBox() const;
/**
* Function Save
@ -212,7 +212,7 @@ public:
private:
virtual bool doHitTest( const wxPoint& aPoint, int aAccuracy ) const;
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const;
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const;
virtual EDA_ITEM* doClone() const;
};
@ -273,7 +273,7 @@ public:
* 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() const;
EDA_RECT GetBoundingBox() const;
/**
* Function Save
@ -378,7 +378,7 @@ public:
* 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() const;
EDA_RECT GetBoundingBox() const;
/**
* Function CreateGraphicShape (virual)
@ -492,7 +492,7 @@ public:
* 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() const;
EDA_RECT GetBoundingBox() const;
/** virtual function Mirror_Y
* mirror item relative to an Y axis

View File

@ -348,7 +348,7 @@ int LIB_VIEW_FRAME::BestZoom()
size = m_clientSize;
}
EDA_Rect BoundaryBox = component->GetBoundingBox( m_unit, m_convert );
EDA_RECT BoundaryBox = component->GetBoundingBox( m_unit, m_convert );
// Reserve a 25 mils margin around component bounding box.
size -= wxSize( 25, 25 );

View File

@ -128,7 +128,7 @@ int AM_PRIMITIVE::GetExposure(GERBER_DRAW_ITEM* aParent) const
* Draw the primitive shape for flashed items.
*/
void AM_PRIMITIVE::DrawBasicShape( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox,
EDA_RECT* aClipBox,
wxDC* aDC,
int aColor, int aAltColor,
wxPoint aShapePos,
@ -725,7 +725,7 @@ int AM_PRIMITIVE::GetShapeDim( GERBER_DRAW_ITEM* aParent )
* When an item is flashed, this is the shape of the item
*/
void APERTURE_MACRO::DrawApertureMacroShape( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox, wxDC* aDC,
EDA_RECT* aClipBox, wxDC* aDC,
int aColor, int aAltColor,
wxPoint aShapePos, bool aFilledShape )
{

View File

@ -134,7 +134,7 @@ public: AM_PRIMITIVE( bool aGerbMetric, AM_PRIMITIVE_ID aId = AMP_UNKNOWN )
* @param aShapePos = the actual shape position
* @param aFilledShape = true to draw in filled mode, false to draw in skecth mode
*/
void DrawBasicShape( GERBER_DRAW_ITEM* aParent, EDA_Rect* aClipBox, wxDC* aDC,
void DrawBasicShape( GERBER_DRAW_ITEM* aParent, EDA_RECT* aClipBox, wxDC* aDC,
int aColor, int aAltColor, wxPoint aShapePos, bool aFilledShape );
/** GetShapeDim
@ -206,7 +206,7 @@ struct APERTURE_MACRO
* @param aShapePos = the actual shape position
* @param aFilledShape = true to draw in filled mode, false to draw in skecth mode
*/
void DrawApertureMacroShape( GERBER_DRAW_ITEM* aParent, EDA_Rect* aClipBox, wxDC* aDC,
void DrawApertureMacroShape( GERBER_DRAW_ITEM* aParent, EDA_RECT* aClipBox, wxDC* aDC,
int aColor, int aAltColor, wxPoint aShapePos, bool aFilledShape );
/**

View File

@ -255,10 +255,10 @@ D_CODE* GERBER_DRAW_ITEM::GetDcodeDescr()
}
EDA_Rect GERBER_DRAW_ITEM::GetBoundingBox() const
EDA_RECT GERBER_DRAW_ITEM::GetBoundingBox() const
{
// return a rectangle which is (pos,dim) in nature. therefore the +1
EDA_Rect bbox( m_Start, wxSize( 1, 1 ) );
EDA_RECT bbox( m_Start, wxSize( 1, 1 ) );
bbox.Inflate( m_Size.x / 2, m_Size.y / 2 );
@ -557,7 +557,7 @@ void GERBER_DRAW_ITEM::ConvertSegmentToPolygon( )
* a helper function used id ::Draw to draw the polygon stored in m_PolyCorners
* Draw filled polygons
*/
void GERBER_DRAW_ITEM::DrawGbrPoly( EDA_Rect* aClipBox,
void GERBER_DRAW_ITEM::DrawGbrPoly( EDA_RECT* aClipBox,
wxDC* aDC,
int aColor,
const wxPoint& aOffset,
@ -659,12 +659,12 @@ bool GERBER_DRAW_ITEM::HitTest( const wxPoint& aRefPos )
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, an ending point must be inside this rect.
* @param aRefArea : the given EDA_Rect in AB plotter axis
* @param aRefArea : the given EDA_RECT in AB plotter axis
* @return bool - true if a hit, else false
*/
bool GERBER_DRAW_ITEM::HitTest( EDA_Rect& aRefArea )
bool GERBER_DRAW_ITEM::HitTest( EDA_RECT& aRefArea )
{
wxPoint pos = GetABPosition( m_Start );

View File

@ -196,7 +196,7 @@ public:
*/
D_CODE* GetDcodeDescr();
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/* Display on screen: */
void Draw( EDA_DRAW_PANEL* aPanel,
@ -216,7 +216,7 @@ public:
* Function DrawGbrPoly
* a helper function used to draw the polygon stored in m_PolyCorners
*/
void DrawGbrPoly( EDA_Rect* aClipBox,
void DrawGbrPoly( EDA_RECT* aClipBox,
wxDC* aDC, int aColor,
const wxPoint& aOffset, bool aFilledShape );
@ -250,7 +250,7 @@ public:
* @param aRefArea a wxPoint to test
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& aRefArea );
bool HitTest( EDA_RECT& aRefArea );
/**
* Function GetClass

View File

@ -332,7 +332,7 @@ void GERBVIEW_FRAME::CopyDCodesSizeToItems()
* When an item is flashed, the DCode shape is the shape of the item
*/
void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox, wxDC* aDC, int aColor, int aAltColor,
EDA_RECT* aClipBox, wxDC* aDC, int aColor, int aAltColor,
wxPoint aShapePos, bool aFilledShape )
{
int radius;
@ -450,7 +450,7 @@ void D_CODE::DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
* polygons (shapes with holes)
*/
void D_CODE::DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox, wxDC* aDC,
EDA_RECT* aClipBox, wxDC* aDC,
int aColor, bool aFilled,
const wxPoint& aPosition )
{

View File

@ -167,8 +167,8 @@ public:
* @param aShapePos = the actual shape position
* @param aFilledShape = true to draw in filled mode, false to draw in skecth mode
*/
void DrawFlashedShape( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox, wxDC* aDC, int aColor, int aAltColor,
void DrawFlashedShape( GERBER_DRAW_ITEM* aParent, EDA_RECT* aClipBox,
wxDC* aDC, int aColor, int aAltColor,
wxPoint aShapePos, bool aFilledShape );
/**
@ -185,7 +185,7 @@ public:
* @param aPosition = the actual shape position
*/
void DrawFlashedPolygon( GERBER_DRAW_ITEM* aParent,
EDA_Rect* aClipBox, wxDC* aDC, int aColor,
EDA_RECT* aClipBox, wxDC* aDC, int aColor,
bool aFilled, const wxPoint& aPosition );
/**

View File

@ -134,7 +134,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
layerBitmap = new wxBitmap( bitmapWidth, bitmapHeight );
screenBitmap = new wxBitmap( bitmapWidth, bitmapHeight );
layerDC.SelectObject( *layerBitmap );
EDA_Rect tmpRect = aPanel->m_ClipBox;
EDA_RECT tmpRect = aPanel->m_ClipBox;
aPanel->DoPrepareDC( layerDC );
aPanel->m_ClipBox = tmpRect;
layerDC.SetBackground( bgBrush );
@ -210,7 +210,7 @@ void BOARD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDrawMode, const wxPoin
GRSetDrawMode( &layerDC, GR_COPY );
EDA_Rect* cbox = &aPanel->m_ClipBox;
EDA_RECT* cbox = &aPanel->m_ClipBox;
GRSFilledRect( cbox, plotDC, cbox->GetX(), cbox->GetY(),
cbox->GetRight(), cbox->GetBottom(),

View File

@ -154,7 +154,7 @@ int GERBVIEW_FRAME::BestZoom()
return 16 * GetScreen()->m_ZoomScalar;
double x, y;
EDA_Rect bbox;
EDA_RECT bbox;
BOARD_ITEM* item = GetBoard()->m_Drawings;
bbox = ( (GERBER_DRAW_ITEM*) item )->GetBoundingBox();

View File

@ -111,7 +111,7 @@ enum SEARCH_RESULT {
class EDA_ITEM;
class EDA_DRAW_FRAME;
class BOARD;
class EDA_Rect;
class EDA_RECT;
class EDA_DRAW_PANEL;
/**
@ -148,23 +148,23 @@ public:
/**
* Class EDA_Rect
* Class EDA_RECT
* handles the component boundary box.
* This class is similar to wxRect, but some wxRect functions are very curious,
* and are working only if dimensions are >= 0 (not always the case in kicad)
* and also kicad needs some specific method.
* so I prefer this more suitable class
*/
class EDA_Rect
class EDA_RECT
{
public:
wxPoint m_Pos; // Rectangle Origin
wxSize m_Size; // Rectangle Size
public:
EDA_Rect() { };
EDA_RECT() { };
EDA_Rect( const wxPoint& aPos, const wxSize& aSize ) :
EDA_RECT( const wxPoint& aPos, const wxSize& aSize ) :
m_Pos( aPos ),
m_Size( aSize )
{ }
@ -204,10 +204,10 @@ public:
/**
* Function Contains
* @param aRect = the EDA_Rect to test
* @param aRect = the EDA_RECT to test
* @return true if aRect is Contained. A common edge is seen as contained
*/
bool Contains( const EDA_Rect& aRect ) const;
bool Contains( const EDA_RECT& aRect ) const;
wxSize GetSize() const { return m_Size; }
int GetX() const { return m_Pos.x; }
@ -242,7 +242,7 @@ public:
* @return bool - true if the argument rectangle intersects this rectangle.
* (i.e. if the 2 rectangles have at least a common point)
*/
bool Intersects( const EDA_Rect& aRect ) const;
bool Intersects( const EDA_RECT& aRect ) const;
/**
* Function operator(wxRect)
@ -255,14 +255,14 @@ public:
* inflates the rectangle horizontally by \a dx and vertically by \a dy. If \a dx
* and/or \a dy is negative the rectangle is deflated.
*/
EDA_Rect& Inflate( wxCoord dx, wxCoord dy );
EDA_RECT& Inflate( wxCoord dx, wxCoord dy );
/**
* Function Inflate
* inflates the rectangle horizontally and vertically by \a aDelta. If \a aDelta
* is negative the rectangle is deflated.
*/
EDA_Rect& Inflate( int aDelta );
EDA_RECT& Inflate( int aDelta );
/**
* Function Merge
@ -270,7 +270,7 @@ public:
* mainly used to calculate bounding boxes.
* @param aRect The rectangle to merge with this rectangle.
*/
void Merge( const EDA_Rect& aRect );
void Merge( const EDA_RECT& aRect );
/**
* Function Merge
@ -465,12 +465,12 @@ public:
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* 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
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
virtual bool HitTest( EDA_Rect& refArea )
virtual bool HitTest( EDA_RECT& refArea )
{
return false; // derived classes should override this function
}
@ -484,7 +484,7 @@ public:
* system.
* It is OK to overestimate the size by a few counts.
*/
virtual EDA_Rect GetBoundingBox() const
virtual EDA_RECT GetBoundingBox() const
{
#if defined(DEBUG)
printf( "Missing GetBoundingBox()\n" );
@ -493,7 +493,7 @@ public:
// return a zero-sized box per default. derived classes should override
// this
return EDA_Rect( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
return EDA_RECT( wxPoint( 0, 0 ), wxSize( 0, 0 ) );
}
/**
@ -663,12 +663,12 @@ enum FILL_T {
#define DEFAULT_SIZE_TEXT 60 /* default text height (in mils or 1/1000") */
/**
* Class EDA_TextStruct
* Class EDA_TEXT
* is a basic class to handle texts (labels, texts on components or footprints
* ..) not used directly.
* The text classes are derived from EDA_ITEM and EDA_TextStruct
* The text classes are derived from EDA_ITEM and EDA_TEXT
*/
class EDA_TextStruct
class EDA_TEXT
{
public:
wxString m_Text; /* text! */
@ -689,9 +689,9 @@ public:
* calculations than multiline */
public:
EDA_TextStruct( const wxString& text = wxEmptyString );
EDA_TextStruct( const EDA_TextStruct& aText );
virtual ~EDA_TextStruct();
EDA_TEXT( const wxString& text = wxEmptyString );
EDA_TEXT( const EDA_TEXT& aText );
virtual ~EDA_TEXT();
/**
* Function SetThickness
@ -744,7 +744,7 @@ private:
/**
* Function DrawOneLineOfText
* Draw a single text line.
* Used to draw each line of this EDA_TextStruct, that can be multiline
* Used to draw each line of this EDA_TEXT, that can be multiline
* @param aPanel = the current DrawPanel
* @param aDC = the current Device Context
* @param aOffset = draw offset (usually (0,0))
@ -782,7 +782,7 @@ public:
* @param aAccuracy - Amount to inflate the bounding box.
* @return bool - true if a hit, else false
*/
bool TextHitTest( const EDA_Rect& aRect, bool aContains = false, int aAccuracy = 0 ) const;
bool TextHitTest( const EDA_RECT& aRect, bool aContains = false, int aAccuracy = 0 ) const;
/**
* Function LenSize
@ -806,7 +806,7 @@ public:
* @param aThickness - Overrides the current thickness when greater than 0.
* @param aInvertY - Invert the Y axis when calculating bounding box.
*/
EDA_Rect GetTextBox( int aLine = -1, int aThickness = -1, bool aInvertY = false ) const;
EDA_RECT GetTextBox( int aLine = -1, int aThickness = -1, bool aInvertY = false ) const;
/**
* Function GetInterline

View File

@ -53,7 +53,7 @@ typedef enum {
} CmdBlockType;
class BLOCK_SELECTOR : public EDA_ITEM, public EDA_Rect
class BLOCK_SELECTOR : public EDA_ITEM, public EDA_RECT
{
public:
BlockState m_State; /* State (enum BlockState)

View File

@ -60,7 +60,7 @@ protected:
wxPoint m_RefPos;
/// A bounding box to test against, and that was used to make the collection.
EDA_Rect m_RefBox;
EDA_RECT m_RefBox;
/// The time at which the collection was made.
int m_TimeAtCollection;
@ -185,8 +185,8 @@ public:
void SetRefPos( const wxPoint& aRefPos ) { m_RefPos = aRefPos; }
const wxPoint& GetRefPos() const { return m_RefPos; }
void SetBoundingBox( const EDA_Rect& aRefBox ) { m_RefBox = aRefBox; }
const EDA_Rect& GetBoundingBox() const { return m_RefBox; }
void SetBoundingBox( const EDA_RECT& aRefBox ) { m_RefBox = aRefBox; }
const EDA_RECT& GetBoundingBox() const { return m_RefBox; }
/**

View File

@ -36,7 +36,7 @@ private:
int m_cursorLevel; ///< Index for cursor redraw in XOR mode.
public:
EDA_Rect m_ClipBox; // the clipbox used in screen redraw (usually gives the
EDA_RECT m_ClipBox; // the clipbox used in screen redraw (usually gives the
// visible area in internal units)
wxPoint m_CursorStartPos; // useful in testing the cursor movement
int m_scrollIncrementX; // X axis scroll increment in pixels per unit.
@ -231,7 +231,7 @@ public:
* @param aRect The rectangle to repaint.
* @param aEraseBackground Erases the background if true.
*/
void RefreshDrawingRect( const EDA_Rect& aRect, bool aEraseBackground = true );
void RefreshDrawingRect( const EDA_RECT& aRect, bool aEraseBackground = true );
/**
* Function GetScreenCenterLogicalPosition

View File

@ -15,7 +15,7 @@ protected:
std::vector <wxPoint> m_Corners; ///< Corner list for shape definition (a polygon)
int m_MarkerType; ///< Can be used as a flag
EDA_Colors m_Color; ///< color
EDA_Rect m_ShapeBoundingBox; ///< Bounding box of the graphic symbol, relative
EDA_RECT m_ShapeBoundingBox; ///< Bounding box of the graphic symbol, relative
///< to the position of the shape, used for Hit
///< Tests
int m_ScalingFactor; ///< Scaling factor for m_Size and m_Corners (can
@ -190,7 +190,7 @@ public:
* 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 GetBoundingBoxMarker() const;
EDA_RECT GetBoundingBoxMarker() const;
};

View File

@ -7,7 +7,7 @@
#include "colors.h"
#include <vector>
class EDA_Rect;
class EDA_RECT;
#define GR_COPY 0
@ -65,22 +65,22 @@ void GRForceBlackPen( bool flagforce );
*/
bool GetGRForceBlackPenState( void );
void GRLine( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor );
void GRLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color );
void GRMixedLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRLine( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd, int aWidth, int aColor );
void GRLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color );
void GRMixedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color );
void GRDashedLine( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRDashedLine( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color );
void GRDashedLineTo( EDA_Rect* ClipBox, wxDC* DC, int x2, int y2, int width, int Color );
void GRDashedLineTo( EDA_RECT* ClipBox, wxDC* DC, int x2, int y2, int width, int Color );
void GRMoveTo( int x, int y );
void GRLineTo( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int width, int Color );
void GRLineTo( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int width, int Color );
void GRPoly( EDA_Rect* ClipBox, wxDC* DC, int n, wxPoint Points[], bool Fill,
void GRPoly( EDA_RECT* ClipBox, wxDC* DC, int n, wxPoint Points[], bool Fill,
int width, int Color, int BgColor );
void GRBezier( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRBezier( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int x3, int y3, int width, int Color );
void GRBezier( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRBezier( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int x3, int y3, int x4, int y4, int width, int Color );
/**
@ -95,7 +95,7 @@ void GRBezier( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
*/
void GRClosedPoly( EDA_Rect* ClipBox,
void GRClosedPoly( EDA_RECT* ClipBox,
wxDC * aDC,
int aPointCount,
wxPoint aPoints[],
@ -119,7 +119,7 @@ void GRClosedPoly( EDA_Rect* ClipBox,
* @param aPenColor the color index of the border.
* @param aFillColor the fill color of the polygon's interior.
*/
void GRClosedPoly( EDA_Rect* ClipBox,
void GRClosedPoly( EDA_RECT* ClipBox,
wxDC* aDC,
int aPointCount,
wxPoint aPoints[],
@ -142,55 +142,55 @@ void GRClosedPoly( EDA_Rect* ClipBox,
* @param aColor is an index into our color table of RGB colors.
* @see EDA_Colors and colors.h
*/
void GRCircle( EDA_Rect* ClipBox, wxDC* aDC, int x, int y, int aRadius, int aColor );
void GRCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r, int width, int Color );
void GRFilledCircle( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int r, int width,
void GRCircle( EDA_RECT* ClipBox, wxDC* aDC, int x, int y, int aRadius, int aColor );
void GRCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r, int width, int Color );
void GRFilledCircle( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int r, int width,
int Color, int BgColor );
void GRFilledCircle( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aColor );
void GRCircle( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aWidth, int aColor );
void GRFilledCircle( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aColor );
void GRCircle( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aPos, int aRadius, int aWidth, int aColor );
void GRArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
void GRArc( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int StAngle,
int EndAngle, int r, int Color );
void GRArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
void GRArc( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int StAngle,
int EndAngle, int r, int width, int Color );
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int xc, int yc, int Color );
void GRArc1( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRArc1( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int xc, int yc, int width, int Color );
void GRArc1( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRArc1( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
wxPoint aCenter, int aWidth, int aColor );
void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y,
void GRFilledArc( EDA_RECT* ClipBox, wxDC* DC, int x, int y,
int StAngle, int EndAngle, int r, int Color, int BgColor );
void GRFilledArc( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int StAngle,
void GRFilledArc( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int StAngle,
int EndAngle, int r, int width, int Color, int BgColor );
void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color );
void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int width, int Color );
void GRFillCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRFillCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int Color );
void GRFilledSegment( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRFilledSegment( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
int aWidth, int aColor );
void GRCSegm( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
void GRCSegm( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2,
int width, int aPenSize, int Color );
void GRCSegm( EDA_Rect* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
void GRCSegm( EDA_RECT* aClipBox, wxDC* aDC, wxPoint aStart, wxPoint aEnd,
int aWidth, int aColor );
void GRSetColor( int Color );
void GRSetDefaultPalette();
int GRGetColor();
void GRPutPixel( EDA_Rect* ClipBox, wxDC* DC, int x, int y, int color );
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
void GRPutPixel( EDA_RECT* ClipBox, wxDC* DC, int x, int y, int color );
void GRFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1,
int x2, int y2, int Color, int BgColor );
void GRFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
void GRFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1,
int x2, int y2, int width, int Color, int BgColor );
void GRRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int Color );
void GRRect( EDA_Rect* ClipBox, wxDC* DC,const EDA_Rect& aRect, int aWidth, int Color );
void GRRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
void GRRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1, int x2, int y2, int Color );
void GRRect( EDA_RECT* ClipBox, wxDC* DC,const EDA_RECT& aRect, int aWidth, int Color );
void GRRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1,
int x2, int y2, int width, int Color );
void GRRectPs( EDA_Rect* aClipBox, wxDC* aDC,const EDA_Rect& aRect,
void GRRectPs( EDA_RECT* aClipBox, wxDC* aDC,const EDA_RECT& aRect,
int aWidth, int aColor, wxPenStyle aStyle = wxPENSTYLE_SOLID );
void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
void GRSFilledRect( EDA_RECT* ClipBox, wxDC* DC, int x1, int y1,
int x2, int y2, int width, int Color, int BgColor );
/**
@ -203,7 +203,7 @@ void GRSFilledRect( EDA_Rect* ClipBox, wxDC* DC, int x1, int y1,
* @param aColor = an index into our color table of RGB colors.
* @see EDA_Colors and colors.h
*/
void GRLineArray( EDA_Rect* aClipBox, wxDC* aDC,std::vector<wxPoint>& aLines,
void GRLineArray( EDA_RECT* aClipBox, wxDC* aDC,std::vector<wxPoint>& aLines,
int aWidth, int aColor );
#endif /* define GR_BASIC */

View File

@ -288,7 +288,7 @@ public:
* @param aAccuracy - Increase aRect by this amount.
* @return True if \a aRect contains or intersects the item bounding box.
*/
bool HitTest( const EDA_Rect& aRect, bool aContained = false, int aAccuracy = 0 ) const
bool HitTest( const EDA_RECT& aRect, bool aContained = false, int aAccuracy = 0 ) const
{
return doHitTest( aRect, aContained, aAccuracy );
}
@ -309,7 +309,7 @@ private:
return false;
}
virtual bool doHitTest( const EDA_Rect& aRect, bool aContained, int aAccuracy ) const
virtual bool doHitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy ) const
{
return false;
}

View File

@ -35,7 +35,7 @@
#define KICAD_DEFAULT_DRAWFRAME_STYLE wxDEFAULT_FRAME_STYLE | wxWANTS_CHARS
class EDA_ITEM;
class EDA_Rect;
class EDA_RECT;
class EDA_DRAW_PANEL;
class WinEDA_MsgPanel;
class BASE_SCREEN;
@ -458,7 +458,7 @@ public:
void Zoom_Automatique( bool aWarpPointer );
/* Set the zoom level to show the area Rect */
void Window_Zoom( EDA_Rect& Rect );
void Window_Zoom( EDA_RECT& Rect );
/* Return the zoom level which displays the full page on screen */
virtual int BestZoom() = 0;

View File

@ -65,7 +65,7 @@ public:
bool m_InitBoardDone;
int m_Layers;
int m_GridRouting; // Size of grid for autoplace/autoroute
EDA_Rect m_BrdBox; // Actual board bouding box
EDA_RECT m_BrdBox; // Actual board bouding box
int m_Nrows, m_Ncols;
int m_MemSize;

View File

@ -26,7 +26,7 @@
static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition,
bool aErase );
static int MarkItemsInBloc( MODULE* module, EDA_Rect& Rect );
static int MarkItemsInBloc( MODULE* module, EDA_RECT& Rect );
static void ClearMarkItems( MODULE* module );
static void CopyMarkedItems( MODULE* module, wxPoint offset );
@ -637,7 +637,7 @@ void ClearMarkItems( MODULE* module )
/* Mark items inside rect.
* Items are inside rect when an end point is inside rect
*/
int MarkItemsInBloc( MODULE* module, EDA_Rect& Rect )
int MarkItemsInBloc( MODULE* module, EDA_RECT& Rect )
{
EDA_ITEM* item;
int ItemsCount = 0;

View File

@ -243,7 +243,7 @@ void PlaceCells( BOARD* aPcb, int net_code, int flag )
if( PtText->GetLength() == 0 )
break;
EDA_Rect textbox = PtText->GetTextBox( -1 );
EDA_RECT textbox = PtText->GetTextBox( -1 );
ux0 = textbox.GetX(); uy0 = textbox.GetY();
dx = textbox.GetWidth();
dy = textbox.GetHeight();

View File

@ -102,7 +102,7 @@ void TEXTE_PCB::TransformShapeWithClearanceToPolygon(
CPolyPt corners[4]; // Buffer of polygon corners
EDA_Rect rect = GetTextBox( -1 );
EDA_RECT rect = GetTextBox( -1 );
rect.Inflate( aClearanceValue );
corners[0].x = rect.GetOrigin().x;
corners[0].y = rect.GetOrigin().y;

View File

@ -795,7 +795,7 @@ bool BOARD::ComputeBoundingBox( bool aBoardEdgesOnly )
if( aBoardEdgesOnly )
break;
EDA_Rect rect = ((DIMENSION*) PtStruct)->GetBoundingBox();
EDA_RECT rect = ((DIMENSION*) PtStruct)->GetBoundingBox();
xmin = MIN( xmin, rect.GetX() );
ymin = MIN( ymin, rect.GetY() );
xmax = MAX( xmax, rect.GetRight() );
@ -808,7 +808,7 @@ bool BOARD::ComputeBoundingBox( bool aBoardEdgesOnly )
if( aBoardEdgesOnly )
break;
EDA_Rect rect = ((TEXTE_PCB*) PtStruct)->GetTextBox( -1 );
EDA_RECT rect = ((TEXTE_PCB*) PtStruct)->GetTextBox( -1 );
xmin = MIN( xmin, rect.GetX() );
ymin = MIN( ymin, rect.GetY() );
xmax = MAX( xmax, rect.GetRight() );
@ -821,7 +821,7 @@ bool BOARD::ComputeBoundingBox( bool aBoardEdgesOnly )
if( aBoardEdgesOnly )
break;
EDA_Rect rect = ((DIMENSION*) PtStruct)->GetBoundingBox();
EDA_RECT rect = ((DIMENSION*) PtStruct)->GetBoundingBox();
xmin = MIN( xmin, rect.GetX() );
ymin = MIN( ymin, rect.GetY() );
xmax = MAX( xmax, rect.GetRight() );
@ -839,7 +839,7 @@ bool BOARD::ComputeBoundingBox( bool aBoardEdgesOnly )
// Check modules
for( MODULE* module = m_Modules; module; module = module->Next() )
{
EDA_Rect bBox = module->GetBoundingBox();
EDA_RECT bBox = module->GetBoundingBox();
xmin = MIN( xmin, bBox.GetX() );
ymin = MIN( ymin, bBox.GetY() );
xmax = MAX( xmax, bBox.GetRight() );
@ -881,7 +881,7 @@ bool BOARD::ComputeBoundingBox( bool aBoardEdgesOnly )
for( unsigned int i = 0; i < m_ZoneDescriptorList.size(); i++ )
{
ZONE_CONTAINER* aZone = m_ZoneDescriptorList[i];
EDA_Rect bBox = aZone->GetBoundingBox();
EDA_RECT bBox = aZone->GetBoundingBox();
xmin = MIN( xmin, bBox.GetX() );
ymin = MIN( ymin, bBox.GetY() );
xmax = MAX( xmax, bBox.GetRight() );

View File

@ -112,7 +112,7 @@ private:
public:
PCB_BASE_FRAME* m_PcbFrame; // Window of visualization
EDA_Rect m_BoundaryBox; // Board size and position
EDA_RECT m_BoundaryBox; // Board size and position
int m_Status_Pcb; // Flags used in ratsnet calculation and update
int m_NbNodes; // Active pads (pads attached to a net ) count
int m_NbNoconnect; // Active ratsnet count (rastnests not already connected by tracks)

View File

@ -727,11 +727,11 @@ bool DIMENSION::HitTest( const wxPoint& ref_pos )
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT intersect this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool DIMENSION::HitTest( EDA_Rect& refArea )
bool DIMENSION::HitTest( EDA_RECT& refArea )
{
if( refArea.Contains( m_Pos ) )
return true;
@ -739,9 +739,9 @@ bool DIMENSION::HitTest( EDA_Rect& refArea )
}
EDA_Rect DIMENSION::GetBoundingBox() const
EDA_RECT DIMENSION::GetBoundingBox() const
{
EDA_Rect bBox;
EDA_RECT bBox;
int xmin, xmax, ymin, ymax;
bBox = m_Text->GetTextBox( -1 );

View File

@ -115,12 +115,12 @@ public:
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, the anchor must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
@ -133,7 +133,7 @@ public:
return wxT( "DIMENSION" );
}
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
};
#endif // #define DIMENSION_H

View File

@ -466,12 +466,12 @@ bool DRAWSEGMENT::HitTest( const wxPoint& aRefPos )
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, for arcs and segments, an ending point must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool DRAWSEGMENT::HitTest( EDA_Rect& refArea )
bool DRAWSEGMENT::HitTest( EDA_RECT& refArea )
{
switch(m_Shape)
{
@ -479,7 +479,7 @@ bool DRAWSEGMENT::HitTest( EDA_Rect& refArea )
{
int radius = GetRadius();
// Text if area intersects the circle:
EDA_Rect area = refArea;
EDA_RECT area = refArea;
area.Inflate(radius);
if( area.Contains(m_Start) )
return true;

View File

@ -99,12 +99,12 @@ public:
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* 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 to test
* @param refArea the given EDA_RECT to test
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
* Function GetClass

View File

@ -62,9 +62,9 @@ void EDGE_MODULE::Copy( EDGE_MODULE* source )
* 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 EDGE_MODULE::GetBoundingBox() const
EDA_RECT EDGE_MODULE::GetBoundingBox() const
{
EDA_Rect bbox;
EDA_RECT bbox;
bbox.SetOrigin( m_Start );
@ -573,12 +573,12 @@ bool EDGE_MODULE::HitTest( const wxPoint& refPos )
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, for arcs and segments, an ending point must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool EDGE_MODULE::HitTest( EDA_Rect& refArea )
bool EDGE_MODULE::HitTest( EDA_RECT& refArea )
{
switch(m_Shape)
{
@ -586,7 +586,7 @@ bool EDGE_MODULE::HitTest( EDA_Rect& refArea )
{
int radius = GetRadius();
// Test if area intersects the circle:
EDA_Rect area = refArea;
EDA_RECT area = refArea;
area.Inflate(radius);
if( area.Contains(m_Start) )
return true;

View File

@ -104,7 +104,7 @@ public:
* object, and the units should be in the pcb or schematic coordinate system.
* It is OK to overestimate the size by a few counts.
*/
virtual EDA_Rect GetBoundingBox() const;
virtual EDA_RECT GetBoundingBox() const;
/**
* Function HitTest
@ -116,12 +116,12 @@ public:
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, for segments and arcs, an ending point must be inside this rect.
* @param refArea the given EDA_Rect to test
* @param refArea the given EDA_RECT to test
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
* Function GetClass

View File

@ -188,11 +188,11 @@ bool MIREPCB::HitTest( const wxPoint& refPos )
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect intersect this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT intersect this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool MIREPCB::HitTest( EDA_Rect& refArea )
bool MIREPCB::HitTest( EDA_RECT& refArea )
{
if( refArea.Contains( m_Pos ) )
return true;
@ -224,9 +224,9 @@ void MIREPCB::Flip(const wxPoint& aCentre )
}
EDA_Rect MIREPCB::GetBoundingBox() const
EDA_RECT MIREPCB::GetBoundingBox() const
{
EDA_Rect bBox;
EDA_RECT bBox;
bBox.SetX( m_Pos.x - m_Size/2 );
bBox.SetY( m_Pos.y - m_Size/2 );
bBox.SetWidth( m_Size );

View File

@ -80,14 +80,14 @@ public:
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, the anchor must be inside this rect.
* @param refArea : the given EDA_Rect
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
};

View File

@ -710,9 +710,9 @@ void MODULE::Set_Rectangle_Encadrement()
}
EDA_Rect MODULE::GetFootPrintRect() const
EDA_RECT MODULE::GetFootPrintRect() const
{
EDA_Rect area;
EDA_RECT area;
area.m_Pos = m_Pos;
area.SetEnd( m_Pos );
@ -753,12 +753,12 @@ void MODULE::SetRectangleExinscrit()
* returns the full bounding box of this Footprint, including fields
* Mainly used to redraw the screen area occupied by the footprint
*/
EDA_Rect MODULE::GetBoundingBox() const
EDA_RECT MODULE::GetBoundingBox() const
{
EDA_Rect area = GetFootPrintRect();
EDA_RECT area = GetFootPrintRect();
// Calculate extended area including text field:
EDA_Rect text_area;
EDA_RECT text_area;
text_area = m_Reference->GetBoundingBox();
area.Merge( text_area );
@ -885,11 +885,11 @@ bool MODULE::HitTest( const wxPoint& refPos )
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect the bounds of this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT intersect the bounds of this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool MODULE::HitTest( EDA_Rect& refArea )
bool MODULE::HitTest( EDA_RECT& refArea )
{
bool is_out_of_box = false;

View File

@ -53,9 +53,9 @@ public:
* routing. */
int m_ModuleStatus; /* For autoplace: flags (LOCKED,
* AUTOPLACED) */
EDA_Rect m_BoundaryBox; /* Bounding box coordinates relatives
EDA_RECT m_BoundaryBox; /* Bounding box coordinates relatives
* to the anchor, orient 0*/
EDA_Rect m_RealBoundaryBox; /* Bounding box : coordinates on board,
EDA_RECT m_RealBoundaryBox; /* Bounding box : coordinates on board,
* real orientation */
int m_PadNum; // Pad count
int m_AltPadNum; /* Pad with netcode > 0 (active pads)
@ -129,14 +129,14 @@ public:
* Function GetFootPrintRect()
* Returns the area of the module footprint excluding any text.
*/
EDA_Rect GetFootPrintRect() const;
EDA_RECT GetFootPrintRect() const;
/**
* Function GetBoundingBox
* returns the bounding box of this Footprint
* Mainly used to redraw the screen area occupied by the footprint
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function GetPosition
@ -264,11 +264,11 @@ public:
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect the bounds of this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT intersect the bounds of this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
* Function GetReference

View File

@ -103,9 +103,9 @@ void D_PAD::ComputeShapeMaxRadius()
* returns the bounding box of this pad
* Mainly used to redraw the screen area occupied by the pad
*/
EDA_Rect D_PAD::GetBoundingBox() const
EDA_RECT D_PAD::GetBoundingBox() const
{
EDA_Rect area;
EDA_RECT area;
int radius = GetMaxRadius(); // Calculate the radius of the area, considered as a circle
area.SetOrigin( m_Pos );

View File

@ -245,7 +245,7 @@ public:
* basic function to draw a pad.
* used by Draw after calculation of parameters (color, ) final orientation ...
*/
void DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
void DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo );
/**
* Function BuildPadPolygon
@ -334,7 +334,7 @@ public:
* returns the bounding box of this pad
* Mainly used to redraw the screen area occupied by the pad
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function Compare

View File

@ -348,7 +348,7 @@ void D_PAD::Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, int aDraw_mode, const wxPoi
* this function can be called to draw a pad on a panel
* even if this panel is not a EDA_DRAW_PANEL (for instance on a wxPanel inside the pad editor)
*/
void D_PAD::DrawShape( EDA_Rect* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
void D_PAD::DrawShape( EDA_RECT* aClipBox, wxDC* aDC, PAD_DRAWINFO& aDrawInfo )
{
wxPoint coord[4];
int delta_cx, delta_cy;

View File

@ -24,7 +24,7 @@
TEXTE_PCB::TEXTE_PCB( BOARD_ITEM* parent ) :
BOARD_ITEM( parent, TYPE_TEXTE ),
EDA_TextStruct()
EDA_TEXT()
{
m_MultilineAllowed = true;
}
@ -208,7 +208,7 @@ void TEXTE_PCB::Draw( EDA_DRAW_PANEL* panel, wxDC* DC,
if( brd->IsElementVisible( ANCHOR_VISIBLE ) )
anchor_color = brd->GetVisibleElementColor(ANCHOR_VISIBLE);
EDA_TextStruct::Draw( panel, DC, offset, (EDA_Colors) color,
EDA_TEXT::Draw( panel, DC, offset, (EDA_Colors) color,
DrawMode, fillmode, (EDA_Colors) anchor_color );
}

View File

@ -8,7 +8,7 @@
#include "PolyLine.h"
#include "richio.h"
class TEXTE_PCB : public BOARD_ITEM, public EDA_TextStruct
class TEXTE_PCB : public BOARD_ITEM, public EDA_TEXT
{
public:
TEXTE_PCB( BOARD_ITEM* parent );
@ -23,7 +23,7 @@ public:
*/
wxPoint& GetPosition()
{
return m_Pos; // within EDA_TextStruct
return m_Pos; // within EDA_TEXT
}
/**
@ -93,11 +93,11 @@ public:
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* @param refArea the given EDA_Rect to test
* tests if the given EDA_RECT intersect this object.
* @param refArea the given EDA_RECT to test
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea )
bool HitTest( EDA_RECT& refArea )
{
return TextHitTest( refArea );
}

View File

@ -21,7 +21,7 @@
/*******************************************************************/
TEXTE_MODULE::TEXTE_MODULE( MODULE* parent, int text_type ) :
BOARD_ITEM( parent, TYPE_TEXTE_MODULE ), EDA_TextStruct()
BOARD_ITEM( parent, TYPE_TEXTE_MODULE ), EDA_TEXT()
{
MODULE* Module = (MODULE*) m_Parent;
@ -248,12 +248,12 @@ void TEXTE_MODULE:: SetLocalCoord()
/**
* Function GetTextRect
* @return an EDA_Rect which gives the position and size of the text area
* @return an EDA_RECT which gives the position and size of the text area
* (for the footprint orientation)
*/
EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
EDA_RECT TEXTE_MODULE::GetTextRect( void ) const
{
EDA_Rect area;
EDA_RECT area;
int dx, dy;
@ -283,7 +283,7 @@ EDA_Rect TEXTE_MODULE::GetTextRect( void ) const
bool TEXTE_MODULE::HitTest( const wxPoint& aRefPos )
{
wxPoint rel_pos;
EDA_Rect area = GetTextRect();
EDA_RECT area = GetTextRect();
/* Rotate refPos to - angle
* to test if refPos is within area (which is relative to an horizontal
@ -304,10 +304,10 @@ bool TEXTE_MODULE::HitTest( const wxPoint& aRefPos )
* returns the bounding box of this Text (according to text and footprint
* orientation)
*/
EDA_Rect TEXTE_MODULE::GetBoundingBox() const
EDA_RECT TEXTE_MODULE::GetBoundingBox() const
{
// Calculate area without text fields:
EDA_Rect text_area;
EDA_RECT text_area;
int angle = GetDrawRotation();
wxPoint textstart, textend;

View File

@ -14,7 +14,7 @@
#define UMBILICAL_COLOR LIGHTBLUE
class TEXTE_MODULE : public BOARD_ITEM, public EDA_TextStruct
class TEXTE_MODULE : public BOARD_ITEM, public EDA_TEXT
{
/* Note: orientation in 1/10 deg relative to the footprint
* Physical orient is m_Orient + m_Parent->m_Orient
@ -54,17 +54,17 @@ public: TEXTE_MODULE( MODULE* parent, int text_type = TEXT_is_DIVERS );
/**
* Function GetTextRect
* @return an EDA_Rect which gives the position and size of the text area
* @return an EDA_RECT which gives the position and size of the text area
* (for the 0 orient text and footprint)
*/
EDA_Rect GetTextRect( void ) const;
EDA_RECT GetTextRect( void ) const;
/**
* Function GetBoundingBox
* returns the bounding box of this Text (according to text and footprint
* orientation)
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
void SetDrawCoord(); // Set absolute coordinates.

View File

@ -212,7 +212,7 @@ int TRACK::IsPointOnEnds( const wxPoint& point, int min_dist )
}
EDA_Rect TRACK::GetBoundingBox() const
EDA_RECT TRACK::GetBoundingBox() const
{
// end of track is round, this is its radius, rounded up
int radius = ( m_Width + 1 ) / 2;
@ -262,7 +262,7 @@ EDA_Rect TRACK::GetBoundingBox() const
xmin -= radius;
// return a rectangle which is [pos,dim) in nature. therefore the +1
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
EDA_RECT ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
return ret;
}
@ -1131,12 +1131,12 @@ bool TRACK::HitTest( const wxPoint& refPos )
/**
* Function HitTest (overlaid)
* tests if the given EDA_Rect intersect this object.
* tests if the given EDA_RECT intersect this object.
* For now, an ending point must be inside this rect.
* @param refArea an EDA_Rect to test
* @param refArea an EDA_RECT to test
* @return bool - true if a hit, else false
*/
bool TRACK::HitTest( EDA_Rect& refArea )
bool TRACK::HitTest( EDA_RECT& refArea )
{
if( refArea.Contains( m_Start ) )
return true;

View File

@ -96,7 +96,7 @@ public:
return m_Start; // it had to be start or end.
}
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function Save
@ -259,10 +259,10 @@ public:
* Function HitTest (overlaid)
* tests if the given wxRect intersect this object.
* For now, an ending point must be inside this rect.
* @param refArea an EDA_Rect to test
* @param refArea an EDA_RECT to test
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
* Function GetClass

View File

@ -686,7 +686,7 @@ void ZONE_CONTAINER::DrawFilledArea( EDA_DRAW_PANEL* panel,
}
EDA_Rect ZONE_CONTAINER::GetBoundingBox() const
EDA_RECT ZONE_CONTAINER::GetBoundingBox() const
{
const int PRELOAD = 0x7FFFFFFF; // Biggest integer (32 bits)
@ -707,7 +707,7 @@ EDA_Rect ZONE_CONTAINER::GetBoundingBox() const
xmin = MIN( xmin, corner.x );
}
EDA_Rect ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
EDA_RECT ret( wxPoint( xmin, ymin ), wxSize( xmax - xmin + 1, ymax - ymin + 1 ) );
return ret;
}
@ -905,11 +905,11 @@ bool ZONE_CONTAINER::HitTestForEdge( const wxPoint& refPos )
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect contains the bounds of this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT contains the bounds of this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool ZONE_CONTAINER::HitTest( EDA_Rect& refArea )
bool ZONE_CONTAINER::HitTest( EDA_RECT& refArea )
{
bool is_out_of_box = false;

View File

@ -134,9 +134,9 @@ public:
/* Function GetBoundingBox
* @return an EDA_Rect that is the bounding box of the zone outline
* @return an EDA_RECT that is the bounding box of the zone outline
*/
EDA_Rect GetBoundingBox() const;
EDA_RECT GetBoundingBox() const;
/**
* Function Test_For_Copper_Island_And_Remove__Insulated_Islands
@ -149,11 +149,11 @@ public:
* Function CalculateSubAreaBoundaryBox
* Calculates the bounding box of a a filled area ( list of CPolyPt )
* use m_FilledPolysList as list of CPolyPt (that are the corners of one or more polygons or filled areas )
* @return an EDA_Rect as bounding box
* @return an EDA_RECT as bounding box
* @param aIndexStart = index of the first corner of a polygon (filled area) in m_FilledPolysList
* @param aIndexEnd = index of the last corner of a polygon in m_FilledPolysList
*/
EDA_Rect CalculateSubAreaBoundaryBox( int aIndexStart, int aIndexEnd );
EDA_RECT CalculateSubAreaBoundaryBox( int aIndexStart, int aIndexEnd );
/**
* Function IsOnCopperLayer
@ -260,11 +260,11 @@ public:
/**
* Function HitTest (overlayed)
* tests if the given EDA_Rect contains the bounds of this object.
* @param refArea : the given EDA_Rect
* tests if the given EDA_RECT contains the bounds of this object.
* @param refArea : the given EDA_RECT
* @return bool - true if a hit, else false
*/
bool HitTest( EDA_Rect& refArea );
bool HitTest( EDA_RECT& refArea );
/**
* Function Fill_Zone

View File

@ -242,7 +242,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
// to print floating point numbers like 1.3)
wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );
EDA_Rect tmp = panel->m_ClipBox;
EDA_RECT tmp = panel->m_ClipBox;
GRResetPenAndBrush( &dc );
GRForceBlackPen( m_ModeColorOption->GetSelection() == 0 ? false : true );
s_Parameters.m_DrillShapeOpt = PRINT_PARAMETERS::FULL_DRILL_SHAPE;

Some files were not shown because too many files have changed in this diff Show More