Plot colored drawing sheet text with the correct color
This commit is contained in:
parent
5da5ccc4bf
commit
7978fdbfce
|
@ -73,7 +73,6 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
|
||||||
if( plotColor == COLOR4D::UNSPECIFIED )
|
if( plotColor == COLOR4D::UNSPECIFIED )
|
||||||
plotColor = COLOR4D( RED );
|
plotColor = COLOR4D( RED );
|
||||||
|
|
||||||
plotter->SetColor( plotColor );
|
|
||||||
DS_DRAW_ITEM_LIST drawList;
|
DS_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
|
||||||
|
@ -97,6 +96,7 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
|
||||||
// Draw item list
|
// Draw item list
|
||||||
for( DS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
|
for( DS_DRAW_ITEM_BASE* item = drawList.GetFirst(); item; item = drawList.GetNext() )
|
||||||
{
|
{
|
||||||
|
plotter->SetColor( plotColor );
|
||||||
plotter->SetCurrentLineWidth( PLOTTER::USE_DEFAULT_LINE_WIDTH );
|
plotter->SetCurrentLineWidth( PLOTTER::USE_DEFAULT_LINE_WIDTH );
|
||||||
|
|
||||||
switch( item->Type() )
|
switch( item->Type() )
|
||||||
|
@ -126,6 +126,7 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
|
||||||
{
|
{
|
||||||
DS_DRAW_ITEM_TEXT* text = (DS_DRAW_ITEM_TEXT*) item;
|
DS_DRAW_ITEM_TEXT* text = (DS_DRAW_ITEM_TEXT*) item;
|
||||||
KIFONT::FONT* font = text->GetFont();
|
KIFONT::FONT* font = text->GetFont();
|
||||||
|
COLOR4D color = plotColor;
|
||||||
|
|
||||||
if( !font )
|
if( !font )
|
||||||
{
|
{
|
||||||
|
@ -133,12 +134,15 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
|
||||||
text->IsItalic() );
|
text->IsItalic() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( plotter->GetColorMode() && text->GetTextColor() != COLOR4D::UNSPECIFIED )
|
||||||
|
color = text->GetTextColor();
|
||||||
|
|
||||||
int penWidth = std::max( text->GetEffectiveTextPenWidth(), defaultPenWidth );
|
int penWidth = std::max( text->GetEffectiveTextPenWidth(), defaultPenWidth );
|
||||||
|
|
||||||
plotter->Text( text->GetTextPos(), plotColor, text->GetShownText(),
|
plotter->Text( text->GetTextPos(), color, text->GetShownText(), text->GetTextAngle(),
|
||||||
text->GetTextAngle(), text->GetTextSize(), text->GetHorizJustify(),
|
text->GetTextSize(), text->GetHorizJustify(), text->GetVertJustify(),
|
||||||
text->GetVertJustify(), penWidth, text->IsItalic(), text->IsBold(),
|
penWidth, text->IsItalic(), text->IsBold(), text->IsMultilineAllowed(),
|
||||||
text->IsMultilineAllowed(), font );
|
font );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue