diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-01-27 11:51:56 +0100 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2010-01-27 11:51:56 +0100 |
commit | ffe5c97056ab181367e49691d487eb6f6f375200 (patch) | |
tree | 552e2d32015f11e023004a4104e15cce886312e0 /drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx | |
parent | de7c998fe9ba5be956bf8a155455ad17985c4f88 (diff) |
aw079: #i99147# attribute rework and others
Diffstat (limited to 'drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx')
-rw-r--r-- | drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx | 38 |
1 files changed, 17 insertions, 21 deletions
diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index 663ae6ad0d37..d993f5117d3a 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -43,8 +43,9 @@ #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> #include <basegfx/tools/canvastools.hxx> #include <drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx> -#include <drawinglayer/primitive3d/hittestprimitive3d.hxx> -#include <drawinglayer/attribute/sdrattribute.hxx> +#include <drawinglayer/attribute/sdrfillattribute.hxx> +#include <drawinglayer/attribute/sdrlineattribute.hxx> +#include <drawinglayer/attribute/sdrshadowattribute.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -68,7 +69,7 @@ namespace drawinglayer getHorizontalSegments(), getVerticalSegments(), bCreateNormals)); // normal inversion - if(getSdrLFSAttribute().getFill() + if(!getSdrLFSAttribute().getFill().isDefault() && bCreateNormals && getSdr3DObjectAttribute().getNormalsInvert() && aFill.areNormalsUsed()) @@ -78,7 +79,7 @@ namespace drawinglayer } // texture coordinates - if(getSdrLFSAttribute().getFill()) + if(!getSdrLFSAttribute().getFill().isDefault()) { // handle texture coordinates X const bool bParallelX(::com::sun::star::drawing::TextureProjectionMode_PARALLEL == getSdr3DObjectAttribute().getTextureProjectionX()); @@ -142,7 +143,7 @@ namespace drawinglayer a3DPolyPolygonVector.push_back(basegfx::B3DPolyPolygon(aFill.getB3DPolygon(a))); } - if(getSdrLFSAttribute().getFill()) + if(!getSdrLFSAttribute().getFill().isDefault()) { // add fill aRetval = create3DPolyPolygonFillPrimitives( @@ -150,39 +151,34 @@ namespace drawinglayer getTransform(), getTextureSize(), getSdr3DObjectAttribute(), - *getSdrLFSAttribute().getFill(), + getSdrLFSAttribute().getFill(), getSdrLFSAttribute().getFillFloatTransGradient()); } else { // create simplified 3d hit test geometry - const attribute::SdrFillAttribute aSimplifiedFillAttribute(0.0, basegfx::BColor(), 0, 0, 0); - - aRetval = create3DPolyPolygonFillPrimitives( + aRetval = createHiddenGeometryPrimitives3D( a3DPolyPolygonVector, getTransform(), getTextureSize(), - getSdr3DObjectAttribute(), - aSimplifiedFillAttribute, - 0); - - // encapsulate in HitTestPrimitive3D and add - const Primitive3DReference xRef(new HitTestPrimitive3D(aRetval)); - aRetval = Primitive3DSequence(&xRef, 1L); + getSdr3DObjectAttribute()); } // add line - if(getSdrLFSAttribute().getLine()) + if(!getSdrLFSAttribute().getLine().isDefault()) { basegfx::B3DPolyPolygon aSphere(basegfx::tools::createSpherePolyPolygonFromB3DRange(aUnitRange, getHorizontalSegments(), getVerticalSegments())); - const Primitive3DSequence aLines(create3DPolyPolygonLinePrimitives(aSphere, getTransform(), *getSdrLFSAttribute().getLine())); + const Primitive3DSequence aLines(create3DPolyPolygonLinePrimitives( + aSphere, getTransform(), getSdrLFSAttribute().getLine())); appendPrimitive3DSequenceToPrimitive3DSequence(aRetval, aLines); } // add shadow - if(getSdrLFSAttribute().getShadow() && aRetval.hasElements()) + if(!getSdrLFSAttribute().getShadow().isDefault() + && aRetval.hasElements()) { - const Primitive3DSequence aShadow(createShadowPrimitive3D(aRetval, *getSdrLFSAttribute().getShadow(), getSdr3DObjectAttribute().getShadow3D())); + const Primitive3DSequence aShadow(createShadowPrimitive3D( + aRetval, getSdrLFSAttribute().getShadow(), getSdr3DObjectAttribute().getShadow3D())); appendPrimitive3DSequenceToPrimitive3DSequence(aRetval, aShadow); } @@ -192,7 +188,7 @@ namespace drawinglayer SdrSpherePrimitive3D::SdrSpherePrimitive3D( const basegfx::B3DHomMatrix& rTransform, const basegfx::B2DVector& rTextureSize, - const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, + const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute, sal_uInt32 nHorizontalSegments, sal_uInt32 nVerticalSegments) |