Fix float scaling to use single fn
Function `scaletoIU` was updated in a8c275ae5d
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
This commit is contained in:
parent
bfd5afd6c8
commit
d937abb5b8
|
@ -110,11 +110,7 @@ wxPoint GERBER_FILE_IMAGE::ReadXYCoord( char*& aText, bool aExcellonMode )
|
||||||
|
|
||||||
if( is_float )
|
if( is_float )
|
||||||
{
|
{
|
||||||
// When X or Y (or A) values are float numbers, they are given in mm or inches
|
current_coord = scaletoIU( val, m_GerbMetric );
|
||||||
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 );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -202,11 +198,7 @@ wxPoint GERBER_FILE_IMAGE::ReadIJCoord( char*& aText )
|
||||||
|
|
||||||
if( is_float )
|
if( is_float )
|
||||||
{
|
{
|
||||||
// When X or Y (or A) values are float numbers, they are given in mm or inches
|
current_coord = scaletoIU( val, m_GerbMetric );
|
||||||
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 );
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue