Kaydet (Commit) e3ec94e6 authored tarafından Armin Le Grand's avatar Armin Le Grand

#116162# Forced DRAWMODE_WHITEFILL to DRAWMODE_BLACKFILL during line geometry…

#116162# Forced DRAWMODE_WHITEFILL to DRAWMODE_BLACKFILL during line geometry processing to get line geometry rendered black (as intended) in b&w mode (e.g. print preview)
üst 95262e18
......@@ -1287,8 +1287,34 @@ namespace drawinglayer
&rStrokeArrowPrimitive.getStart(),
&rStrokeArrowPrimitive.getEnd());
// write LineGeometry start marker
impStartSvtGraphicStroke(pSvtGraphicStroke);
// #116162# When B&W is set as DrawMode, DRAWMODE_WHITEFILL is used
// to let all fills be just white; for lines DRAWMODE_BLACKLINE is used
// so all line geometry is supposed to get black. Since in the in-between
// stages of line geometry drawing filled polygons are used (e.g. line
// start/ends) it is necessary to change these drawmodes to preserve
// that lines shall be black; thus change DRAWMODE_WHITEFILL to
// DRAWMODE_BLACKFILL during line geometry processing to have line geometry
// parts filled black.
const sal_uLong nOldDrawMode(mpOutputDevice->GetDrawMode());
const bool bDrawmodeChange(nOldDrawMode & DRAWMODE_WHITEFILL && mnSvtGraphicStrokeCount);
if(bDrawmodeChange)
{
mpOutputDevice->SetDrawMode((nOldDrawMode & ~DRAWMODE_WHITEFILL) | DRAWMODE_BLACKFILL);
}
// process sub-line geometry (evtl. filled PolyPolygons)
process(rCandidate.get2DDecomposition(getViewInformation2D()));
if(bDrawmodeChange)
{
mpOutputDevice->SetDrawMode(nOldDrawMode);
}
// write LineGeometry end marker
impEndSvtGraphicStroke(pSvtGraphicStroke);
}
......
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