Kaydet (Commit) 8d64acdf authored tarafından Muthu Subramanian's avatar Muthu Subramanian

fdo#60638: Workaround should be in FillRects rather than FillPolygon.

Ported from: 5a1d7732
üst 1ffe3891
......@@ -893,10 +893,6 @@ namespace cppcanvas
EMFP_DEBUG (printf ("EMF+\t\tcolor fill:0x%X\n", brushIndexOrColor));
rState.isFillColorSet = true;
rState.isLineColorSet = false;
// n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF !
// Workaround for the problem.
if(brushIndexOrColor == 0xFFFFFFFF)
brushIndexOrColor = 0xFFFFFF;
SET_FILL_COLOR(brushIndexOrColor);
......@@ -1370,6 +1366,7 @@ namespace cppcanvas
sal_uInt32 brushIndexOrColor;
sal_Int32 rectangles;
bool isColor = (flags & 0x8000);
::basegfx::B2DPolygon polygon;
rMF >> brushIndexOrColor >> rectangles;
......@@ -1405,7 +1402,12 @@ namespace cppcanvas
::basegfx::B2DPolyPolygon polyPolygon (polygon);
EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, flags & 0x8000, brushIndexOrColor);
// n#812793: EMF+ Seems to specify transparent background with Alpha=0xFF !
// Workaround for the problem.
if( isColor && brushIndexOrColor == 0xFFFFFFFF && rectangles == 1 )
brushIndexOrColor = 0xFFFFFF;
EMFPPlusFillPolygon (polyPolygon, rFactoryParms, rState, rCanvas, isColor, brushIndexOrColor);
}
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