Commit 1fd73dff authored by charras's avatar charras

Plot PS function now properly plots all sheets in a complex hierarchy.

parent 00dadcbb
......@@ -57,9 +57,9 @@ void Setg_Plot_PlotOffset( wxPoint offset )
}
/*******************************************************/
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen )
/*******************************************************/
/**************************************************************************/
void WinEDA_DrawFrame::PlotWorkSheet( int format_plot, BASE_SCREEN* screen )
/**************************************************************************/
/* Plot sheet references
* margin is in mils (1/1000 inch)
......@@ -400,8 +400,7 @@ void PlotWorkSheet( int format_plot, BASE_SCREEN* screen )
break;
case WS_FULLSHEETNAME:
// msg += GetScreenDesc();
msg += GetScreenDesc();
break;
case WS_COMPANY_NAME:
......
......@@ -608,7 +608,7 @@ void WinEDA_PlotHPGLFrame::Plot_1_Page_HPGL( const wxString& FullFileName,
/* Init : */
PrintHeaderHPGL( PlotOutput, g_HPGL_Pen_Descr.m_Pen_Speed, g_HPGL_Pen_Descr.m_Pen_Num );
PlotWorkSheet( PLOT_FORMAT_HPGL, screen );
m_Parent->PlotWorkSheet( PLOT_FORMAT_HPGL, screen );
DrawList = screen->EEDrawList;
while( DrawList ) /* tracage */
......
This diff is collapsed.
......@@ -73,7 +73,7 @@ class WinEDA_PlotPSFrame: public wxDialog
public:
/// Constructors
WinEDA_PlotPSFrame( );
WinEDA_PlotPSFrame( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PLOTPSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PLOTPSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PLOTPSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PLOTPSFRAME_SIZE, long style = SYMBOL_WINEDA_PLOTPSFRAME_STYLE );
WinEDA_PlotPSFrame( WinEDA_DrawFrame* parent, wxWindowID id = SYMBOL_WINEDA_PLOTPSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PLOTPSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PLOTPSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PLOTPSFRAME_SIZE, long style = SYMBOL_WINEDA_PLOTPSFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_PLOTPSFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_PLOTPSFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_PLOTPSFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_PLOTPSFRAME_SIZE, long style = SYMBOL_WINEDA_PLOTPSFRAME_STYLE );
......@@ -106,7 +106,7 @@ public:
void InitOptVars();
void CreatePSFile(int AllPages, int pagesize);
void PlotOneSheetPS(const wxString & FileName,
BASE_SCREEN * screen, Ki_PageDescr * sheet, int BBox[4], wxPoint plot_offset);
SCH_SCREEN * screen, Ki_PageDescr * sheet, int BBox[4], wxPoint plot_offset);
/// Should we show tooltips?
static bool ShowToolTips();
......@@ -119,6 +119,7 @@ public:
wxBoxSizer* m_DefaultLineSizeCtrlSizer;
wxTextCtrl* m_MsgBox;
////@end WinEDA_PlotPSFrame member variables
WinEDA_DrawFrame * m_Parent;
WinEDA_ValueCtrl * m_DefaultLineSizeCtrl;
};
......
......@@ -46,7 +46,7 @@ extern int g_Plot_PlotOrientOptions, g_Plot_PenState;
void SetPlotScale( double aXScale, double aYScale ); // Set the plot scale for the current plotting)
void Setg_Plot_PlotOffset( wxPoint offset ); // Set the plot offset for the current plotting)
void InitPlotParametresGERBER( wxPoint offset, double aXScale, double aYScale );
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen );
// void PlotWorkSheet( int format_plot, BASE_SCREEN* screen ); now a member of WinEDA_DrawFrame
void UserToDeviceCoordinate( wxPoint& pos );
// modifie les coord pos.x et pos.y pour le trace selon l'orientation, l'echelle, les offsets de trace
......
......@@ -279,6 +279,8 @@ public:
void OnActivate( wxActivateEvent& event );
void ReDrawPanel();
void TraceWorkSheet( wxDC* DC, BASE_SCREEN* screen, int line_width );
void PlotWorkSheet( int format_plot, BASE_SCREEN* screen );
/** Function GetXYSheetReferences
* Return the X,Y sheet references where the point position is located
* @param aScreen = screen to use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment