~cern-kicad/kicad/kicad-pns-tom

« back to all changes in this revision

Viewing changes to common/common_plot_functions.cpp

  • Committer: Maciej Suminski
  • Date: 2013-08-02 13:57:24 UTC
  • mfrom: (4024.1.238 kicad)
  • mto: This revision was merged to the branch mainline in revision 4221.
  • Revision ID: maciej.suminski@cern.ch-20130802135724-gix6orezshkukodv
Upstream merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    /* Note: Page sizes values are given in mils
78
78
     */
79
79
    double   iusPerMil = plotter->GetIUsPerDecimil() * 10.0;
80
 
    wxSize   pageSize = aPageInfo.GetSizeMils();  // in mils
81
 
 
82
 
    wxPoint LTmargin;
83
 
    LTmargin.x = aPageInfo.GetLeftMarginMils() * iusPerMil;
84
 
    LTmargin.y = aPageInfo.GetTopMarginMils()  * iusPerMil;
85
 
 
86
 
    wxPoint RBmargin;
87
 
    RBmargin.x = aPageInfo.GetRightMarginMils() * iusPerMil;
88
 
    RBmargin.y = aPageInfo.GetBottomMarginMils()  * iusPerMil;
89
80
 
90
81
    EDA_COLOR_T plotColor = plotter->GetColorMode() ? RED : BLACK;
91
82
    plotter->SetColor( plotColor );
92
83
    plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
93
84
    WS_DRAW_ITEM_LIST drawList;
94
85
 
 
86
    // Print only a short filename, if aFilename is the full filename
 
87
    wxFileName fn( aFilename );
 
88
 
95
89
    // Prepare plot parameters
96
 
    drawList.SetMargins( LTmargin, RBmargin);
97
90
    drawList.SetPenSize(PLOTTER::DEFAULT_LINE_WIDTH );
98
91
    drawList.SetMilsToIUfactor( iusPerMil );
99
 
    drawList.SetPageSize( pageSize );
100
92
    drawList.SetSheetNumber( aSheetNumber );
101
93
    drawList.SetSheetCount( aNumberOfSheets );
102
 
 
103
 
    // Print only a short filename, if aFilename is the full filename
104
 
 
105
 
    wxFileName fn( aFilename );
106
 
 
107
 
    drawList.BuildWorkSheetGraphicList( aPageInfo.GetType(), fn.GetFullName(),
108
 
                               aSheetDesc, aTitleBlock, plotColor, plotColor );
 
94
    drawList.SetFileName( fn.GetFullName() );   // Print only the short filename
 
95
    drawList.SetSheetName( aSheetDesc );
 
96
 
 
97
 
 
98
    drawList.BuildWorkSheetGraphicList( aPageInfo,
 
99
                            aTitleBlock, plotColor, plotColor );
109
100
 
110
101
    // Draw item list
111
102
    for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item;