Commit 61acac28 authored by jean-pierre charras's avatar jean-pierre charras

Add patch from Lorenzo Marcantonio. Fix some warning issues, and zlib issue...

Add patch from Lorenzo Marcantonio. Fix some warning issues, and zlib issue under Windows (zlib sources added)
parent ebcb6d3b
...@@ -257,6 +257,7 @@ set(INC_AFTER ...@@ -257,6 +257,7 @@ set(INC_AFTER
add_subdirectory(bitmaps_png) add_subdirectory(bitmaps_png)
add_subdirectory(common) add_subdirectory(common)
add_subdirectory(zlib)
add_subdirectory(3d-viewer) add_subdirectory(3d-viewer)
add_subdirectory(cvpcb) add_subdirectory(cvpcb)
add_subdirectory(eeschema) add_subdirectory(eeschema)
......
...@@ -7,6 +7,7 @@ include_directories( ...@@ -7,6 +7,7 @@ include_directories(
../3d-viewer ../3d-viewer
../pcbnew ../pcbnew
../polygon ../polygon
../zlib
${INC_AFTER} ${INC_AFTER}
) )
...@@ -42,6 +43,7 @@ set(COMMON_SRCS ...@@ -42,6 +43,7 @@ set(COMMON_SRCS
common_plot_functions.cpp common_plot_functions.cpp
common_plotHPGL_functions.cpp common_plotHPGL_functions.cpp
common_plotPS_functions.cpp common_plotPS_functions.cpp
common_plotPDF_functions.cpp
common_plotGERBER_functions.cpp common_plotGERBER_functions.cpp
common_plotDXF_functions.cpp common_plotDXF_functions.cpp
confirm.cpp confirm.cpp
......
...@@ -251,18 +251,18 @@ void BITMAP_BASE::Rotate( bool aRotateCCW ) ...@@ -251,18 +251,18 @@ void BITMAP_BASE::Rotate( bool aRotateCCW )
} }
void BITMAP_BASE::PlotImage( PLOTTER* aPlotter, void BITMAP_BASE::PlotImage( PLOTTER* aPlotter,
wxPoint aPos, const wxPoint& aPos,
int aDefaultColor, EDA_COLOR_T aDefaultColor,
int aDefaultPensize ) int aDefaultPensize )
{ {
if( m_image == NULL ) if( m_image == NULL )
return; return;
// These 2 lines are useful only fot plotters that cannot plot a bitmap // These 2 lines are useful only fot plotters that cannot plot a bitmap
// and plot arectangle instead of. // and plot arectangle instead of.
aPlotter->set_color( aDefaultColor ); aPlotter->SetColor( aDefaultColor );
aPlotter->set_current_line_width( aDefaultPensize ); aPlotter->SetCurrentLineWidth( aDefaultPensize );
aPlotter->PlotImage( *m_image, aPos, GetScalingFactor() ); aPlotter->PlotImage( *m_image, aPos, GetScalingFactor() );
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -164,13 +164,13 @@ static void DrawGraphicTextPline( ...@@ -164,13 +164,13 @@ static void DrawGraphicTextPline(
{ {
if( aPlotter ) if( aPlotter )
{ {
aPlotter->move_to( coord[0] ); aPlotter->MoveTo( coord[0] );
for( int ik = 1; ik < point_count; ik++ ) for( int ik = 1; ik < point_count; ik++ )
{ {
aPlotter->line_to( coord[ik] ); aPlotter->LineTo( coord[ik] );
} }
aPlotter->pen_finish(); aPlotter->PenFinish();
} }
else if( aCallback ) else if( aCallback )
{ {
...@@ -357,8 +357,8 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, ...@@ -357,8 +357,8 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
if( aPlotter ) if( aPlotter )
{ {
aPlotter->move_to( current_char_pos ); aPlotter->MoveTo( current_char_pos );
aPlotter->finish_to( end ); aPlotter->FinishTo( end );
} }
else if( aCallback ) else if( aCallback )
{ {
...@@ -515,7 +515,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel, ...@@ -515,7 +515,7 @@ void DrawGraphicText( EDA_DRAW_PANEL* aPanel,
* @param aItalic = true to simulate an italic font * @param aItalic = true to simulate an italic font
* @param aBold = true to use a bold font Useful only with default width value (aWidth = 0) * @param aBold = true to use a bold font Useful only with default width value (aWidth = 0)
*/ */
void PLOTTER::text( const wxPoint& aPos, void PLOTTER::Text( const wxPoint& aPos,
enum EDA_COLOR_T aColor, enum EDA_COLOR_T aColor,
const wxString& aText, const wxString& aText,
int aOrient, int aOrient,
...@@ -534,11 +534,11 @@ void PLOTTER::text( const wxPoint& aPos, ...@@ -534,11 +534,11 @@ void PLOTTER::text( const wxPoint& aPos,
else else
aWidth = -Clamp_Text_PenSize( -aWidth, aSize, aBold ); aWidth = -Clamp_Text_PenSize( -aWidth, aSize, aBold );
set_current_line_width( aWidth ); SetCurrentLineWidth( aWidth );
if( aColor >= 0 ) if( aColor >= 0 )
set_color( aColor ); SetColor( aColor );
DrawGraphicText( NULL, NULL, aPos, aColor, aText, DrawGraphicText( NULL, NULL, aPos, aColor, aText,
aOrient, aSize, aOrient, aSize,
......
...@@ -36,6 +36,8 @@ set(EESCHEMA_SRCS ...@@ -36,6 +36,8 @@ set(EESCHEMA_SRCS
dialogs/dialog_plot_schematic_HPGL_base.cpp dialogs/dialog_plot_schematic_HPGL_base.cpp
dialogs/dialog_plot_schematic_PS.cpp dialogs/dialog_plot_schematic_PS.cpp
dialogs/dialog_plot_schematic_PS_base.cpp dialogs/dialog_plot_schematic_PS_base.cpp
dialogs/dialog_plot_schematic_PDF.cpp
dialogs/dialog_plot_schematic_PDF_base.cpp
dialogs/annotate_dialog.cpp dialogs/annotate_dialog.cpp
dialogs/dialog_annotate_base.cpp dialogs/dialog_annotate_base.cpp
dialogs/dialog_lib_edit_text.cpp dialogs/dialog_lib_edit_text.cpp
...@@ -218,6 +220,7 @@ target_link_libraries(eeschema ...@@ -218,6 +220,7 @@ target_link_libraries(eeschema
kbool kbool
${wxWidgets_LIBRARIES} ${wxWidgets_LIBRARIES}
${GDI_PLUS_LIBRARIES} ${GDI_PLUS_LIBRARIES}
zlib
) )
install(TARGETS eeschema install(TARGETS eeschema
......
...@@ -391,8 +391,8 @@ void LIB_COMPONENT::Plot( PLOTTER* aPlotter, int aUnit, int aConvert, ...@@ -391,8 +391,8 @@ void LIB_COMPONENT::Plot( PLOTTER* aPlotter, int aUnit, int aConvert,
if( aConvert && item.m_Convert && ( item.m_Convert != aConvert ) ) if( aConvert && item.m_Convert && ( item.m_Convert != aConvert ) )
continue; continue;
aPlotter->set_color( ReturnLayerColor( LAYER_DEVICE ) ); aPlotter->SetColor( ReturnLayerColor( LAYER_DEVICE ) );
bool fill = aPlotter->get_color_mode(); bool fill = aPlotter->GetColorMode();
item.Plot( aPlotter, aOffset, fill, aTransform ); item.Plot( aPlotter, aOffset, fill, aTransform );
} }
......
...@@ -185,14 +185,12 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( ) ...@@ -185,14 +185,12 @@ void DIALOG_PLOT_SCHEMATIC_DXF::CreateDXFFile( )
sheetpath = SheetList.GetNext(); sheetpath = SheetList.GetNext();
} }
double scale = 10;
plot_offset.x = 0; plot_offset.x = 0;
plot_offset.y = 0; plot_offset.y = 0;
plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".dxf" ); plotFileName = schframe->GetUniqueFilenameForCurrentSheet() + wxT( ".dxf" );
PlotOneSheetDXF( plotFileName, screen, plot_offset, scale ); PlotOneSheetDXF( plotFileName, screen, plot_offset, 1 );
if( !m_select_PlotAll ) if( !m_select_PlotAll )
break; break;
...@@ -232,24 +230,24 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName, ...@@ -232,24 +230,24 @@ void DIALOG_PLOT_SCHEMATIC_DXF::PlotOneSheetDXF( const wxString& FileName,
const PAGE_INFO& pageInfo = screen->GetPageSettings(); const PAGE_INFO& pageInfo = screen->GetPageSettings();
plotter->SetPageSettings( pageInfo ); plotter->SetPageSettings( pageInfo );
plotter->set_viewport( plot_offset, scale, 0 ); plotter->SetViewport( plot_offset, IU_PER_DECIMILS, scale, 0 );
plotter->set_color_mode( m_plotColorOpt ); plotter->SetColorMode( m_plotColorOpt );
// Init : // Init :
plotter->set_creator( wxT( "Eeschema-DXF" ) ); plotter->SetCreator( wxT( "Eeschema-DXF" ) );
plotter->set_filename( FileName ); plotter->SetFilename( FileName );
plotter->start_plot( output_file ); plotter->StartPlot( output_file );
if( m_plot_Sheet_Ref ) if( m_plot_Sheet_Ref )
{ {
plotter->set_color( BLACK ); plotter->SetColor( BLACK );
m_Parent->PlotWorkSheet( plotter, screen ); m_Parent->PlotWorkSheet( plotter, screen );
} }
screen->Plot( plotter ); screen->Plot( plotter );
// finish // finish
plotter->end_plot(); plotter->EndPlot();
delete plotter; delete plotter;
m_MsgBox->AppendText( wxT( "Ok\n" ) ); m_MsgBox->AppendText( wxT( "Ok\n" ) );
......
This diff is collapsed.
...@@ -270,12 +270,12 @@ void LIB_BEZIER::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, ...@@ -270,12 +270,12 @@ void LIB_BEZIER::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR ) if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{ {
aPlotter->set_color( ReturnLayerColor( LAYER_DEVICE_BACKGROUND ) ); aPlotter->SetColor( ReturnLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 ); aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 );
} }
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
aPlotter->set_color( ReturnLayerColor( LAYER_DEVICE ) ); aPlotter->SetColor( ReturnLayerColor( LAYER_DEVICE ) );
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -241,13 +241,13 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill, ...@@ -241,13 +241,13 @@ void LIB_POLYLINE::Plot( PLOTTER* aPlotter, const wxPoint& aOffset, bool aFill,
if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR ) if( aFill && m_Fill == FILLED_WITH_BG_BODYCOLOR )
{ {
aPlotter->set_color( ReturnLayerColor( LAYER_DEVICE_BACKGROUND ) ); aPlotter->SetColor( ReturnLayerColor( LAYER_DEVICE_BACKGROUND ) );
aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 ); aPlotter->PlotPoly( cornerList, FILLED_WITH_BG_BODYCOLOR, 0 );
aFill = false; // body is now filled, do not fill it later. aFill = false; // body is now filled, do not fill it later.
} }
bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR; bool already_filled = m_Fill == FILLED_WITH_BG_BODYCOLOR;
aPlotter->set_color( ReturnLayerColor( LAYER_DEVICE ) ); aPlotter->SetColor( ReturnLayerColor( LAYER_DEVICE ) );
aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() ); aPlotter->PlotPoly( cornerList, already_filled ? NO_FILL : m_Fill, GetPenSize() );
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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