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
+3 -3
View File
@@ -321,7 +321,7 @@ void SVG_PLOTTER::Circle( const wxPoint& pos, int diametre, FILL_T fill, int wid
}
void SVG_PLOTTER::Arc( const wxPoint& centre, int StAngle, int EndAngle, int radius,
void SVG_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, int radius,
FILL_T fill, int width )
{
/* Draws an arc of a circle, centred on (xc,yc), with starting point
@@ -347,7 +347,7 @@ void SVG_PLOTTER::Arc( const wxPoint& centre, int StAngle, int EndAngle, int rad
if( !plotMirror )
{
int tmp = StAngle;
double tmp = StAngle;
StAngle = -EndAngle;
EndAngle = -tmp;
}
@@ -550,7 +550,7 @@ bool SVG_PLOTTER::EndPlot()
void SVG_PLOTTER::Text( const wxPoint& aPos,
enum EDA_COLOR_T aColor,
const wxString& aText,
int aOrient,
double aOrient,
const wxSize& aSize,
enum EDA_TEXT_HJUSTIFY_T aH_justify,
enum EDA_TEXT_VJUSTIFY_T aV_justify,