diff options
28 files changed, 282 insertions, 467 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx index 28fb22545e44..bd46561cda06 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: hatchtextureprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:12 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -52,15 +52,15 @@ namespace drawinglayer fillHatchAttribute maHatch; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); // helpers - void impCreateDecomposition(const primitiveList& rSource, primitiveList& rDest); + void impCreateDecomposition(const primitiveVector& rSource, primitiveVector& rDest); public: hatchTexturePrimitive3D( const fillHatchAttribute& rHatch, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); @@ -72,9 +72,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index b4d44e28c6df..15f15006f082 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polygonprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -78,17 +78,11 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; // get 3Drange of primitive. Default implementation uses decomposition virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const; - - // version for 3D geometries, analog to 2d version (see above) - virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix); }; } // end of namespace primitive } // end of namespace drawinglayer @@ -106,7 +100,7 @@ namespace drawinglayer strokeAttribute maStrokeAttribute; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: polygonStrokePrimitive3D(const ::basegfx::B3DPolygon& rPolygon, const strokeAttribute& rStrokeAttribute); @@ -119,14 +113,8 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; - - // version for 3D geometries, analog to 2d version (see above) - virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix); }; } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 1116657a6c9d..236cf9a7202e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polygontubeprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -63,7 +63,7 @@ namespace drawinglayer ::basegfx::tools::B2DLineJoin maLineJoin; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: polygonTubePrimitive3D( @@ -83,9 +83,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx index 6a0bdcf916ff..955b3add97b4 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polypolygonprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:58 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -79,17 +79,11 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; // get 3Drange of primitive. Default implementation uses decomposition virtual ::basegfx::B3DRange get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const; - - // version for 3D geometries, analog to 2d version (see above) - virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix); }; } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx index 96234e6ecb62..dd3deb4bd011 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrcubeprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:13 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -51,7 +51,7 @@ namespace drawinglayer { protected: // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: sdrCubePrimitive3D( @@ -64,9 +64,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx index ccc3486d7c4e..0ae39f660d02 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrdecompositiontools3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,6 +36,10 @@ #ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX #define _DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX +#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVE_HXX +#include <drawinglayer/primitive/primitive.hxx> +#endif + #include <vector> ////////////////////////////////////////////////////////////////////////////// @@ -48,7 +52,6 @@ namespace basegfx { } namespace drawinglayer { namespace primitive { - class primitiveList; class sdrLineAttribute; class sdrFillAttribute; class sdr3DObjectAttribute; @@ -65,20 +68,20 @@ namespace drawinglayer void add3DPolyPolygonLinePrimitive( const ::basegfx::B3DPolyPolygon& rUnitPolyPolygon, const ::basegfx::B3DHomMatrix& rObjectTransform, - primitiveList& rTarget, + primitiveVector& rTarget, const sdrLineAttribute& rLine); void add3DPolyPolygonFillPrimitive( const ::std::vector< ::basegfx::B3DPolyPolygon >& r3DPolyPolygonVector, const ::basegfx::B3DHomMatrix& rObjectTransform, const ::basegfx::B2DVector& rTextureSize, - primitiveList& rTarget, + primitiveVector& rTarget, const sdr3DObjectAttribute& aSdr3DObjectAttribute, const sdrFillAttribute& rFill, const fillGradientAttribute* pFillGradient = 0L); void addShadowPrimitive3D( - primitiveList& rTarget, + primitiveVector& rTarget, const sdrShadowAttribute& rShadow, bool bShadow3D); } // end of namespace overlay diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx index 182de49c173b..45ed6c0fbf95 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrextrudeprimitive3d.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:50 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -78,7 +78,7 @@ namespace drawinglayer unsigned mbCloseBack : 1; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); // get (evtl. create) slices const sliceVector& getSlices() const; @@ -104,9 +104,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx index 143f360e7e56..de2c1fa4dca4 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrlatheprimitive3d.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:50 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -79,7 +79,7 @@ namespace drawinglayer unsigned mbCloseBack : 1; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); // get (evtl. create) slices const sliceVector& getSlices() const; @@ -107,9 +107,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx index bdd5f44c0e83..7556f204ae53 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrprimitive3d.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:51 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -97,9 +97,6 @@ namespace drawinglayer const ::basegfx::B2DVector& getTextureSize() const { return maTextureSize; } const sdrLineFillShadowAttribute& getSdrLFSAttribute() const { return maSdrLFSAttribute; } const sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; } - - // version for 3D geometries, analog to 2d version (see above) - virtual void transform(const ::basegfx::B3DHomMatrix& rMatrix); }; } // end of namespace overlay } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx index 6917b49139b7..35e61f32747d 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrsphereprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:14 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -56,7 +56,7 @@ namespace drawinglayer sal_uInt32 mnVerticalSegments; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: sdrSpherePrimitive3D( @@ -70,9 +70,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx index e663518c3b65..a26f2e43003f 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: shadowprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:15 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,8 +36,8 @@ #ifndef _DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX #define _DRAWINGLAYER_PRIMITIVE3D_SHADOWPRIMITIVE3D_HXX -#ifndef _DRAWINGLAYER_PRIMITIVE_LISTPRIMITIVE_HXX -#include <drawinglayer/primitive/listprimitive.hxx> +#ifndef _DRAWINGLAYER_PRIMITIVE_VECTORPRIMITIVE_HXX +#include <drawinglayer/primitive/vectorprimitive.hxx> #endif #ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive { - class shadowPrimitive3D : public listPrimitive + class shadowPrimitive3D : public vectorPrimitive { protected: ::basegfx::B2DHomMatrix maShadowTransform; @@ -67,7 +67,7 @@ namespace drawinglayer public: shadowPrimitive3D( const ::basegfx::B2DHomMatrix& rShadowTransform, const ::basegfx::BColor& rShadowColor, - double fShadowTransparence, bool bShadow3D, const primitiveList& rPrimitiveList); + double fShadowTransparence, bool bShadow3D, const primitiveVector& rPrimitiveVector); virtual ~shadowPrimitive3D(); // get data @@ -79,14 +79,8 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; - - // transformations for different aspects - virtual void transform(const ::basegfx::B2DHomMatrix& rMatrix); }; } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index 25cd863958ff..85dc14523fdf 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: textureprimitive3d.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:45:15 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:57:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -36,8 +36,8 @@ #ifndef _DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX #define _DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX -#ifndef _DRAWINGLAYER_PRIMITIVE_LISTPRIMITIVE_HXX -#include <drawinglayer/primitive/listprimitive.hxx> +#ifndef _DRAWINGLAYER_PRIMITIVE_VECTORPRIMITIVE_HXX +#include <drawinglayer/primitive/vectorprimitive.hxx> #endif #ifndef _DRAWINGLAYER_PRIMITIVE_FILLATTRIBUTE_HXX @@ -48,10 +48,6 @@ #include <drawinglayer/primitive/fillbitmapattribute.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - #ifndef _BGFX_MATRIX_B2DHOMMATRIX_HXX #include <basegfx/matrix/b2dhommatrix.hxx> #endif @@ -62,7 +58,7 @@ namespace drawinglayer { namespace primitive { - class texturePrimitive3D : public listPrimitive + class texturePrimitive3D : public vectorPrimitive { protected: ::basegfx::B2DVector maTextureSize; @@ -76,7 +72,7 @@ namespace drawinglayer public: texturePrimitive3D( - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); @@ -105,12 +101,12 @@ namespace drawinglayer double mfTransparence; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: simpleTransparenceTexturePrimitive3D( double fTransparence, - const primitiveList& rPrimitiveList); + const primitiveVector& rPrimitiveVector); virtual ~simpleTransparenceTexturePrimitive3D(); // get data @@ -119,9 +115,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; @@ -140,12 +133,12 @@ namespace drawinglayer fillGradientAttribute maGradient; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: gradientTexturePrimitive3D( const fillGradientAttribute& rGradient, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); @@ -157,9 +150,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; @@ -178,12 +168,12 @@ namespace drawinglayer fillBitmapAttribute maBitmap; // create decomposition - virtual void decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); + virtual void decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation); public: bitmapTexturePrimitive3D( const fillBitmapAttribute& rBitmap, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter); @@ -195,9 +185,6 @@ namespace drawinglayer // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; @@ -215,16 +202,13 @@ namespace drawinglayer public: transparenceTexturePrimitive3D( const fillGradientAttribute& rGradient, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize); virtual ~transparenceTexturePrimitive3D(); // compare operator virtual bool operator==(const basePrimitive& rPrimitive) const; - // clone operator - virtual basePrimitive* createNewClone() const; - // id generator virtual PrimitiveID getID() const; }; diff --git a/drawinglayer/prj/build.lst b/drawinglayer/prj/build.lst index 9ed12fa6cd84..278f48661ceb 100644 --- a/drawinglayer/prj/build.lst +++ b/drawinglayer/prj/build.lst @@ -6,4 +6,5 @@ fx drawinglayer\source\primitive nmake - all fx_primitive NULL fx drawinglayer\source\primitive3d nmake - all fx_primitive3d NULL fx drawinglayer\source\animation nmake - all fx_animation NULL fx drawinglayer\source\geometry nmake - all fx_geometry NULL -fx drawinglayer\util nmake - all fx_util fx_primitive fx_primitive3d fx_animation fx_geometry NULL +fx drawinglayer\source\processor nmake - all fx_processor NULL +fx drawinglayer\util nmake - all fx_util fx_primitive fx_primitive3d fx_animation fx_geometry fx_processor NULL diff --git a/drawinglayer/prj/d.lst b/drawinglayer/prj/d.lst index 62fe4b7c8a23..9bd83fa6bbed 100644 --- a/drawinglayer/prj/d.lst +++ b/drawinglayer/prj/d.lst @@ -17,18 +17,15 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive ..\inc\drawinglayer\primitive\fillhatchprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\fillhatchprimitive.hxx ..\inc\drawinglayer\primitive\gridprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\gridprimitive.hxx ..\inc\drawinglayer\primitive\helplineprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\helplineprimitive.hxx -..\inc\drawinglayer\primitive\listprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\listprimitive.hxx +..\inc\drawinglayer\primitive\vectorprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\vectorprimitive.hxx ..\inc\drawinglayer\primitive\markerprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\markerprimitive.hxx ..\inc\drawinglayer\primitive\maskprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\maskprimitive.hxx +..\inc\drawinglayer\primitive\transformprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\transformprimitive.hxx ..\inc\drawinglayer\primitive\metafileprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\metafileprimitive.hxx ..\inc\drawinglayer\primitive\modifiedcolorprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\modifiedcolorprimitive.hxx ..\inc\drawinglayer\primitive\polygonprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\polygonprimitive.hxx ..\inc\drawinglayer\primitive\polypolygonprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\polypolygonprimitive.hxx ..\inc\drawinglayer\primitive\primitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\primitive.hxx -..\inc\drawinglayer\primitive\primitivedefines.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\primitivedefines.hxx -..\inc\drawinglayer\primitive\primitivelist.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\primitivelist.hxx -..\inc\drawinglayer\primitive\primitiveprocessor.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\primitiveprocessor.hxx -..\inc\drawinglayer\primitive\referencedprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\referencedprimitive.hxx ..\inc\drawinglayer\primitive\sceneprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\sceneprimitive.hxx ..\inc\drawinglayer\primitive\sdrattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\sdrattribute.hxx ..\inc\drawinglayer\primitive\sdrfillbitmapattribute.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\sdrfillbitmapattribute.hxx @@ -40,7 +37,6 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive ..\inc\drawinglayer\primitive\textprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\textprimitive.hxx ..\inc\drawinglayer\primitive\texture.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\texture.hxx ..\inc\drawinglayer\primitive\transparenceprimitive.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\transparenceprimitive.hxx -..\inc\drawinglayer\primitive\vclprimitiveprocessor.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive\vclprimitiveprocessor.hxx mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive3d ..\inc\drawinglayer\primitive3d\materialattribute3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\materialattribute3d.hxx @@ -49,10 +45,10 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\primitive3d ..\inc\drawinglayer\primitive3d\polygonprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygonprimitive3d.hxx ..\inc\drawinglayer\primitive3d\polygontubeprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polygontubeprimitive3d.hxx ..\inc\drawinglayer\primitive3d\polypolygonprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\polypolygonprimitive3d.hxx +..\inc\drawinglayer\primitive3d\transformprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\transformprimitive3d.hxx ..\inc\drawinglayer\primitive3d\shadowprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\shadowprimitive3d.hxx ..\inc\drawinglayer\primitive3d\textureprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\textureprimitive3d.hxx ..\inc\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\hatchtextureprimitive3d.hxx -..\inc\drawinglayer\primitive3d\primitiveprocessor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\primitiveprocessor3d.hxx ..\inc\drawinglayer\primitive3d\sdrdecompositiontools3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\sdrdecompositiontools3d.hxx ..\inc\drawinglayer\primitive3d\sdrextrudelathetools3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\sdrextrudelathetools3d.hxx ..\inc\drawinglayer\primitive3d\sdrprimitive3d.hxx %_DEST%\inc%_EXT%\drawinglayer\primitive3d\sdrprimitive3d.hxx @@ -68,3 +64,8 @@ mkdir: %_DEST%\inc%_EXT%\drawinglayer\animation mkdir: %_DEST%\inc%_EXT%\drawinglayer\geometry ..\inc\drawinglayer\geometry\viewinformation.hxx %_DEST%\inc%_EXT%\drawinglayer\geometry\viewinformation.hxx ..\inc\drawinglayer\geometry\transformation3d.hxx %_DEST%\inc%_EXT%\drawinglayer\geometry\transformation3d.hxx + +mkdir: %_DEST%\inc%_EXT%\drawinglayer\processor +..\inc\drawinglayer\processor\processor.hxx %_DEST%\inc%_EXT%\drawinglayer\processor\processor.hxx +..\inc\drawinglayer\processor\vclprocessor.hxx %_DEST%\inc%_EXT%\drawinglayer\processor\vclprocessor.hxx +..\inc\drawinglayer\processor\processor3d.hxx %_DEST%\inc%_EXT%\drawinglayer\processor\processor3d.hxx diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index e5f1733fc110..14e1f53cc5bc 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: hatchtextureprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:06 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -75,12 +75,12 @@ namespace drawinglayer { namespace primitive { - void hatchTexturePrimitive3D::impCreateDecomposition(const primitiveList& rSource, primitiveList& rDest) + void hatchTexturePrimitive3D::impCreateDecomposition(const primitiveVector& rSource, primitiveVector& rDest) { - for(sal_uInt32 a(0L); a < rSource.count(); a++) + for(sal_uInt32 a(0L); a < rSource.size(); a++) { // get reference - const referencedPrimitive& rCandidate = rSource.getReferencedPrimitive(a); + const referencedPrimitive& rCandidate = rSource[a]; // not all content is needed, remove transparencies and ModifiedColorPrimitives switch(rCandidate.getID()) @@ -238,7 +238,7 @@ namespace drawinglayer for(a = 0L; a < nHatchLines; a++) { basePrimitive* pNew = new polygonHairlinePrimitive3D(a3DHatchLines.getB3DPolygon(a), aHatchColor); - rDest.append(referencedPrimitive(*pNew)); + rDest.push_back(referencedPrimitive(*pNew)); } } } @@ -247,7 +247,7 @@ namespace drawinglayer if(maHatch.isFillBackground()) { // add original primitive for background - rDest.append(rCandidate); + rDest.push_back(rCandidate); } break; @@ -256,31 +256,31 @@ namespace drawinglayer default: { // add to destination - rDest.append(rCandidate); + rDest.push_back(rCandidate); break; } } } } - void hatchTexturePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void hatchTexturePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { - if(maPrimitiveList.count()) + if(maPrimitiveVector.size()) { // create decomposition - primitiveList aNewPrimitiveList; - impCreateDecomposition(maPrimitiveList, aNewPrimitiveList); - rTarget.append(aNewPrimitiveList); + primitiveVector aNewPrimitiveVector; + impCreateDecomposition(maPrimitiveVector, aNewPrimitiveVector); + rTarget.insert(rTarget.end(), aNewPrimitiveVector.begin(), aNewPrimitiveVector.end()); } } hatchTexturePrimitive3D::hatchTexturePrimitive3D( const fillHatchAttribute& rHatch, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter) - : texturePrimitive3D(rPrimitiveList, rTextureSize, bModulate, bFilter), + : texturePrimitive3D(rPrimitiveVector, rTextureSize, bModulate, bFilter), maHatch(rHatch) { } @@ -300,11 +300,6 @@ namespace drawinglayer return false; } - basePrimitive* hatchTexturePrimitive3D::createNewClone() const - { - return new hatchTexturePrimitive3D(maHatch, maPrimitiveList, maTextureSize, mbModulate, mbFilter); - } - PrimitiveID hatchTexturePrimitive3D::getID() const { return CreatePrimitiveID('H', 'A', 'X', '3'); diff --git a/drawinglayer/source/primitive3d/makefile.mk b/drawinglayer/source/primitive3d/makefile.mk index 49f2615555cb..0be6d6307dcd 100644 --- a/drawinglayer/source/primitive3d/makefile.mk +++ b/drawinglayer/source/primitive3d/makefile.mk @@ -4,9 +4,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: aw $ $Date: 2006-05-12 11:49:06 $ +# last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -47,13 +47,13 @@ SLOFILES= \ $(SLO)$/materialattribute3d.obj \ $(SLO)$/sdrallattribute3d.obj \ $(SLO)$/sdrattribute3d.obj \ - $(SLO)$/primitiveprocessor3d.obj \ $(SLO)$/shadowprimitive3d.obj \ $(SLO)$/textureprimitive3d.obj \ $(SLO)$/hatchtextureprimitive3d.obj \ $(SLO)$/polygontubeprimitive3d.obj \ $(SLO)$/polygonprimitive3d.obj \ $(SLO)$/polypolygonprimitive3d.obj \ + $(SLO)$/transformprimitive3d.obj \ $(SLO)$/sdrdecompositiontools3d.obj \ $(SLO)$/sdrextrudelathetools3d.obj \ $(SLO)$/sdrprimitive3d.obj \ diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx index 5551c58ddba0..cf5db747ad27 100644 --- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: polygonprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:06 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,10 +49,6 @@ #include <drawinglayer/primitive3d/polygontubeprimitive3d.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -82,11 +78,6 @@ namespace drawinglayer return false; } - basePrimitive* polygonHairlinePrimitive3D::createNewClone() const - { - return new polygonHairlinePrimitive3D(maPolygon, maBColor); - } - PrimitiveID polygonHairlinePrimitive3D::getID() const { return CreatePrimitiveID('P', 'O', 'H', '3'); @@ -96,12 +87,6 @@ namespace drawinglayer { return ::basegfx::tools::getRange(maPolygon); } - - void polygonHairlinePrimitive3D::transform(const ::basegfx::B3DHomMatrix& rMatrix) - { - basePrimitive::transform(rMatrix); - maPolygon.transform(rMatrix); - } } // end of namespace primitive } // end of namespace drawinglayer @@ -111,7 +96,7 @@ namespace drawinglayer { namespace primitive { - void polygonStrokePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void polygonStrokePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { if(maPolygon.count()) { @@ -138,7 +123,7 @@ namespace drawinglayer polygonTubePrimitive3D* pNew = new polygonTubePrimitive3D(aHairLinePolyPolygon.getB3DPolygon(a), maStrokeAttribute.getColor(), fRadius, aLineJoin); - rTarget.append(referencedPrimitive(*pNew)); + rTarget.push_back(referencedPrimitive(*pNew)); } } else @@ -148,7 +133,7 @@ namespace drawinglayer { const ::basegfx::B3DPolygon aCandidate = aHairLinePolyPolygon.getB3DPolygon(a); basePrimitive* pNew = new polygonHairlinePrimitive3D(aCandidate, maStrokeAttribute.getColor()); - rTarget.append(referencedPrimitive(*pNew)); + rTarget.push_back(referencedPrimitive(*pNew)); } } } @@ -177,21 +162,10 @@ namespace drawinglayer return false; } - basePrimitive* polygonStrokePrimitive3D::createNewClone() const - { - return new polygonStrokePrimitive3D(maPolygon, maStrokeAttribute); - } - PrimitiveID polygonStrokePrimitive3D::getID() const { return CreatePrimitiveID('P', 'L', 'S', '3'); } - - void polygonStrokePrimitive3D::transform(const ::basegfx::B3DHomMatrix& rMatrix) - { - basePrimitive::transform(rMatrix); - maPolygon.transform(rMatrix); - } } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index b70e272e6118..ffb059cde583 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: polygontubeprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:52 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -53,10 +53,6 @@ #include <drawinglayer/primitive3d/polypolygonprimitive3d.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - #ifndef _OSL_MUTEX_HXX_ #include <osl/mutex.hxx> #endif @@ -65,6 +61,10 @@ #include <basegfx/polygon/b3dpolypolygontools.hxx> #endif +#ifndef _DRAWINGLAYER_PRIMITIVE3D_TRANSFORMPRIMITIVE3D_HXX +#include <drawinglayer/primitive3d/transformprimitive3d.hxx> +#endif + ////////////////////////////////////////////////////////////////////////////// namespace drawinglayer @@ -73,10 +73,10 @@ namespace drawinglayer { namespace // anonymous namespace { - const primitiveList& getLineTubeSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial) + const primitiveVector& getLineTubeSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial) { // static data for buffered tube primitives - static primitiveList aLineTubeList; + static primitiveVector aLineTubeList; static sal_uInt32 nLineTubeSegments(0L); static materialAttribute3D aLineMaterial; @@ -90,7 +90,7 @@ namespace drawinglayer aLineTubeList.clear(); } - if(0L == aLineTubeList.count() && 0L != nLineTubeSegments) + if(0L == aLineTubeList.size() && 0L != nLineTubeSegments) { const ::basegfx::B3DPoint aLeft(0.0, 0.0, 0.0); const ::basegfx::B3DPoint aRight(1.0, 0.0, 0.0); @@ -103,24 +103,25 @@ namespace drawinglayer { const ::basegfx::B3DPoint aNextLeft(aRot * aLastLeft); const ::basegfx::B3DPoint aNextRight(aRot * aLastRight); - ::basegfx::B3DPolygon aNew; + ::basegfx::B3DPolygon aNewPolygon; - aNew.append(aNextLeft); - aNew.setNormal(0L, ::basegfx::B3DVector(aNextLeft - aLeft)); + aNewPolygon.append(aNextLeft); + aNewPolygon.setNormal(0L, ::basegfx::B3DVector(aNextLeft - aLeft)); - aNew.append(aLastLeft); - aNew.setNormal(1L, ::basegfx::B3DVector(aLastLeft - aLeft)); + aNewPolygon.append(aLastLeft); + aNewPolygon.setNormal(1L, ::basegfx::B3DVector(aLastLeft - aLeft)); - aNew.append(aLastRight); - aNew.setNormal(2L, ::basegfx::B3DVector(aLastRight - aRight)); + aNewPolygon.append(aLastRight); + aNewPolygon.setNormal(2L, ::basegfx::B3DVector(aLastRight - aRight)); - aNew.append(aNextRight); - aNew.setNormal(3L, ::basegfx::B3DVector(aNextRight - aRight)); + aNewPolygon.append(aNextRight); + aNewPolygon.setNormal(3L, ::basegfx::B3DVector(aNextRight - aRight)); - aNew.setClosed(true); + aNewPolygon.setClosed(true); - basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(::basegfx::B3DPolyPolygon(aNew), aLineMaterial, false); - aLineTubeList.append(referencedPrimitive(*pNew)); + const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false); + aLineTubeList.push_back(referencedPrimitive(*pNew)); aLastLeft = aNextLeft; aLastRight = aNextRight; @@ -130,10 +131,10 @@ namespace drawinglayer return aLineTubeList; } - const primitiveList& getLineCapSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial) + const primitiveVector& getLineCapSegments(sal_uInt32 nSegments, const materialAttribute3D& rMaterial) { // static data for buffered tube primitives - static primitiveList aLineCapList; + static primitiveVector aLineCapList; static sal_uInt32 nLineCapSegments(0L); static materialAttribute3D aLineMaterial; @@ -147,7 +148,7 @@ namespace drawinglayer aLineCapList.clear(); } - if(0L == aLineCapList.count() && 0L != nLineCapSegments) + if(0L == aLineCapList.size() && 0L != nLineCapSegments) { const ::basegfx::B3DPoint aNull(0.0, 0.0, 0.0); ::basegfx::B3DPoint aLast(0.0, 1.0, 0.0); @@ -157,21 +158,22 @@ namespace drawinglayer for(sal_uInt32 a(0L); a < nLineCapSegments; a++) { const ::basegfx::B3DPoint aNext(aRot * aLast); - ::basegfx::B3DPolygon aNew; + ::basegfx::B3DPolygon aNewPolygon; - aNew.append(aLast); - aNew.setNormal(0L, ::basegfx::B3DVector(aLast - aNull)); + aNewPolygon.append(aLast); + aNewPolygon.setNormal(0L, ::basegfx::B3DVector(aLast - aNull)); - aNew.append(aNext); - aNew.setNormal(1L, ::basegfx::B3DVector(aNext - aNull)); + aNewPolygon.append(aNext); + aNewPolygon.setNormal(1L, ::basegfx::B3DVector(aNext - aNull)); - aNew.append(aNull); - aNew.setNormal(2L, ::basegfx::B3DVector(-1.0, 0.0, 0.0)); + aNewPolygon.append(aNull); + aNewPolygon.setNormal(2L, ::basegfx::B3DVector(-1.0, 0.0, 0.0)); - aNew.setClosed(true); + aNewPolygon.setClosed(true); - basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(::basegfx::B3DPolyPolygon(aNew), aLineMaterial, false); - aLineCapList.append(referencedPrimitive(*pNew)); + const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, aLineMaterial, false); + aLineCapList.push_back(referencedPrimitive(*pNew)); aLast = aNext; } @@ -180,7 +182,7 @@ namespace drawinglayer return aLineCapList; } - void getLineJoinSegments(primitiveList& rDest, sal_uInt32 nSegments, const materialAttribute3D& rMaterial, double fAngle, + void getLineJoinSegments(primitiveVector& rDest, sal_uInt32 nSegments, const materialAttribute3D& rMaterial, double fAngle, double fDegreeStepWidth, double fMiterMinimumAngle, ::basegfx::tools::B2DLineJoin aLineJoin) { // nSegments is for whole circle, adapt to half circle @@ -200,8 +202,10 @@ namespace drawinglayer for(sal_uInt32 a(0L); a < aSphere.count(); a++) { - basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(::basegfx::B3DPolyPolygon(aSphere.getB3DPolygon(a)), rMaterial, false); - rDest.append(referencedPrimitive(*pNew)); + const ::basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a)); + const ::basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); + basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); + rDest.push_back(referencedPrimitive(*pNew)); } } else @@ -235,11 +239,11 @@ namespace drawinglayer double fPos(-F_PI2); ::basegfx::B3DPoint aPointOnXY, aPointRotY, aNextPointOnXY, aNextPointRotY; ::basegfx::B3DPoint aCurrMiter, aNextMiter; - ::basegfx::B3DPolygon aNew, aMiter; + ::basegfx::B3DPolygon aNewPolygon, aMiterPolygon; // close polygon - aNew.setClosed(true); - aMiter.setClosed(true); + aNewPolygon.setClosed(true); + aMiterPolygon.setClosed(true); for(sal_uInt32 a(0L); a < nVerSeg; a++) { @@ -271,98 +275,100 @@ namespace drawinglayer if(bFirst) { - aNew.clear(); + aNewPolygon.clear(); if(bMiter) { - aNew.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); - aNew.append(aNextPointOnXY); - aNew.append(aNextMiter); - - aMiter.clear(); - aMiter.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); - aMiter.append(aNextMiter); - aMiter.append(aNextPointRotY); + aNewPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); + aNewPolygon.append(aNextPointOnXY); + aNewPolygon.append(aNextMiter); + + aMiterPolygon.clear(); + aMiterPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); + aMiterPolygon.append(aNextMiter); + aMiterPolygon.append(aNextPointRotY); } else { - aNew.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); - aNew.append(aNextPointOnXY); - aNew.append(aNextPointRotY); + aNewPolygon.append(::basegfx::B3DPoint(0.0, -1.0, 0.0)); + aNewPolygon.append(aNextPointOnXY); + aNewPolygon.append(aNextPointRotY); } } else if(bLast) { - aNew.clear(); + aNewPolygon.clear(); if(bMiter) { - aNew.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); - aNew.append(aCurrMiter); - aNew.append(aPointOnXY); - - aMiter.clear(); - aMiter.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); - aMiter.append(aPointRotY); - aMiter.append(aCurrMiter); + aNewPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); + aNewPolygon.append(aCurrMiter); + aNewPolygon.append(aPointOnXY); + + aMiterPolygon.clear(); + aMiterPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); + aMiterPolygon.append(aPointRotY); + aMiterPolygon.append(aCurrMiter); } else { - aNew.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); - aNew.append(aPointRotY); - aNew.append(aPointOnXY); + aNewPolygon.append(::basegfx::B3DPoint(0.0, 1.0, 0.0)); + aNewPolygon.append(aPointRotY); + aNewPolygon.append(aPointOnXY); } } else { - aNew.clear(); + aNewPolygon.clear(); if(bMiter) { - aNew.append(aPointOnXY); - aNew.append(aNextPointOnXY); - aNew.append(aNextMiter); - aNew.append(aCurrMiter); - - aMiter.clear(); - aMiter.append(aCurrMiter); - aMiter.append(aNextMiter); - aMiter.append(aNextPointRotY); - aMiter.append(aPointRotY); + aNewPolygon.append(aPointOnXY); + aNewPolygon.append(aNextPointOnXY); + aNewPolygon.append(aNextMiter); + aNewPolygon.append(aCurrMiter); + + aMiterPolygon.clear(); + aMiterPolygon.append(aCurrMiter); + aMiterPolygon.append(aNextMiter); + aMiterPolygon.append(aNextPointRotY); + aMiterPolygon.append(aPointRotY); } else { - aNew.append(aPointRotY); - aNew.append(aPointOnXY); - aNew.append(aNextPointOnXY); - aNew.append(aNextPointRotY); + aNewPolygon.append(aPointRotY); + aNewPolygon.append(aPointOnXY); + aNewPolygon.append(aNextPointOnXY); + aNewPolygon.append(aNextPointRotY); } } // set normals - for(sal_uInt32 b(0L); b < aNew.count(); b++) + for(sal_uInt32 b(0L); b < aNewPolygon.count(); b++) { - aNew.setNormal(b, ::basegfx::B3DVector(aNew.getB3DPoint(b))); + aNewPolygon.setNormal(b, ::basegfx::B3DVector(aNewPolygon.getB3DPoint(b))); } // create primitive - if(aNew.count()) + if(aNewPolygon.count()) { - basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(::basegfx::B3DPolyPolygon(aNew), rMaterial, false); - rDest.append(referencedPrimitive(*pNew)); + const ::basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); + basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); + rDest.push_back(referencedPrimitive(*pNew)); } - if(bMiter && aMiter.count()) + if(bMiter && aMiterPolygon.count()) { // set normals - for(sal_uInt32 c(0L); c < aMiter.count(); c++) + for(sal_uInt32 c(0L); c < aMiterPolygon.count(); c++) { - aMiter.setNormal(c, ::basegfx::B3DVector(aMiter.getB3DPoint(c))); + aMiterPolygon.setNormal(c, ::basegfx::B3DVector(aMiterPolygon.getB3DPoint(c))); } // create primitive - basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(::basegfx::B3DPolyPolygon(aMiter), rMaterial, false); - rDest.append(referencedPrimitive(*pNew)); + const ::basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); + basePrimitive* pNew = new polyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); + rDest.push_back(referencedPrimitive(*pNew)); } // prepare next step @@ -406,7 +412,7 @@ namespace drawinglayer { namespace primitive { - void polygonTubePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void polygonTubePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { const sal_uInt32 nPointCount(maPolygon.count()); @@ -428,7 +434,6 @@ namespace drawinglayer const ::basegfx::B3DPoint aNext(maPolygon.getB3DPoint((a + 1L) % nPointCount)); const ::basegfx::B3DVector aForw(aNext - aCurr); const double fForwLen(aForw.getLength()); - primitiveList aNewList; if(::basegfx::fTools::more(fForwLen, 0.0)) { @@ -443,10 +448,9 @@ namespace drawinglayer if(bNoLineJoin || (!bClosed && !a)) { - // line start edge - aNewList = getLineCapSegments(nSegments, aMaterial); - aNewList.transform(aVectorTrans); - rTarget.append(aNewList); + // line start edge, build transformed primitiveVector + transformPrimitive3D* pNewTransformedA = new transformPrimitive3D(aVectorTrans, getLineCapSegments(nSegments, aMaterial)); + rTarget.push_back(referencedPrimitive(*pNewTransformedA)); } else { @@ -456,8 +460,8 @@ namespace drawinglayer if(!::basegfx::fTools::equalZero(fCross)) { // line connect non-parallel, aBack, aForw, use maLineJoin + primitiveVector aNewList; const double fAngle(acos(aBack.scalar(aForw) / (fForwLen * aBack.getLength()))); // 0.0 .. F_PI2 - aNewList.clear(); getLineJoinSegments(aNewList, nSegments, aMaterial, fAngle, mfDegreeStepWidth, mfMiterMinimumAngle, maLineJoin); // calculate transformation. First, get angle in YZ between nForw projected on (1, 0, 0) and nBack @@ -475,16 +479,15 @@ namespace drawinglayer aSphereTrans.scale(mfRadius, mfRadius, mfRadius); aSphereTrans.translate(aCurr.getX(), aCurr.getY(), aCurr.getZ()); - // apply to list and append - aNewList.transform(aSphereTrans); - rTarget.append(aNewList); + // line start edge, build transformed primitiveVector + transformPrimitive3D* pNewTransformedB = new transformPrimitive3D(aSphereTrans, aNewList); + rTarget.push_back(referencedPrimitive(*pNewTransformedB)); } } - // create line segments - aNewList = getLineTubeSegments(nSegments, aMaterial); - aNewList.transform(aVectorTrans); - rTarget.append(aNewList); + // create line segments, build transformed primitiveVector + transformPrimitive3D* pNewTransformedC = new transformPrimitive3D(aVectorTrans, getLineTubeSegments(nSegments, aMaterial)); + rTarget.push_back(referencedPrimitive(*pNewTransformedC)); if(bNoLineJoin || (!bClosed && ((a + 1L) == nLoopCount))) { @@ -496,9 +499,9 @@ namespace drawinglayer aBackTrans *= aRotVector; aBackTrans.translate(aCurr.getX(), aCurr.getY(), aCurr.getZ()); - aNewList = getLineCapSegments(nSegments, aMaterial); - aNewList.transform(aBackTrans); - rTarget.append(aNewList); + // line end edge, build transformed primitiveVector + transformPrimitive3D* pNewTransformedD = new transformPrimitive3D(aBackTrans, getLineCapSegments(nSegments, aMaterial)); + rTarget.push_back(referencedPrimitive(*pNewTransformedD)); } } @@ -511,7 +514,7 @@ namespace drawinglayer { // create hairline polygonHairlinePrimitive3D* pNew = new polygonHairlinePrimitive3D(maPolygon, maBColor); - rTarget.append(referencedPrimitive(*pNew)); + rTarget.push_back(referencedPrimitive(*pNew)); } } } @@ -549,11 +552,6 @@ namespace drawinglayer return false; } - basePrimitive* polygonTubePrimitive3D::createNewClone() const - { - return new polygonTubePrimitive3D(maPolygon, maBColor, mfRadius, maLineJoin, mfDegreeStepWidth, mfMiterMinimumAngle); - } - PrimitiveID polygonTubePrimitive3D::getID() const { return CreatePrimitiveID('T', 'U', 'B', '3'); diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index 14fa7cbc4cde..0ba67d332f83 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: polypolygonprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:07 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -72,11 +72,6 @@ namespace drawinglayer return false; } - basePrimitive* polyPolygonMaterialPrimitive3D::createNewClone() const - { - return new polyPolygonMaterialPrimitive3D(maPolyPolygon, maMaterial, mbDoubleSided); - } - PrimitiveID polyPolygonMaterialPrimitive3D::getID() const { return CreatePrimitiveID('P', 'O', 'M', '3'); @@ -86,17 +81,6 @@ namespace drawinglayer { return ::basegfx::tools::getRange(maPolyPolygon); } - - void polyPolygonMaterialPrimitive3D::transform(const ::basegfx::B3DHomMatrix& rMatrix) - { - basePrimitive::transform(rMatrix); - maPolyPolygon.transform(rMatrix); - - if(maPolyPolygon.areNormalsUsed()) - { - maPolyPolygon.transformNormals(rMatrix); - } - } } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index c7bcc3688206..b34fd61f3449 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrcubeprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:53 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -49,10 +49,6 @@ #include <basegfx/polygon/b3dpolypolygontools.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - #ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> #endif @@ -75,7 +71,7 @@ namespace drawinglayer { namespace primitive { - void sdrCubePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void sdrCubePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { const ::basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); @@ -212,11 +208,6 @@ namespace drawinglayer return sdrPrimitive3D::operator==(rPrimitive); } - basePrimitive* sdrCubePrimitive3D::createNewClone() const - { - return new sdrCubePrimitive3D(maTransform, maTextureSize, maSdrLFSAttribute, maSdr3DObjectAttribute); - } - PrimitiveID sdrCubePrimitive3D::getID() const { return CreatePrimitiveID('S', 'C', 'U', '3'); @@ -225,7 +216,7 @@ namespace drawinglayer ::basegfx::B3DRange sdrCubePrimitive3D::get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const { // use defaut from sdrPrimitive3D which uses transformation expanded by line width/2. - // The parent implementation which uses the ranges of the breakdown would be more + // The parent implementation which uses the ranges of the decomposition would be more // corrcet, but for historical reasons it is necessary to do the old method: To get // the range of the non-transformed geometry and transform it then. This leads to different // ranges where the new method is more correct, but the need to keep the old behaviour diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index 5b1a905a62cb..82816748a7c3 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrdecompositiontools3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:08 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -57,10 +57,6 @@ #include <drawinglayer/primitive3d/polygonprimitive3d.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - #ifndef _DRAWINGLAYER_PRIMITIVE_SIMPLETRANSPARENCEPRIMITIVE_HXX #include <drawinglayer/primitive/simpletransparenceprimitive.hxx> #endif @@ -126,7 +122,7 @@ namespace drawinglayer void add3DPolyPolygonLinePrimitive( const ::basegfx::B3DPolyPolygon& rUnitPolyPolygon, const ::basegfx::B3DHomMatrix& rObjectTransform, - primitiveList& rTarget, + primitiveVector& rTarget, const sdrLineAttribute& rLine) { // prepare fully scaled polyPolygon @@ -137,24 +133,24 @@ namespace drawinglayer const strokeAttribute aStrokeAttribute(rLine.getColor(), rLine.getWidth(), rLine.getJoin(), rLine.getDotDashArray(), rLine.getFullDotDashLen()); // create primitives - primitiveList aNewPrimitiveList; + primitiveVector aNewPrimitiveVector; for(sal_uInt32 a(0L); a < aScaledPolyPolygon.count(); a++) { basePrimitive* pNewLinePrimitive = new polygonStrokePrimitive3D(aScaledPolyPolygon.getB3DPolygon(a), aStrokeAttribute); - aNewPrimitiveList.append(referencedPrimitive(*pNewLinePrimitive)); + aNewPrimitiveVector.push_back(referencedPrimitive(*pNewLinePrimitive)); } if(0.0 != rLine.getTransparence()) { // create simpleTransparencePrimitive, add created fill primitives - basePrimitive* pNewSimpleTransparenceTexturePrimitive3D = new simpleTransparenceTexturePrimitive3D(rLine.getTransparence(), aNewPrimitiveList); - rTarget.append(referencedPrimitive(*pNewSimpleTransparenceTexturePrimitive3D)); + basePrimitive* pNewSimpleTransparenceTexturePrimitive3D = new simpleTransparenceTexturePrimitive3D(rLine.getTransparence(), aNewPrimitiveVector); + rTarget.push_back(referencedPrimitive(*pNewSimpleTransparenceTexturePrimitive3D)); } else { // add to decomposition - rTarget.append(aNewPrimitiveList); + rTarget.insert(rTarget.end(), aNewPrimitiveVector.begin(), aNewPrimitiveVector.end()); } } @@ -162,7 +158,7 @@ namespace drawinglayer const ::std::vector< ::basegfx::B3DPolyPolygon >& r3DPolyPolygonVector, const ::basegfx::B3DHomMatrix& rObjectTransform, const ::basegfx::B2DVector& rTextureSize, - primitiveList& rTarget, + primitiveVector& rTarget, const sdr3DObjectAttribute& aSdr3DObjectAttribute, const sdrFillAttribute& rFill, const fillGradientAttribute* pFillGradient) @@ -170,7 +166,7 @@ namespace drawinglayer if(r3DPolyPolygonVector.size()) { // create list of simple fill primitives - primitiveList aNewPrimitiveList; + primitiveVector aNewPrimitiveVector; for(sal_uInt32 a(0L); a < r3DPolyPolygonVector.size(); a++) { @@ -187,7 +183,7 @@ namespace drawinglayer aScaledPolyPolygon, aSdr3DObjectAttribute.getMaterial(), aSdr3DObjectAttribute.getDoubleSided()); - aNewPrimitiveList.append(referencedPrimitive(*pNewFillPrimitive)); + aNewPrimitiveVector.push_back(referencedPrimitive(*pNewFillPrimitive)); } // look for and evtl. build texture sub-group primitive @@ -199,64 +195,65 @@ namespace drawinglayer if(rFill.isGradient()) { - // create gradientTexture3D with sublist, add to local aNewPrimitiveList - pNewTexturePrimitive3D = new gradientTexturePrimitive3D(*rFill.getGradient(), aNewPrimitiveList, rTextureSize, bModulate, bFilter); + // create gradientTexture3D with sublist, add to local aNewPrimitiveVector + pNewTexturePrimitive3D = new gradientTexturePrimitive3D(*rFill.getGradient(), aNewPrimitiveVector, rTextureSize, bModulate, bFilter); } else if(rFill.isHatch()) { - // create hatchTexture3D with sublist, add to local aNewPrimitiveList - pNewTexturePrimitive3D = new hatchTexturePrimitive3D(*rFill.getHatch(), aNewPrimitiveList, rTextureSize, bModulate, bFilter); + // create hatchTexture3D with sublist, add to local aNewPrimitiveVector + pNewTexturePrimitive3D = new hatchTexturePrimitive3D(*rFill.getHatch(), aNewPrimitiveVector, rTextureSize, bModulate, bFilter); } else // if(rFill.isBitmap()) { - // create bitmapTexture3D with sublist, add to local aNewPrimitiveList + // create bitmapTexture3D with sublist, add to local aNewPrimitiveVector ::basegfx::B2DRange aTexRange(0.0, 0.0, rTextureSize.getX(), rTextureSize.getY()); - pNewTexturePrimitive3D = new bitmapTexturePrimitive3D(rFill.getBitmap()->getFillBitmapAttribute(aTexRange), aNewPrimitiveList, rTextureSize, bModulate, bFilter); + pNewTexturePrimitive3D = new bitmapTexturePrimitive3D(rFill.getBitmap()->getFillBitmapAttribute(aTexRange), aNewPrimitiveVector, rTextureSize, bModulate, bFilter); } - // exchange aNewPrimitiveList content with texture group - aNewPrimitiveList.clear(); - aNewPrimitiveList.append(referencedPrimitive(*pNewTexturePrimitive3D)); + // exchange aNewPrimitiveVector content with texture group + aNewPrimitiveVector.clear(); + aNewPrimitiveVector.push_back(referencedPrimitive(*pNewTexturePrimitive3D)); if(::com::sun::star::drawing::TextureKind2_LUMINANCE == aSdr3DObjectAttribute.getTextureKind()) { // use modified color primitive to force textures to gray - basePrimitive* pModifiedColor = new modifiedColorPrimitive(::basegfx::BColor(), aNewPrimitiveList, 0.0, COLORMODIFY_GRAY); - aNewPrimitiveList.clear(); - aNewPrimitiveList.append(referencedPrimitive(*pModifiedColor)); + const ::basegfx::BColorModifier aBColorModifier(::basegfx::BColor(), 0.0, ::basegfx::BCOLORMODIFYMODE_GRAY); + basePrimitive* pModifiedColor = new modifiedColorPrimitive(aNewPrimitiveVector, aBColorModifier); + aNewPrimitiveVector.clear(); + aNewPrimitiveVector.push_back(referencedPrimitive(*pModifiedColor)); } } if(0.0 != rFill.getTransparence()) { // create simpleTransparenceTexturePrimitive3D with sublist and append - basePrimitive* pNewSimpleTransparenceTexturePrimitive3D = new simpleTransparenceTexturePrimitive3D(rFill.getTransparence(), aNewPrimitiveList); - rTarget.append(referencedPrimitive(*pNewSimpleTransparenceTexturePrimitive3D)); + basePrimitive* pNewSimpleTransparenceTexturePrimitive3D = new simpleTransparenceTexturePrimitive3D(rFill.getTransparence(), aNewPrimitiveVector); + rTarget.push_back(referencedPrimitive(*pNewSimpleTransparenceTexturePrimitive3D)); } else if(pFillGradient) { // create transparenceTexture3D with sublist and append - basePrimitive* pNewTransparenceTexturePrimitive3D = new transparenceTexturePrimitive3D(*pFillGradient, aNewPrimitiveList, rTextureSize); - rTarget.append(referencedPrimitive(*pNewTransparenceTexturePrimitive3D)); + basePrimitive* pNewTransparenceTexturePrimitive3D = new transparenceTexturePrimitive3D(*pFillGradient, aNewPrimitiveVector, rTextureSize); + rTarget.push_back(referencedPrimitive(*pNewTransparenceTexturePrimitive3D)); } else { // append list - rTarget.append(aNewPrimitiveList); + rTarget.insert(rTarget.end(), aNewPrimitiveVector.begin(), aNewPrimitiveVector.end()); } } } void addShadowPrimitive3D( - primitiveList& rTarget, + primitiveVector& rTarget, const sdrShadowAttribute& rShadow, bool bShadow3D) { // create Shadow primitives. Need to be added in front, should use already created primitives - if(rTarget.count() && !::basegfx::fTools::moreOrEqual(rShadow.getTransparence(), 1.0)) + if(rTarget.size() && !::basegfx::fTools::moreOrEqual(rShadow.getTransparence(), 1.0)) { // prepare new list for shadow geometry - primitiveList aNewList; + primitiveVector aNewList; // prepare shadow offset ::basegfx::B2DHomMatrix aShadowOffset; @@ -264,10 +261,10 @@ namespace drawinglayer aShadowOffset.set(1, 2, rShadow.getOffset().getY()); // create shadow primitive and add primitives - primitiveList aShadowPrimitiveList(rTarget); - shadowPrimitive3D* pNewShadow3D = new shadowPrimitive3D(aShadowOffset, rShadow.getColor(), rShadow.getTransparence(), bShadow3D, aShadowPrimitiveList); + primitiveVector aShadowPrimitiveVector(rTarget); + shadowPrimitive3D* pNewShadow3D = new shadowPrimitive3D(aShadowOffset, rShadow.getColor(), rShadow.getTransparence(), bShadow3D, aShadowPrimitiveVector); rTarget.clear(); - rTarget.append(referencedPrimitive(*pNewShadow3D)); + rTarget.push_back(referencedPrimitive(*pNewShadow3D)); } } } // end of namespace primitive diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index d2ee6898c75b..764b0c30d650 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrextrudeprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:55 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -71,7 +71,7 @@ namespace drawinglayer { namespace primitive { - void sdrExtrudePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void sdrExtrudePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { // get slices const sliceVector& rSliceVector = getSlices(); @@ -321,15 +321,6 @@ namespace drawinglayer return false; } - basePrimitive* sdrExtrudePrimitive3D::createNewClone() const - { - return new sdrExtrudePrimitive3D( - maTransform, maTextureSize, - maSdrLFSAttribute, maSdr3DObjectAttribute, - maPolyPolygon, mfDepth, mfDiagonal, mfBackScale, - mbSmoothNormals, mbSmoothHorizontalNormals, mbSmoothLids, mbCharacterMode, mbCloseFront, mbCloseBack); - } - PrimitiveID sdrExtrudePrimitive3D::getID() const { return CreatePrimitiveID('S', 'X', 'T', '3'); @@ -338,7 +329,7 @@ namespace drawinglayer ::basegfx::B3DRange sdrExtrudePrimitive3D::get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const { // use defaut from sdrPrimitive3D which uses transformation expanded by line width/2 - // The parent implementation which uses the ranges of the breakdown would be more + // The parent implementation which uses the ranges of the decomposition would be more // corrcet, but for historical reasons it is necessary to do the old method: To get // the range of the non-transformed geometry and transform it then. This leads to different // ranges where the new method is more correct, but the need to keep the old behaviour diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx index 81f1b7539d40..0a1bc369001d 100644 --- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrlatheprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:55 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:02 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -67,7 +67,7 @@ namespace drawinglayer { namespace primitive { - void sdrLathePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void sdrLathePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { // get slices const sliceVector& rSliceVector = getSlices(); @@ -327,13 +327,6 @@ namespace drawinglayer return false; } - basePrimitive* sdrLathePrimitive3D::createNewClone() const - { - return new sdrLathePrimitive3D(maTransform, maTextureSize, maSdrLFSAttribute, maSdr3DObjectAttribute, - maPolyPolygon, mnHorizontalSegments, mnVerticalSegments, mfDiagonal, mfBackScale, mfRotation, - mbSmoothNormals, mbSmoothHorizontalNormals, mbSmoothLids, mbCharacterMode, mbCloseFront, mbCloseBack); - } - PrimitiveID sdrLathePrimitive3D::getID() const { return CreatePrimitiveID('S', 'L', 'A', '3'); @@ -342,7 +335,7 @@ namespace drawinglayer ::basegfx::B3DRange sdrLathePrimitive3D::get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const { // use defaut from sdrPrimitive3D which uses transformation expanded by line width/2 - // The parent implementation which uses the ranges of the breakdown would be more + // The parent implementation which uses the ranges of the decomposition would be more // corrcet, but for historical reasons it is necessary to do the old method: To get // the range of the non-transformed geometry and transform it then. This leads to different // ranges where the new method is more correct, but the need to keep the old behaviour diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index 9d3ece4288c1..7d3f481c4004 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:56 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -128,12 +128,6 @@ namespace drawinglayer return false; } - - void sdrPrimitive3D::transform(const ::basegfx::B3DHomMatrix& rMatrix) - { - basePrimitive::transform(rMatrix); - maTransform *= rMatrix; - } } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index e6c6a1f68040..7f12d62b0835 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrsphereprimitive3d.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-05-19 09:34:56 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,10 +45,6 @@ #include <basegfx/polygon/b3dpolypolygontools.hxx> #endif -#ifndef _DRAWINGLAYER_PRIMITIVE_PRIMITIVELIST_HXX -#include <drawinglayer/primitive/primitivelist.hxx> -#endif - #ifndef _DRAWINGLAYER_PRIMITIVE3D_SDRDECOMPOSITIONTOOLS3D_HXX #include <drawinglayer/primitive3d/sdrdecompositiontools3d.hxx> #endif @@ -67,7 +63,7 @@ namespace drawinglayer { namespace primitive { - void sdrSpherePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void sdrSpherePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { const ::basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); @@ -201,14 +197,6 @@ namespace drawinglayer return false; } - basePrimitive* sdrSpherePrimitive3D::createNewClone() const - { - return new sdrSpherePrimitive3D( - maTransform, maTextureSize, - maSdrLFSAttribute, maSdr3DObjectAttribute, - mnHorizontalSegments, mnVerticalSegments); - } - PrimitiveID sdrSpherePrimitive3D::getID() const { return CreatePrimitiveID('S', 'S', 'P', '3'); @@ -217,7 +205,7 @@ namespace drawinglayer ::basegfx::B3DRange sdrSpherePrimitive3D::get3DRange(const ::drawinglayer::geometry::viewInformation& rViewInformation) const { // use defaut from sdrPrimitive3D which uses transformation expanded by line width/2 - // The parent implementation which uses the ranges of the breakdown would be more + // The parent implementation which uses the ranges of the decomposition would be more // corrcet, but for historical reasons it is necessary to do the old method: To get // the range of the non-transformed geometry and transform it then. This leads to different // ranges where the new method is more correct, but the need to keep the old behaviour diff --git a/drawinglayer/source/primitive3d/shadowprimitive3d.cxx b/drawinglayer/source/primitive3d/shadowprimitive3d.cxx index 821d300b4ec3..1848fc897c48 100644 --- a/drawinglayer/source/primitive3d/shadowprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/shadowprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: shadowprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:09 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -45,8 +45,8 @@ namespace drawinglayer { shadowPrimitive3D::shadowPrimitive3D( const ::basegfx::B2DHomMatrix& rShadowTransform, const ::basegfx::BColor& rShadowColor, - double fShadowTransparence, bool bShadow3D, const primitiveList& rPrimitiveList) - : listPrimitive(rPrimitiveList), + double fShadowTransparence, bool bShadow3D, const primitiveVector& rPrimitiveVector) + : vectorPrimitive(rPrimitiveVector), maShadowTransform(rShadowTransform), maShadowColor(rShadowColor), mfShadowTransparence(fShadowTransparence), @@ -60,7 +60,7 @@ namespace drawinglayer bool shadowPrimitive3D::operator==(const basePrimitive& rPrimitive) const { - if(listPrimitive::operator==(rPrimitive)) + if(vectorPrimitive::operator==(rPrimitive)) { const shadowPrimitive3D& rCompare = (shadowPrimitive3D&)rPrimitive; return (maShadowTransform == rCompare.maShadowTransform @@ -72,25 +72,10 @@ namespace drawinglayer return false; } - basePrimitive* shadowPrimitive3D::createNewClone() const - { - return new shadowPrimitive3D(maShadowTransform, maShadowColor, mfShadowTransparence, mbShadow3D, maPrimitiveList); - } - PrimitiveID shadowPrimitive3D::getID() const { return CreatePrimitiveID('S', 'H', 'D', '3'); } - - void shadowPrimitive3D::transform(const ::basegfx::B2DHomMatrix& rMatrix) - { - // call basePrimitive, not listPrimitive parent to not change the SubList - basePrimitive::transform(rMatrix); - - // add tansform to local transform matrix. Applying to local sub-list is not necessary, - // this is done at decomposition or left to the renderer to allow evtl. less copying - maShadowTransform *= rMatrix; - } } // end of namespace primitive } // end of namespace drawinglayer diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index dff1a141e970..135fcd5b4df3 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -4,9 +4,9 @@ * * $RCSfile: textureprimitive3d.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: aw $ $Date: 2006-05-12 11:49:09 $ + * last change: $Author: aw $ $Date: 2006-06-02 13:58:03 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -44,10 +44,10 @@ namespace drawinglayer namespace primitive { texturePrimitive3D::texturePrimitive3D( - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter) - : listPrimitive(rPrimitiveList), + : vectorPrimitive(rPrimitiveVector), maTextureSize(rTextureSize), mbModulate(bModulate), mbFilter(bFilter) @@ -60,7 +60,7 @@ namespace drawinglayer bool texturePrimitive3D::operator==(const basePrimitive& rPrimitive) const { - if(listPrimitive::operator==(rPrimitive)) + if(vectorPrimitive::operator==(rPrimitive)) { const texturePrimitive3D& rCompare = (texturePrimitive3D&)rPrimitive; return (mbModulate == rCompare.mbModulate && mbFilter == rCompare.mbFilter); @@ -77,20 +77,20 @@ namespace drawinglayer { namespace primitive { - void simpleTransparenceTexturePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void simpleTransparenceTexturePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { if(0.0 == mfTransparence) { // no transparence used, so just add the content - rTarget.append(maPrimitiveList); + rTarget.insert(rTarget.end(), maPrimitiveVector.begin(), maPrimitiveVector.end()); } else if(mfTransparence > 0.0 && mfTransparence < 1.0) { // create transparenceTexturePrimitive3D with fixed transparence as replacement const ::basegfx::BColor aGray(mfTransparence, mfTransparence, mfTransparence); const fillGradientAttribute aFillGradient(GRADIENTSTYLE_LINEAR, 0.0, 0.0, 0.0, 0.0, aGray, aGray, 1); - basePrimitive* pNewTransparenceTexturePrimitive3D = new transparenceTexturePrimitive3D(aFillGradient, maPrimitiveList, maTextureSize); - rTarget.append(referencedPrimitive(*pNewTransparenceTexturePrimitive3D)); + basePrimitive* pNewTransparenceTexturePrimitive3D = new transparenceTexturePrimitive3D(aFillGradient, maPrimitiveVector, maTextureSize); + rTarget.push_back(referencedPrimitive(*pNewTransparenceTexturePrimitive3D)); } else { @@ -100,8 +100,8 @@ namespace drawinglayer simpleTransparenceTexturePrimitive3D::simpleTransparenceTexturePrimitive3D( double fTransparence, - const primitiveList& rPrimitiveList) - : texturePrimitive3D(rPrimitiveList, ::basegfx::B2DVector(), false, false), + const primitiveVector& rPrimitiveVector) + : texturePrimitive3D(rPrimitiveVector, ::basegfx::B2DVector(), false, false), mfTransparence(fTransparence) { } @@ -121,11 +121,6 @@ namespace drawinglayer return false; } - basePrimitive* simpleTransparenceTexturePrimitive3D::createNewClone() const - { - return new simpleTransparenceTexturePrimitive3D(mfTransparence, maPrimitiveList); - } - PrimitiveID simpleTransparenceTexturePrimitive3D::getID() const { return CreatePrimitiveID('S', 'T', 'X', '3'); @@ -139,18 +134,18 @@ namespace drawinglayer { namespace primitive { - void gradientTexturePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void gradientTexturePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { - rTarget.append(maPrimitiveList); + rTarget.insert(rTarget.end(), maPrimitiveVector.begin(), maPrimitiveVector.end()); } gradientTexturePrimitive3D::gradientTexturePrimitive3D( const fillGradientAttribute& rGradient, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter) - : texturePrimitive3D(rPrimitiveList, rTextureSize, bModulate, bFilter), + : texturePrimitive3D(rPrimitiveVector, rTextureSize, bModulate, bFilter), maGradient(rGradient) { } @@ -170,11 +165,6 @@ namespace drawinglayer return false; } - basePrimitive* gradientTexturePrimitive3D::createNewClone() const - { - return new gradientTexturePrimitive3D(maGradient, maPrimitiveList, maTextureSize, mbModulate, mbFilter); - } - PrimitiveID gradientTexturePrimitive3D::getID() const { return CreatePrimitiveID('G', 'R', 'X', '3'); @@ -188,17 +178,17 @@ namespace drawinglayer { namespace primitive { - void bitmapTexturePrimitive3D::decompose(primitiveList& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) + void bitmapTexturePrimitive3D::decompose(primitiveVector& rTarget, const ::drawinglayer::geometry::viewInformation& rViewInformation) { - rTarget.append(maPrimitiveList); + rTarget.insert(rTarget.end(), maPrimitiveVector.begin(), maPrimitiveVector.end()); } bitmapTexturePrimitive3D::bitmapTexturePrimitive3D( const fillBitmapAttribute& rBitmap, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize, bool bModulate, bool bFilter) - : texturePrimitive3D(rPrimitiveList, rTextureSize, bModulate, bFilter), + : texturePrimitive3D(rPrimitiveVector, rTextureSize, bModulate, bFilter), maBitmap(rBitmap) { } @@ -218,11 +208,6 @@ namespace drawinglayer return false; } - basePrimitive* bitmapTexturePrimitive3D::createNewClone() const - { - return new bitmapTexturePrimitive3D(maBitmap, maPrimitiveList, maTextureSize, mbModulate, mbFilter); - } - PrimitiveID bitmapTexturePrimitive3D::getID() const { return CreatePrimitiveID('B', 'M', 'X', '3'); @@ -238,9 +223,9 @@ namespace drawinglayer { transparenceTexturePrimitive3D::transparenceTexturePrimitive3D( const fillGradientAttribute& rGradient, - const primitiveList& rPrimitiveList, + const primitiveVector& rPrimitiveVector, const ::basegfx::B2DVector& rTextureSize) - : gradientTexturePrimitive3D(rGradient, rPrimitiveList, rTextureSize, false, false) + : gradientTexturePrimitive3D(rGradient, rPrimitiveVector, rTextureSize, false, false) { } @@ -253,11 +238,6 @@ namespace drawinglayer return (gradientTexturePrimitive3D::operator==(rPrimitive)); } - basePrimitive* transparenceTexturePrimitive3D::createNewClone() const - { - return new transparenceTexturePrimitive3D(maGradient, maPrimitiveList, maTextureSize); - } - PrimitiveID transparenceTexturePrimitive3D::getID() const { return CreatePrimitiveID('T', 'R', 'X', '3'); diff --git a/drawinglayer/util/makefile.mk b/drawinglayer/util/makefile.mk index 84b1a12c20f2..b2c089facf64 100644 --- a/drawinglayer/util/makefile.mk +++ b/drawinglayer/util/makefile.mk @@ -4,9 +4,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # -# last change: $Author: aw $ $Date: 2006-05-12 11:42:54 $ +# last change: $Author: aw $ $Date: 2006-06-02 13:58:03 $ # # The Contents of this file are made available subject to # the terms of GNU Lesser General Public License Version 2.1. @@ -49,6 +49,7 @@ LIB1FILES=\ $(SLB)$/primitive.lib \ $(SLB)$/primitive3d.lib \ $(SLB)$/geometry.lib \ + $(SLB)$/processor.lib \ $(SLB)$/animation.lib SHL1TARGET= drawinglayer$(UPD)$(DLLPOSTFIX) |