Browse Source

Don't truncate values on import

Leads to off-by-one errors when converting to internal values

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
6.0.7
Seth Hillbrand 4 years ago
parent
commit
c4a6a61743
  1. 2
      pcbnew/import_gfx/graphics_importer_pcbnew.cpp

2
pcbnew/import_gfx/graphics_importer_pcbnew.cpp

@ -45,7 +45,7 @@ GRAPHICS_IMPORTER_PCBNEW::GRAPHICS_IMPORTER_PCBNEW()
wxPoint GRAPHICS_IMPORTER_PCBNEW::MapCoordinate( const VECTOR2D& aCoordinate )
{
VECTOR2D coord = ( aCoordinate + GetImportOffsetMM() ) * ImportScalingFactor();
return wxPoint( (int) coord.x, (int) coord.y );
return wxPoint( KiROUND( coord.x ), KiROUND( coord.y ) );
}

Loading…
Cancel
Save