Commit ec5e682e authored by jp's avatar jp
Browse files

fixed some issues in SVG export.

parent bd381d94
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -262,6 +262,7 @@ set(BITMAP_SRCS
    new.xpm
    new.xpm
    noconn.xpm
    noconn.xpm
    Normal.xpm
    Normal.xpm
    online_help.xpm
    Open_Library.xpm
    Open_Library.xpm
    Open_Project.xpm
    Open_Project.xpm
    open.xpm
    open.xpm
+2 −2
Original line number Original line Diff line number Diff line
@@ -157,8 +157,8 @@ void wxSVGFileDC::Init( wxString f, int Width, int Height, float dpi )
        write( s );
        write( s );
        s.Printf( wxT( "  version=\"1.1\"\n" ) );
        s.Printf( wxT( "  version=\"1.1\"\n" ) );
        write( s );
        write( s );
        s.Printf( wxT( "  width=\"%.2gcm\" height=\"%.2gcm\" viewBox=\"0 0 %d %d \"\n" ),
        s.Printf( wxT( "  width=\"%gin\" height=\"%gin\" viewBox=\"0 0 %d %d \"\n" ),
                  float (Width) / dpi * 2.54, float (Height) / dpi * 2.54, Width, Height );
                  double (Width) / dpi, double (Height) / dpi, Width, Height );
        write( s );
        write( s );
        s.Printf( wxT( ">\n" ) );
        s.Printf( wxT( ">\n" ) );
        write( s );
        write( s );
+1 −1
Original line number Original line Diff line number Diff line
@@ -80,7 +80,7 @@ void WinEDA_CvpcbFrame::ReCreateMenuBar()
    wxMenu* helpMenu = new wxMenu;
    wxMenu* helpMenu = new wxMenu;
    item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
    item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
                           _( "Open the cvpcb manual" ) );
                           _( "Open the cvpcb manual" ) );
    item->SetBitmap( help_xpm );
    item->SetBitmap( online_help_xpm );
    helpMenu->Append( item );
    helpMenu->Append( item );


    /* About on all platforms except WXMAC */
    /* About on all platforms except WXMAC */
+6 −4
Original line number Original line Diff line number Diff line
@@ -230,12 +230,16 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame,
    old_org = screen->m_DrawOrg;
    old_org = screen->m_DrawOrg;
    screen->m_DrawOrg.x   = screen->m_DrawOrg.y = 0;
    screen->m_DrawOrg.x   = screen->m_DrawOrg.y = 0;
    screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
    screen->m_StartVisu.x = screen->m_StartVisu.y = 0;
    SheetSize    = screen->ReturnPageSize( );
    SheetSize    = screen->ReturnPageSize( );           // page size in 1/1000 inch, ie in internal units


    screen->SetScalingFactor( 1.0 );
    screen->SetScalingFactor( 1.0 );
    WinEDA_DrawPanel* panel = frame->DrawPanel;
    WinEDA_DrawPanel* panel = frame->DrawPanel;


    wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y );
    SetLocaleTo_C_standard( );   // Switch the locale to standard C (needed
                                 // to print floating point numbers like 1.3)

    float dpi = (float)frame->m_InternalUnits;
    wxSVGFileDC dc( FullFileName, SheetSize.x, SheetSize.y, dpi );


    EDA_Rect tmp = panel->m_ClipBox;
    EDA_Rect tmp = panel->m_ClipBox;
    GRResetPenAndBrush( &dc );
    GRResetPenAndBrush( &dc );
@@ -248,8 +252,6 @@ bool DIALOG_SVG_PRINT::DrawSVGPage( WinEDA_DrawFrame * frame,
    panel->m_ClipBox.SetHeight( 0x7FFFFF0 );
    panel->m_ClipBox.SetHeight( 0x7FFFFF0 );


    screen->m_IsPrinting = true;
    screen->m_IsPrinting = true;
    SetLocaleTo_C_standard( );   // Switch the locale to standard C (needed
                                 // to print floating point numbers like 1.3)
    frame->PrintPage( &dc, aPrint_Sheet_Ref, 1, false );
    frame->PrintPage( &dc, aPrint_Sheet_Ref, 1, false );
    SetLocaleTo_Default( );      // revert to the current  locale
    SetLocaleTo_Default( );      // revert to the current  locale
    screen->m_IsPrinting = false;
    screen->m_IsPrinting = false;
+1 −1
Original line number Original line Diff line number Diff line
@@ -429,7 +429,7 @@ void WinEDA_SchematicFrame::ReCreateMenuBar()
    wxMenu* helpMenu = new wxMenu;
    wxMenu* helpMenu = new wxMenu;
    item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
    item = new wxMenuItem( helpMenu, ID_GENERAL_HELP, _( "&Contents" ),
                           _( "Open the eeschema manual" ) );
                           _( "Open the eeschema manual" ) );
    item->SetBitmap( help_xpm );
    item->SetBitmap( online_help_xpm );
    helpMenu->Append( item );
    helpMenu->Append( item );


    /* About on all platforms except WXMAC */
    /* About on all platforms except WXMAC */
Loading