diff options
author | Armin Le Grand <alg@apache.org> | 2013-05-06 14:13:44 +0000 |
---|---|---|
committer | Armin Le Grand <alg@apache.org> | 2013-05-06 14:13:44 +0000 |
commit | f3695b261c9fb6f7053b325bd25dc43f578b32fe (patch) | |
tree | 3554eddb70e7fa9a13c0858282ec938178a5168f /drawinglayer | |
parent | bab3ddce4b3d5330835494f54b68406335821b76 (diff) |
i122216 Ensure FormControls get printed/PDFed, also ensure graphics are all visible in metafiles
Notes
Notes:
merged as: 16bb8dc8a0e1e797cac0f89d306b020b8534a8c4
Diffstat (limited to 'drawinglayer')
3 files changed, 24 insertions, 18 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index abdb99294284..81a0b303baa8 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -1342,7 +1342,10 @@ namespace drawinglayer } case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : { - // direct draw of transformed BitmapEx primitive; use default processing + // direct draw of transformed BitmapEx primitive; use default processing, but without + // former testing if graphic content is inside discrete local viewport; this is not + // setup for metafile targets (metafile renderer tries to render in logic coordinates, + // the mapping is kept to the OutputDevice for better Metafile recording) RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx index c07e5475febb..914d45e878c2 100644 --- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx @@ -183,6 +183,25 @@ namespace drawinglayer case PRIMITIVE2D_ID_BITMAPPRIMITIVE2D : { // direct draw of transformed BitmapEx primitive + const primitive2d::BitmapPrimitive2D& rBitmapCandidate = static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate); + + // check if graphic content is inside discrete local ViewPort + const basegfx::B2DRange& rDiscreteViewPort(getViewInformation2D().getDiscreteViewport()); + const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); + + if(!rDiscreteViewPort.isEmpty()) + { + basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); + + aUnitRange.transform(aLocalTransform); + + if(!aUnitRange.overlaps(rDiscreteViewPort)) + { + // content is outside discrete local ViewPort + break; + } + } + RenderBitmapPrimitive2D(static_cast< const primitive2d::BitmapPrimitive2D& >(rCandidate)); break; } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 25a6aab7c73f..a525d30b6c0d 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -387,24 +387,8 @@ namespace drawinglayer // direct draw of transformed BitmapEx primitive void VclProcessor2D::RenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate) { - // check local ViewPort - const basegfx::B2DRange& rDiscreteViewPort(getViewInformation2D().getDiscreteViewport()); - const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); - - if(!rDiscreteViewPort.isEmpty()) - { - // check if we are visible - basegfx::B2DRange aUnitRange(0.0, 0.0, 1.0, 1.0); - - aUnitRange.transform(aLocalTransform); - - if(!aUnitRange.overlaps(rDiscreteViewPort)) - { - return; - } - } - BitmapEx aBitmapEx(rBitmapCandidate.getBitmapEx()); + const basegfx::B2DHomMatrix aLocalTransform(maCurrentTransformation * rBitmapCandidate.getTransform()); if(maBColorModifierStack.count()) { |