Commit 737ef50c authored by jean-pierre charras's avatar jean-pierre charras
Browse files

Plot SVG: fix issue with arcs (bug #1328155 ) both in Pcbnew and Eeschema.

parent 8cb34232
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -346,7 +346,7 @@ void SVG_PLOTTER::Arc( const wxPoint& centre, double StAngle, double EndAngle, i
    DPOINT  centre_dev  = userToDeviceCoordinates( centre );
    DPOINT  centre_dev  = userToDeviceCoordinates( centre );
    double  radius_dev  = userToDeviceSize( radius );
    double  radius_dev  = userToDeviceSize( radius );


    if( m_yaxisReversed )   // Should be always the case
    if( !m_yaxisReversed )   // Should be never the case
    {
    {
        double tmp  = StAngle;
        double tmp  = StAngle;
        StAngle     = -EndAngle;
        StAngle     = -EndAngle;
+1 −7
Original line number Original line Diff line number Diff line
@@ -394,15 +394,9 @@ void BRDITEMS_PLOTTER::Plot_1_EdgeModule( EDGE_MODULE* aEdge )
    case S_ARC:
    case S_ARC:
    {
    {
        radius = KiROUND( GetLineLength( end, pos ) );
        radius = KiROUND( GetLineLength( end, pos ) );

        double startAngle  = ArcTangente( end.y - pos.y, end.x - pos.x );
        double startAngle  = ArcTangente( end.y - pos.y, end.x - pos.x );

        double endAngle = startAngle + aEdge->GetAngle();
        double endAngle = startAngle + aEdge->GetAngle();


        if ( ( GetFormat() == PLOT_FORMAT_DXF ) &&
             ( m_layerMask & ( SILKSCREEN_LAYER_BACK | DRAW_LAYER | COMMENT_LAYER ) ) )
            m_plotter->ThickArc( pos, -startAngle, -endAngle, radius, thickness, GetMode() );
        else
        m_plotter->ThickArc( pos, -endAngle, -startAngle, radius, thickness, GetMode() );
        m_plotter->ThickArc( pos, -endAngle, -startAngle, radius, thickness, GetMode() );
    }
    }
    break;
    break;