Alexander's patches, with refinements

This commit is contained in:
Alexander Zakamaldin
2012-03-26 16:45:05 -05:00
committed by Dick Hollenbeck
parent acc07c338c
commit 625e964c8d
24 changed files with 1732 additions and 836 deletions
+19
View File
@@ -604,3 +604,22 @@ void PS_PLOTTER::flash_pad_trapez( wxPoint aPadPos, wxPoint aCorners[4],
cornerList.push_back( cornerList[0] );
PlotPoly( cornerList, ( aTrace_Mode == FILLED ) ? FILLED_SHAPE : NO_FILL );
}
void PS_PLOTTER::user_to_device_coordinates( wxPoint& pos )
{
if( pageInfo.IsPortrait() )
{
pos.y = (int) ( ( paper_size.y - ( pos.y - plot_offset.y )
* plot_scale ) * device_scale );
if( plotMirror )
pos.x = (int) ( ( paper_size.x - ( pos.x - plot_offset.x )
* plot_scale ) * device_scale );
else
pos.x = (int) ( (pos.x - plot_offset.x) * plot_scale * device_scale );
}
else
PLOTTER::user_to_device_coordinates( pos );
}