All triangular trapezoid pads

A triangular trapezoid will have the deltaX/deltaY of the same size as
the length of that axis.  This creates a three-point polygon, which is
perfectly valid for our use
This commit is contained in:
Seth Hillbrand 2022-03-22 13:38:36 -07:00
parent 207820e112
commit 4e98ce87c7
1 changed files with 4 additions and 4 deletions

View File

@ -1749,25 +1749,25 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad )
else else
delta.y = m_trapDelta.GetValue(); delta.y = m_trapDelta.GetValue();
if( delta.x < 0 && delta.x <= -aPad->GetSize().y ) if( delta.x < 0 && delta.x < -aPad->GetSize().y )
{ {
delta.x = -aPad->GetSize().y + 2; delta.x = -aPad->GetSize().y + 2;
error = true; error = true;
} }
if( delta.x > 0 && delta.x >= aPad->GetSize().y ) if( delta.x > 0 && delta.x > aPad->GetSize().y )
{ {
delta.x = aPad->GetSize().y - 2; delta.x = aPad->GetSize().y - 2;
error = true; error = true;
} }
if( delta.y < 0 && delta.y <= -aPad->GetSize().x ) if( delta.y < 0 && delta.y < -aPad->GetSize().x )
{ {
delta.y = -aPad->GetSize().x + 2; delta.y = -aPad->GetSize().x + 2;
error = true; error = true;
} }
if( delta.y > 0 && delta.y >= aPad->GetSize().x ) if( delta.y > 0 && delta.y > aPad->GetSize().x )
{ {
delta.y = aPad->GetSize().x - 2; delta.y = aPad->GetSize().x - 2;
error = true; error = true;