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