Commit d4bd033a authored by charras's avatar charras
Browse files

Pcbnew: print dialog: added pads drill option (like in plot dialog)

parent cee9ab76
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,7 @@ bool DrawPage( WinEDA_DrawPanel* panel )
        dc.SetClippingRegion( DrawArea );
        dc.SetClippingRegion( DrawArea );
    }
    }


    panel->PrintPage( &dc, Print_Sheet_Ref, -1, false );
    panel->PrintPage( &dc, Print_Sheet_Ref, -1, false, NULL );
    screen->m_IsPrinting = false;
    screen->m_IsPrinting = false;
    panel->m_ClipBox = tmp;
    panel->m_ClipBox = tmp;
    wxMetafile* mf = dc.Close();
    wxMetafile* mf = dc.Close();
+1 −1
Original line number Original line Diff line number Diff line
@@ -238,7 +238,7 @@ bool DIALOG_SVG_PRINT::DrawPage( const wxString& FullFileName,
    screen->m_IsPrinting = true;
    screen->m_IsPrinting = true;
    SetLocaleTo_C_standard( );   // Switch the locale to standard C (needed
    SetLocaleTo_C_standard( );   // Switch the locale to standard C (needed
                                 // to print floating point numbers like 1.3)
                                 // to print floating point numbers like 1.3)
    panel->PrintPage( &dc, aPrint_Sheet_Ref, 1, false );
    panel->PrintPage( &dc, aPrint_Sheet_Ref, 1, false, NULL );
    SetLocaleTo_Default( );      // revert to the current  locale
    SetLocaleTo_Default( );      // revert to the current  locale
    screen->m_IsPrinting = false;
    screen->m_IsPrinting = false;
    panel->m_ClipBox = tmp;
    panel->m_ClipBox = tmp;
+1 −1
Original line number Original line Diff line number Diff line
@@ -432,7 +432,7 @@ void EDA_Printout::DrawPage()
    screen->m_IsPrinting = true;
    screen->m_IsPrinting = true;
    int bg_color = g_DrawBgColor;
    int bg_color = g_DrawBgColor;


    panel->PrintPage( dc, m_Print_Sheet_Ref, 0xFFFFFFFF, false );
    panel->PrintPage( dc, m_Print_Sheet_Ref, 0xFFFFFFFF, false, NULL );


    g_DrawBgColor    = bg_color;
    g_DrawBgColor    = bg_color;
    screen->m_IsPrinting = false;
    screen->m_IsPrinting = false;
+10 −8
Original line number Original line Diff line number Diff line
@@ -104,20 +104,22 @@ void WinEDA_SchematicFrame::RedrawActiveWindow( wxDC* DC, bool EraseBg )
 * PrintPage
 * PrintPage
 * used to print a page.
 * used to print a page.
 * Print the page pointed by ActiveScreen, set by the calling print function
 * Print the page pointed by ActiveScreen, set by the calling print function
 * @param DC = wxDC given by the calling print function
 * @param aDC = wxDC given by the calling print function
 * @param Print_Sheet_Ref = true to print page references
 * @param aPrint_Sheet_Ref = true to print page references
 * @param PrintMask = not used here
 * @param aPrintMask = not used here
 * @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
 * @param aPrintMirrorMode = not used here (Set when printing in mirror mode)
 * @param aData = a pointer on an auxiliary data (not used here)
 */
 */
void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref,
void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref,
                                  int PrintMask, bool aPrintMirrorMode )
                                  int aPrintMask, bool aPrintMirrorMode,
                                    void * aData)
{
{
    wxBeginBusyCursor();
    wxBeginBusyCursor();


    RedrawStructList( this, DC, ActiveScreen->EEDrawList, GR_COPY );
    RedrawStructList( this, aDC, ActiveScreen->EEDrawList, GR_COPY );


    if( Print_Sheet_Ref )
    if( aPrint_Sheet_Ref )
        m_Parent->TraceWorkSheet( DC, ActiveScreen, g_DrawDefaultLineThickness );
        m_Parent->TraceWorkSheet( aDC, ActiveScreen, g_DrawDefaultLineThickness );


    wxEndBusyCursor();
    wxEndBusyCursor();
}
}
+15 −9
Original line number Original line Diff line number Diff line
@@ -25,11 +25,17 @@ static void Draw_Track_Buffer( WinEDA_DrawPanel* panel,
static void Affiche_DCodes_Pistes( WinEDA_DrawPanel* panel, wxDC* DC,
static void Affiche_DCodes_Pistes( WinEDA_DrawPanel* panel, wxDC* DC,
                            BOARD* Pcb, int drawmode );
                            BOARD* Pcb, int drawmode );


/************************************************************************************************************/
/** Function PrintPage
void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmasklayer, bool aPrintMirrorMode )
 * Used to print the board (on printer, or when creating SVF files).
/*************************************************************************************************************/
 * Print the board, but only layers allowed by aPrintMaskLayer
/* Draw gerbview layers, for printing
 * @param aDC = the print device context
 * @param aPrint_Sheet_Ref = true to print frame references
 * @param aPrint_Sheet_Ref = a 32 bits mask: bit n = 1 -> layer n is printed
 * @param aPrintMirrorMode = true to plot mirrored
 * @param aData = a pointer to an optional data (not used here: can be NULL)
 */
 */
void WinEDA_DrawPanel::PrintPage( wxDC* aDC, bool aPrint_Sheet_Ref, int aPrintmasklayer,
                                bool aPrintMirrorMode, void * aData )
{
{
    DISPLAY_OPTIONS save_opt;
    DISPLAY_OPTIONS save_opt;
    int DisplayPolygonsModeImg;
    int DisplayPolygonsModeImg;
@@ -46,10 +52,10 @@ void WinEDA_DrawPanel::PrintPage( wxDC* DC, bool Print_Sheet_Ref, int printmaskl


    m_PrintIsMirrored = aPrintMirrorMode;
    m_PrintIsMirrored = aPrintMirrorMode;


    ( (WinEDA_GerberFrame*) m_Parent )->Trace_Gerber( DC, GR_COPY, printmasklayer );
    ( (WinEDA_GerberFrame*) m_Parent )->Trace_Gerber( aDC, GR_COPY, aPrintmasklayer );


    if( Print_Sheet_Ref )
    if( aPrint_Sheet_Ref )
        m_Parent->TraceWorkSheet( DC, GetScreen(), 0 );
        m_Parent->TraceWorkSheet( aDC, GetScreen(), 0 );


    m_PrintIsMirrored = false;
    m_PrintIsMirrored = false;


Loading