Fix incorrect shape of trapezoidal pad shapes. They were not the same as stable branch.
This commit is contained in:
parent
047e95ccc4
commit
4cf5662ea1
|
@ -554,10 +554,10 @@ void D_PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
int ddy = GetShape() == PAD_SHAPE_TRAPEZOID ? m_DeltaSize.y / 2 : 0;
|
||||
|
||||
wxPoint corners[4];
|
||||
corners[0] = wxPoint( -dx + ddy, dy + ddx );
|
||||
corners[1] = wxPoint( dx - ddy, dy - ddx );
|
||||
corners[2] = wxPoint( dx + ddy, -dy + ddx );
|
||||
corners[3] = wxPoint( -dx - ddy, -dy - ddx );
|
||||
corners[0] = wxPoint( -dx - ddy, dy + ddx );
|
||||
corners[1] = wxPoint( dx + ddy, dy - ddx );
|
||||
corners[2] = wxPoint( dx - ddy, -dy + ddx );
|
||||
corners[3] = wxPoint( -dx + ddy, -dy - ddx );
|
||||
|
||||
SHAPE_POLY_SET outline;
|
||||
outline.NewOutline();
|
||||
|
|
|
@ -319,10 +319,10 @@ void D_PAD::BuildEffectiveShapes() const
|
|||
|
||||
SHAPE_LINE_CHAIN corners;
|
||||
|
||||
corners.Append( -half_size.x + trap_delta.y, -half_size.y - trap_delta.x );
|
||||
corners.Append( half_size.x - trap_delta.y, -half_size.y + trap_delta.x );
|
||||
corners.Append( half_size.x + trap_delta.y, half_size.y - trap_delta.x );
|
||||
corners.Append( -half_size.x - trap_delta.y, half_size.y + trap_delta.x );
|
||||
corners.Append( half_size.x + trap_delta.y, half_size.y - trap_delta.x );
|
||||
corners.Append( half_size.x - trap_delta.y, -half_size.y + trap_delta.x );
|
||||
corners.Append( -half_size.x + trap_delta.y, -half_size.y - trap_delta.x );
|
||||
|
||||
corners.Rotate( -DECIDEG2RAD( m_Orient ) );
|
||||
corners.Move( shapePos );
|
||||
|
|
Loading…
Reference in New Issue