Commit 7ceb3d11 authored by Andreas Beutling's avatar Andreas Beutling Committed by Dick Hollenbeck

fix some errors in common_plotHPGL_functions.cpp

parent 619125f9
...@@ -393,14 +393,16 @@ void HPGL_PLOTTER::Arc( const wxPoint& centre, int StAngle, int EndAngle, int ra ...@@ -393,14 +393,16 @@ void HPGL_PLOTTER::Arc( const wxPoint& centre, int StAngle, int EndAngle, int ra
DPOINT centre_dev = userToDeviceCoordinates( centre ); DPOINT centre_dev = userToDeviceCoordinates( centre );
if( plotMirror ) if( plotMirror )
angle = (StAngle - EndAngle) / 10.0; angle = StAngle - EndAngle;
else else
angle = (EndAngle - StAngle) / 10.0; angle = EndAngle - StAngle;
NORMALIZE_ANGLE_180( angle );
angle /= 10;
// Calculate start point, // Calculate start point,
wxPoint cmap; wxPoint cmap;
cmap.x = (int) ( centre.x + ( radius * cos( RAD2DEG( StAngle / 10.0 ) ) ) ); cmap.x = int( centre.x + ( radius * cos( DEG2RAD( StAngle / 10.0 ) ) ) );
cmap.y = (int) ( centre.y - ( radius * sin( RAD2DEG( StAngle / 10.0 ) ) ) ); cmap.y = int( centre.y - ( radius * sin( DEG2RAD( StAngle / 10.0 ) ) ) );
DPOINT cmap_dev = userToDeviceCoordinates( cmap ); DPOINT cmap_dev = userToDeviceCoordinates( cmap );
fprintf( outputFile, fprintf( outputFile,
...@@ -478,7 +480,7 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre, ...@@ -478,7 +480,7 @@ void HPGL_PLOTTER::FlashPadCircle( const wxPoint& pos, int diametre,
double rsize = userToDeviceSize( radius ); double rsize = userToDeviceSize( radius );
fprintf( outputFile, "PA %.0f,%.0fd;CI %.0f;\n", fprintf( outputFile, "PA %.0f,%.0f;CI %.0f;\n",
pos_dev.x, pos_dev.y, rsize ); pos_dev.x, pos_dev.y, rsize );
if( trace_mode == FILLED ) // Plot in filled mode. if( trace_mode == FILLED ) // Plot in filled mode.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment