diff options
Diffstat (limited to 'drawinglayer/source/processor2d/vclprocessor2d.cxx')
-rw-r--r-- | drawinglayer/source/processor2d/vclprocessor2d.cxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 8544f4c44d03..900cada4db7a 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -87,6 +87,18 @@ namespace return nSteps; } + + // get metafile (copy it) + GDIMetaFile GetMetaFile(const drawinglayer::primitive2d::MetafilePrimitive2D& rMetaCandidate, const basegfx::BColorModifierStack& rColorModifierStack) + { + if (rColorModifierStack.count()) + { + const basegfx::BColor aRGBBaseColor(0, 0, 0); + const basegfx::BColor aRGBColor(rColorModifierStack.getModifiedColor(aRGBBaseColor)); + return rMetaCandidate.getMetaFile().GetMonochromeMtf(Color(aRGBColor)); + } + return rMetaCandidate.getMetaFile(); + } } namespace drawinglayer @@ -736,18 +748,7 @@ namespace drawinglayer (sal_Int32)floor(aOutlineRange.getMaxX()), (sal_Int32)floor(aOutlineRange.getMaxY())); // get metafile (copy it) - GDIMetaFile aMetaFile; - - if(maBColorModifierStack.count()) - { - const basegfx::BColor aRGBBaseColor(0, 0, 0); - const basegfx::BColor aRGBColor(maBColorModifierStack.getModifiedColor(aRGBBaseColor)); - aMetaFile = rMetaCandidate.getMetaFile().GetMonochromeMtf(Color(aRGBColor)); - } - else - { - aMetaFile = rMetaCandidate.getMetaFile(); - } + GDIMetaFile aMetaFile(GetMetaFile(rMetaCandidate, maBColorModifierStack)); // rotation if(!basegfx::fTools::equalZero(fRotate)) |