Fix float scaling to use single fn
Function `scaletoIU` was updated ina8c275ae5d
but this missed other conversion points that re-implemented the same routine. This unifies the scaling for both ReadIJCoord and ReadXYCoord to use the same routine as calls from am_primitive Fixes https://gitlab.com/kicad/code/kicad/issues/10800 (cherry picked from commitd937abb5b8
)
This commit is contained in:
parent
082c6f5bd6
commit
79f5325697
|
@ -110,11 +110,7 @@ VECTOR2I GERBER_FILE_IMAGE::ReadXYCoord( char*& aText, bool aExcellonMode )
|
|||
|
||||
if( is_float )
|
||||
{
|
||||
// When X or Y (or A) values are float numbers, they are given in mm or inches
|
||||
if( m_GerbMetric ) // units are mm
|
||||
current_coord = KiROUND( val * GERB_IU_PER_MM );
|
||||
else // units are inches
|
||||
current_coord = KiROUND( val * GERB_IU_PER_MM * 0.0254 );
|
||||
current_coord = scaletoIU( val, m_GerbMetric );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -202,11 +198,7 @@ VECTOR2I GERBER_FILE_IMAGE::ReadIJCoord( char*& aText )
|
|||
|
||||
if( is_float )
|
||||
{
|
||||
// When X or Y (or A) values are float numbers, they are given in mm or inches
|
||||
if( m_GerbMetric ) // units are mm
|
||||
current_coord = KiROUND( val * GERB_IU_PER_MM );
|
||||
else // units are inches
|
||||
current_coord = KiROUND( val * GERB_IU_PER_MM * 0.0254 );
|
||||
current_coord = scaletoIU( val, m_GerbMetric );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue