Migrated the interfaces accepting angles to the double type

The plan goes like this:
- eeschema still uses int in decidegrees
- all the other things internally use double in decidegrees (or radians
  in temporaries)
- in pcbnew UI the unit is *still* int in decidegrees

The idea is to have better precision everywhere while keeping the user with int i
angles. Hopefully, if a fractional angle doesn't come in from the outside, everything
should *look* like an integer angle (unless I forgot something and it broke)

When the time comes, simply updating the UI for allowing doubles from the user should
be enough to get arbitrary angles in pcbnew.
This commit is contained in:
Lorenzo Marcantonio
2013-05-05 09:17:48 +02:00
parent 5399b6f438
commit 1e1c2cbb7d
51 changed files with 198 additions and 198 deletions
+4 -4
View File
@@ -282,7 +282,7 @@ void GERBER_PLOTTER::Circle( const wxPoint& aCenter, int aDiameter, FILL_T aFill
}
void GERBER_PLOTTER::Arc( const wxPoint& aCenter, int aStAngle, int aEndAngle,
void GERBER_PLOTTER::Arc( const wxPoint& aCenter, double aStAngle, double aEndAngle,
int aRadius, FILL_T aFill, int aWidth )
{
wxASSERT( outputFile );
@@ -370,7 +370,7 @@ void GERBER_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
/**
* Filled oval flashes are handled as aperture in the 90 degree positions only
*/
void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, int orient,
void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, double orient,
EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
@@ -427,7 +427,7 @@ void GERBER_PLOTTER::FlashPadOval( const wxPoint& pos, const wxSize& aSize, int
* Filled rect flashes are handled as aperture in the 90 degree positions only
*/
void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
int orient, EDA_DRAW_MODE_T trace_mode )
double orient, EDA_DRAW_MODE_T trace_mode )
{
wxASSERT( outputFile );
@@ -494,7 +494,7 @@ void GERBER_PLOTTER::FlashPadRect( const wxPoint& pos, const wxSize& aSize,
* they require aperture macros
*/
void GERBER_PLOTTER::FlashPadTrapez( const wxPoint& aPadPos, const wxPoint* aCorners,
int aPadOrient, EDA_DRAW_MODE_T aTrace_Mode )
double aPadOrient, EDA_DRAW_MODE_T aTrace_Mode )
{
// XXX to do: use an aperture macro to declare the pad