Commit de65a7a1 authored by Baranovskiy Konstantin's avatar Baranovskiy Konstantin Committed by Wayne Stambaugh

Fix border and title block line thickness plotting bug. (fixes lp:1261899)

parent 51d97658
...@@ -81,7 +81,6 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, ...@@ -81,7 +81,6 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
EDA_COLOR_T plotColor = plotter->GetColorMode() ? RED : BLACK; EDA_COLOR_T plotColor = plotter->GetColorMode() ? RED : BLACK;
plotter->SetColor( plotColor ); plotter->SetColor( plotColor );
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
WS_DRAW_ITEM_LIST drawList; WS_DRAW_ITEM_LIST drawList;
// Print only a short filename, if aFilename is the full filename // Print only a short filename, if aFilename is the full filename
...@@ -103,11 +102,14 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, ...@@ -103,11 +102,14 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; for( WS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item;
item = drawList.GetNext() ) item = drawList.GetNext() )
{ {
plotter->SetCurrentLineWidth( PLOTTER::DEFAULT_LINE_WIDTH );
switch( item->GetType() ) switch( item->GetType() )
{ {
case WS_DRAW_ITEM_BASE::wsg_line: case WS_DRAW_ITEM_BASE::wsg_line:
{ {
WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item; WS_DRAW_ITEM_LINE* line = (WS_DRAW_ITEM_LINE*) item;
plotter->SetCurrentLineWidth( line->GetPenWidth() );
plotter->MoveTo( line->GetStart() ); plotter->MoveTo( line->GetStart() );
plotter->FinishTo( line->GetEnd() ); plotter->FinishTo( line->GetEnd() );
} }
...@@ -116,7 +118,11 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, ...@@ -116,7 +118,11 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
case WS_DRAW_ITEM_BASE::wsg_rect: case WS_DRAW_ITEM_BASE::wsg_rect:
{ {
WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item; WS_DRAW_ITEM_RECT* rect = (WS_DRAW_ITEM_RECT*) item;
plotter->Rect( rect->GetStart(), rect->GetEnd(), NO_FILL ); } plotter->Rect( rect->GetStart(),
rect->GetEnd(),
NO_FILL,
rect->GetPenWidth() );
}
break; break;
case WS_DRAW_ITEM_BASE::wsg_text: case WS_DRAW_ITEM_BASE::wsg_text:
...@@ -135,7 +141,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock, ...@@ -135,7 +141,8 @@ void PlotWorkSheet( PLOTTER* plotter, const TITLE_BLOCK& aTitleBlock,
{ {
WS_DRAW_ITEM_POLYGON* poly = (WS_DRAW_ITEM_POLYGON*) item; WS_DRAW_ITEM_POLYGON* poly = (WS_DRAW_ITEM_POLYGON*) item;
plotter->PlotPoly( poly->m_Corners, plotter->PlotPoly( poly->m_Corners,
poly->IsFilled() ? FILLED_SHAPE : NO_FILL ); poly->IsFilled() ? FILLED_SHAPE : NO_FILL,
poly->GetPenWidth() );
} }
break; break;
......
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