diff options
author | Armin Le Grand <alg@apache.org> | 2012-10-16 08:44:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-11 20:00:34 +0100 |
commit | 37aa7d81aacaae12dfe0fd2ade2779235bbf72f1 (patch) | |
tree | baf84cf5f8fcf62221dd75869d507d2396ae690b /drawinglayer/source/processor3d | |
parent | Updated core (diff) | |
download | core-37aa7d81aacaae12dfe0fd2ade2779235bbf72f1.tar.gz core-37aa7d81aacaae12dfe0fd2ade2779235bbf72f1.zip |
Resolves: #i121194# Better support for graphic fill styles...
which are not bitmaps (svg, metafiles, ..)
(cherry picked from commit 7a652a2b2ab5e0d37e32185c8c5fac3af482bb76)
Conflicts:
drawinglayer/Library_drawinglayer.mk
drawinglayer/Package_inc.mk
drawinglayer/inc/drawinglayer/attribute/fillgraphicattribute.hxx
drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
drawinglayer/inc/drawinglayer/attribute/sdrfillgraphicattribute.hxx
drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
drawinglayer/inc/drawinglayer/primitive2d/fillgraphicprimitive2d.hxx
drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
drawinglayer/inc/drawinglayer/texture/texture.hxx
drawinglayer/inc/drawinglayer/texture/texture3d.hxx
drawinglayer/source/attribute/fillbitmapattribute.cxx
drawinglayer/source/attribute/sdrfillattribute.cxx
drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx
drawinglayer/source/primitive2d/graphicprimitive2d.cxx
drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
drawinglayer/source/processor2d/canvasprocessor.cxx
svx/inc/svx/sdr/primitive2d/sdrattributecreator.hxx
svx/source/sdr/contact/objectcontacttools.cxx
vcl/inc/vcl/graph.hxx
unused file _vclmetafileprocessor2d.cxx deleted, was added by error
(cherry picked from commit ed0d53f8283cd3ce579a90b599118884d0db6119)
Conflicts:
drawinglayer/source/processor2d/_vclmetafileprocessor2d.cxx
Corrected canvasProcessor usage
(cherry picked from commit 7903c33f31c457eb6ff506958c4233f2a5d39bcf)
Conflicts:
svx/source/sdr/contact/objectcontacttools.cxx
Change-Id: I80008050b98dafc92fde043524843c13a75fe22c
d2fa667d7c127b4d735334e56093d1d4553b0a5b
e20c60c7d6472da1295a162d9a629be998861f62
Diffstat (limited to 'drawinglayer/source/processor3d')
-rw-r--r-- | drawinglayer/source/processor3d/defaultprocessor3d.cxx | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 1781efbbe282..6c575095f43b 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -34,6 +34,8 @@ #include <vcl/bitmapex.hxx> #include <drawinglayer/attribute/sdrsceneattribute3d.hxx> #include <drawinglayer/attribute/sdrlightingattribute3d.hxx> +#include <vcl/graph.hxx> +#include <basegfx/matrix/b2dhommatrixtools.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -210,21 +212,33 @@ namespace drawinglayer boost::shared_ptr< texture::GeoTexSvx > pOldTex = mpGeoTexSvx; // create texture - const attribute::FillBitmapAttribute& rFillBitmapAttribute = rPrimitive.getFillBitmapAttribute(); + const attribute::FillGraphicAttribute& rFillGraphicAttribute = rPrimitive.getFillGraphicAttribute(); - if(rFillBitmapAttribute.getTiling()) + // #121194# For 3D texture we will use the BitmapRex representation + const BitmapEx aBitmapEx(rFillGraphicAttribute.getGraphic().GetBitmapEx()); + + // create range scaled by texture size + basegfx::B2DRange aGraphicRange(rFillGraphicAttribute.getGraphicRange()); + + aGraphicRange.transform( + basegfx::tools::createScaleB2DHomMatrix( + rPrimitive.getTextureSize())); + + if(rFillGraphicAttribute.getTiling()) { - mpGeoTexSvx.reset(new texture::GeoTexSvxBitmapTiled( - rFillBitmapAttribute.getBitmapEx().GetBitmap(), - rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(), - rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize())); + mpGeoTexSvx.reset( + new texture::GeoTexSvxBitmapExTiled( + aBitmapEx, + aGraphicRange, + rFillGraphicAttribute.getOffsetX(), + rFillGraphicAttribute.getOffsetY())); } else { - mpGeoTexSvx.reset(new texture::GeoTexSvxBitmap( - rFillBitmapAttribute.getBitmapEx().GetBitmap(), - rFillBitmapAttribute.getTopLeft() * rPrimitive.getTextureSize(), - rFillBitmapAttribute.getSize() * rPrimitive.getTextureSize())); + mpGeoTexSvx.reset( + new texture::GeoTexSvxBitmapEx( + aBitmapEx, + aGraphicRange)); } // process sub-list |