diff options
author | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-09-17 17:20:13 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@Sun.COM> | 2009-09-17 17:20:13 +0200 |
commit | a0f979d5bf4428f0110c408cc32d1ba670394f07 (patch) | |
tree | 471040ac29f6b7e3759f67a69db7936d92c321a0 /drawinglayer | |
parent | #i97509# changed base classes for primitives which need no buffering (diff) | |
download | core-a0f979d5bf4428f0110c408cc32d1ba670394f07.tar.gz core-a0f979d5bf4428f0110c408cc32d1ba670394f07.zip |
#i97509# added base class for 3d primitive, re-structured group primitives, added documentation
Diffstat (limited to 'drawinglayer')
86 files changed, 316 insertions, 279 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx index 296d56efe6d8..1fcde759ed68 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx @@ -99,7 +99,7 @@ namespace drawinglayer { protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedBlinkPrimitive2D( @@ -163,7 +163,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: AnimatedInterpolatePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx index 5731a1e45ee6..7b998fd3e749 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BackgroundColorPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx index 416fdd2d9816..f41863f36992 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx @@ -106,7 +106,7 @@ namespace drawinglayer unique UNO APIs may be defined/implemented for these set to allow more intense work with primitives using UNO. - Current five Basic Primitives are: + Current Basic 2D Primitives are: - BitmapPrimitive2D (bitmap data, evtl. with alpha) - MetafilePrimitive2D (VCL Metafile, currently no decomposition, but planned, so may vanish) @@ -119,13 +119,7 @@ namespace drawinglayer A renderer implementing support for this minimal set of primitives can completely render primitive-based visualisations. Of course, he also has to take states into account - which are representated by the following GroupPrimitive2D derivations: - - - AlphaPrimitive2D (objects with freely defined transparence) - - InvertPrimitive2D (for XOR) - - MaskPrimitive2D (for masking) - - ModifiedColorPrimitive2D (for a stack of color modifications) - - TransformPrimitive2D (for a transformation stack) + which are representated by GroupPrimitive2D derivations, see groupprimitive2d.hxx To support getting the geometric BoundRect, getB2DRange is used. The default implementation will use the get2DDecomposition result and merge a range from the @@ -214,9 +208,9 @@ namespace drawinglayer primitive implementations which support a decomposition as base class. The buffering is done by holding the last decomposition in the local parameter - maLocal2DDecomposition. The default implementation of get2DDecomposition checks - if maLocal2DDecomposition is empty. If yes, it uses createLocal2DDecomposition - to create the content. In all cases, maLocal2DDecomposition is returned. + maBuffered2DDecomposition. The default implementation of get2DDecomposition checks + if maBuffered2DDecomposition is empty. If yes, it uses create2DDecomposition + to create the content. In all cases, maBuffered2DDecomposition is returned. For view-dependent primitives derived from Primitive2DBufferDecomposition more needs to be done when the decomposition depends on parts of the parameter ViewInformation2D. @@ -227,39 +221,39 @@ namespace drawinglayer (this may be a complete local copy of ViewInformation2D) (b) If a buffered decomposition exists, ckeck if one of the new local parameters differs from the corresponding locally remembered (as member) ones. If yes, - clear maLocal2DDecomposition - (d) call baseclass::get2DDecomposition which will use createLocal2DDecomposition - to fill maLocal2DDecomposition if it's empty + clear maBuffered2DDecomposition + (d) call baseclass::get2DDecomposition which will use create2DDecomposition + to fill maBuffered2DDecomposition if it's empty (e) copy the new local parameters to the corresponding locally remembered ones to identify if a new decomposition is needed at the next call - (f) return maLocal2DDecomposition + (f) return maBuffered2DDecomposition */ class BufferedDecompositionPrimitive2D : public BasePrimitive2D { private: - /// a sequence used for buffering the last createLocal2DDecomposition() result - Primitive2DSequence maLocal2DDecomposition; + /// a sequence used for buffering the last create2DDecomposition() result + Primitive2DSequence maBuffered2DDecomposition; protected: - /** access methods to maLocal2DDecomposition. The usage of this methods may allow + /** access methods to maBuffered2DDecomposition. The usage of this methods may allow later thread-safe stuff to be added if needed. Only to be used by getDecomposition() implementations for buffering the last decomposition. */ - const Primitive2DSequence& getLocal2DDecomposition() const { return maLocal2DDecomposition; } - void setLocal2DDecomposition(const Primitive2DSequence& rNew) { maLocal2DDecomposition = rNew; } + const Primitive2DSequence& getBuffered2DDecomposition() const { return maBuffered2DDecomposition; } + void setBuffered2DDecomposition(const Primitive2DSequence& rNew) { maBuffered2DDecomposition = rNew; } /** method which is to be used to implement the local decomposition of a 2D primitive. The default implementation will just return an empty decomposition */ - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // constructor/destructor BufferedDecompositionPrimitive2D(); - /** The getDecomposition default implementation will on demand use createLocal2DDecomposition() if - maLocal2DDecomposition is empty. It will set maLocal2DDecomposition to this obtained decomposition + /** The getDecomposition default implementation will on demand use create2DDecomposition() if + maBuffered2DDecomposition is empty. It will set maBuffered2DDecomposition to this obtained decomposition to buffer it. If the decomposition is also ViewInformation2D-dependent, this method needs to be overloaded and the ViewInformation2D for the last decomposition need to be remembered, too, and be used in the next call to decide if the buffered decomposition may be reused or not. @@ -282,7 +276,7 @@ namespace drawinglayer // get B2DRange from a given Primitive2DSequence basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) // and using compare operator bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 88ca4c02935b..209b0ed17e40 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -107,7 +107,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: BorderLinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx index 591407302a37..974faf506da8 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx @@ -64,13 +64,13 @@ namespace drawinglayer // and from thereon always used and returned by getXControl() void createXControl(); - // single local decompositions, used from createLocal2DDecomposition() + // single local decompositions, used from create2DDecomposition() Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const; Primitive2DReference createPlaceholderDecomposition(const geometry::ViewInformation2D& rViewInformation) const; protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: ControlPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx index aef3c0173b43..86540d53e325 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx @@ -85,7 +85,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: Embedded3DPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx index 012824f187bd..c2d305b78c11 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx index fbf4e7c34a3f..f995bb487b33 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx @@ -54,7 +54,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillGradientPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx index 10cb9a622140..6181630e948d 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: FillHatchPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx index cfc29ac8d06e..33923eebc259 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GraphicPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx index 1b1325c4b4f9..d2b90e271cda 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx @@ -68,7 +68,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: GridPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx index bf30efb66311..cd6efef472bb 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx @@ -63,6 +63,17 @@ namespace drawinglayer In most cases the decomposition is straightforward, so by default this primitive will not buffer the result and is not derived from BufferedDecompositionPrimitive2D, but from BasePrimitive2D. + + A renderer has to take GroupPrimitive2D derivations into account which + are used to hold a state. + + Current Basic 2D StatePrimitives are: + + - AlphaPrimitive2D (objects with freely defined transparence) + - InvertPrimitive2D (for XOR) + - MaskPrimitive2D (for masking) + - ModifiedColorPrimitive2D (for a stack of color modifications) + - TransformPrimitive2D (for a transformation stack) */ class GroupPrimitive2D : public BasePrimitive2D { diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx index 53abdfa133c8..0ba83b2c383a 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx @@ -70,7 +70,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: HelplinePrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx index 02f254368bc1..77f450403302 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx @@ -55,7 +55,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MarkerArrayPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx index f5d21fa40e3e..da8e49b644c6 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx @@ -56,7 +56,7 @@ namespace drawinglayer protected: // local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: MediaPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx index f44de611d609..52ed2435f5e7 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx @@ -75,7 +75,7 @@ namespace drawinglayer protected: // local decomposition. Implementation will just return children - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PagePreviewPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index c82f54fdfab0..4e04786fb2e5 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -94,7 +94,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonMarkerPrimitive2D( @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonWavePrimitive2D( @@ -231,7 +231,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolygonStrokeArrowPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index d152b962de25..516210a6a081 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -59,7 +59,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); @@ -97,7 +97,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonMarkerPrimitive2D( @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokePrimitive2D( @@ -184,7 +184,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonStrokeArrowPrimitive2D( @@ -264,7 +264,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonGradientPrimitive2D( @@ -298,7 +298,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonHatchPrimitive2D( @@ -332,7 +332,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: PolyPolygonBitmapPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx index 3a0977003915..f7e9b1dcac0b 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx @@ -41,7 +41,7 @@ ////////////////////////////////////////////////////////////////////////////// // tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the size of a discrete unit. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocal2DDecomposition +// guards the buffered local decomposition and ensures that a create2DDecomposition // implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit() namespace drawinglayer @@ -53,7 +53,7 @@ namespace drawinglayer private: // the last used fDiscreteUnit definitions for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocal2DDecomposition() + // usable in create2DDecomposition() double mfDiscreteUnit; public: @@ -75,7 +75,7 @@ namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// // tooling class for BufferedDecompositionPrimitive2D baseed classes which are view-dependent // regarding the viewport. The implementation of get2DDecomposition -// guards the buffered local decomposition and ensures that a createLocal2DDecomposition +// guards the buffered local decomposition and ensures that a create2DDecomposition // implementation may use an up-to-date Viewport accessible using getViewport() namespace drawinglayer @@ -87,7 +87,7 @@ namespace drawinglayer private: // the last used Viewport definition for decomposition. Since this // is checked and updated from get2DDecomposition() it will be current and - // usable in createLocal2DDecomposition() + // usable in create2DDecomposition() basegfx::B2DRange maViewport; public: diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx index 0f8e55492688..f190c3e6c1e1 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx @@ -80,11 +80,11 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: // public helpers - // Geometry extractor. Shadow will be added as in createLocal2DDecomposition, but + // Geometry extractor. Shadow will be added as in create2DDecomposition, but // the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This // helper is useful e.g. for Contour extraction or HitTests. Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index 5328b29e963a..536b267f2fbd 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -151,7 +151,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextDecoratedPortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx index 2a9c890b2b3d..19f910f3444d 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx @@ -71,7 +71,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextEffectPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx index 775fa2bd36e5..14b44f80dbfe 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx @@ -140,7 +140,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: TextSimplePortionPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx index bddb951bea9c..6bf84a401891 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer protected: // create local decomposition - virtual Primitive2DSequence createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const; public: WrongSpellPrimitive2D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx index 4dc5a7da4acb..73d28c82ebda 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx @@ -79,7 +79,12 @@ namespace drawinglayer /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D The description/functionality is identical with the 2D case in baseprimitive2d.hxx, - please see there for detailed information + please see there for detailed information. + + Current Basic 3D Primitives are: + + - PolygonHairlinePrimitive3D (for 3D hairlines) + - PolyPolygonMaterialPrimitive3D (for 3D filled plane polygons) */ class BasePrimitive3D : private boost::noncopyable, @@ -96,7 +101,7 @@ namespace drawinglayer /** the ==operator is mainly needed to allow testing newly-created high level primitives against their last incarnation which buffers/holds the decompositionsThe default implementation uses getPrimitive3DID()-calls to test if it's the same ID at last. Overloaded implementation are then - based on this implementation + based on this implementation. */ virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; bool operator!=( const BasePrimitive3D& rPrimitive ) const { return !operator==(rPrimitive); } @@ -133,7 +138,7 @@ namespace drawinglayer } // end of namespace drawinglayer ////////////////////////////////////////////////////////////////////////////// -// BufDecPrimitive3D class +// BufferedDecompositionPrimitive3D class namespace drawinglayer { @@ -144,32 +149,32 @@ namespace drawinglayer The description/functionality is identical with the 2D case in baseprimitive2d.hxx, please see there for detailed information */ - class BufDecPrimitive3D + class BufferedDecompositionPrimitive3D : public BasePrimitive3D { private: - /// a sequence used for buffering the last createLocal3DDecomposition() result - Primitive3DSequence maLocal3DDecomposition; + /// a sequence used for buffering the last create3DDecomposition() result + Primitive3DSequence maBuffered3DDecomposition; protected: - /** access methods to maLocal3DDecomposition. The usage of this methods may allow + /** access methods to maBuffered3DDecomposition. The usage of this methods may allow later thread-safe stuff to be added if needed. Only to be used by getDecomposition() implementations for buffering the last decomposition. */ - const Primitive3DSequence& getLocal3DDecomposition() const { return maLocal3DDecomposition; } - void setLocal3DDecomposition(const Primitive3DSequence& rNew) { maLocal3DDecomposition = rNew; } + const Primitive3DSequence& getBuffered3DDecomposition() const { return maBuffered3DDecomposition; } + void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; } /** method which is to be used to implement the local decomposition of a 2D primitive. The default implementation will just return an empty decomposition */ - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: // constructor - BufDecPrimitive3D(); + BufferedDecompositionPrimitive3D(); - /** The getDecomposition default implementation will on demand use createLocal3DDecomposition() if - maLocal3DDecomposition is empty. It will set maLocal3DDecomposition to this obtained decomposition + /** The getDecomposition default implementation will on demand use create3DDecomposition() if + maBuffered3DDecomposition is empty. It will set maBuffered3DDecomposition to this obtained decomposition to buffer it. If the decomposition is also ViewInformation-dependent, this method needs to be overloaded and the ViewInformation for the last decomposition needs to be remembered, too, and be used in the next call to decide if the buffered decomposition may be reused or not. @@ -192,7 +197,7 @@ namespace drawinglayer // get range3D from a given Primitive3DSequence basegfx::B3DRange getB3DRangeFromPrimitive3DSequence(const Primitive3DSequence& rCandidate, const geometry::ViewInformation3D& aViewInformation); - // compare two Primitive2DReferences for equality, including trying to get implementations (BufferedDecompositionPrimitive2D) + // compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D) // and using compare operator bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB); diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx index 93ca09af8e93..6912ff25b04d 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx @@ -44,16 +44,29 @@ namespace drawinglayer { namespace primitive3d { - class GroupPrimitive3D : public BufDecPrimitive3D + /** Baseclass for all grouping 3D primitives + + The description/functionality is identical with the 2D case in groupprimitive2d.hxx, + please see there for detailed information. + + Current Basic 3D StatePrimitives are: + + - ModifiedColorPrimitive3D (for a stack of color modifications) + - ShadowPrimitive3D (for 3D objects with shadow; this is a special case + since the shadow of a 3D primitive is a 2D primitive set) + - TexturePrimitive3D (with the following variations) + - GradientTexturePrimitive3D (for 3D gradient fill) + - BitmapTexturePrimitive3D (for 3D Bitmap fill) + - AlphaTexturePrimitive3D (for 3D transparence) + - HatchTexturePrimitive3D (for 3D hatch fill) + - TransformPrimitive3D (for a transformation stack) + */ + class GroupPrimitive3D : public BasePrimitive3D { private: // the children. Declared private since this shall never be changed at all after construction Primitive3DSequence maChildren; - protected: - // local decomposition. Implementation will just return children - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: // constructor GroupPrimitive3D(const Primitive3DSequence& rChildren); @@ -64,6 +77,9 @@ namespace drawinglayer // compare operator virtual bool operator==( const BasePrimitive3D& rPrimitive ) const; + // local decomposition. Implementation will just return children + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx index a8ce982f3560..2e1d7e0b5fe4 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx @@ -44,14 +44,24 @@ namespace drawinglayer { namespace primitive3d { + /** HatchTexturePrimitive3D is derived from GroupPrimitive3D, but implements + a decomposition which is complicated enough for buffering. Since the group + primitive has no default buffering, it is necessary here to add a local + buffering mechanism for the decomposition + */ class HatchTexturePrimitive3D : public TexturePrimitive3D { private: attribute::FillHatchAttribute maHatch; + Primitive3DSequence maBuffered3DDecomposition; protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + /// helper: local decomposition + Primitive3DSequence impCreate3DDecomposition() const; + + /// local access methods to maBufferedDecomposition + const Primitive3DSequence& getBuffered3DDecomposition() const { return maBuffered3DDecomposition; } + void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; } public: HatchTexturePrimitive3D( @@ -67,6 +77,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; + // local decomposition. + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx index f79fe21dd920..0c5082699e8d 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx @@ -56,11 +56,6 @@ namespace drawinglayer // use it and it's children subcontent. class HitTestPrimitive3D : public GroupPrimitive3D { - protected: - // local decomposition. Implementation will return empty Primitive3DSequence - // since this is no visualisation data - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: HitTestPrimitive3D(const Primitive3DSequence& rChildren); @@ -69,6 +64,10 @@ namespace drawinglayer // the local implementation will return the children's range virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const; + // local decomposition. Implementation will return empty Primitive3DSequence + // since this is no visualisation data + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index b54f5e6c6119..9b97f60d3642 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonHairlinePrimitive3D : public BufDecPrimitive3D + class PolygonHairlinePrimitive3D : public BasePrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -81,7 +81,7 @@ namespace drawinglayer { namespace primitive3d { - class PolygonStrokePrimitive3D : public BufDecPrimitive3D + class PolygonStrokePrimitive3D : public BufferedDecompositionPrimitive3D { private: basegfx::B3DPolygon maPolygon; @@ -90,7 +90,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonStrokePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index 1fa43c0e27fc..5ce81e8c7ad6 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -62,7 +62,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: PolygonTubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx index 2069ab08cdb2..1c5b9e400bbb 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx @@ -46,7 +46,7 @@ namespace drawinglayer { namespace primitive3d { - class PolyPolygonMaterialPrimitive3D : public BufDecPrimitive3D + class PolyPolygonMaterialPrimitive3D : public BasePrimitive3D { private: basegfx::B3DPolyPolygon maPolyPolygon; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx index 13ccc8d80411..42a9ab94f327 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx @@ -48,7 +48,7 @@ namespace drawinglayer { protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrCubePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx index e3b96a1b0d3e..a5975b050797 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx @@ -77,7 +77,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrExtrudePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx index 0925d798a52a..7d80cbde015c 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx @@ -91,7 +91,7 @@ namespace drawinglayer const basegfx::B2DPoint& rEnd) const; // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrLathePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx index bd020022f12f..b0d7cc5c26a2 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrPolyPolygonPrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx index 729de313267a..d2296968a000 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx @@ -47,9 +47,13 @@ namespace drawinglayer { + /** base class for the more complicated geometric primitives, so + derive from buffered primitive to allow overloading of + create3DDecomposition there + */ namespace primitive3d { - class SdrPrimitive3D : public BufDecPrimitive3D + class SdrPrimitive3D : public BufferedDecompositionPrimitive3D { private: basegfx::B3DHomMatrix maTransform; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx index 38a0f94ee07b..3e6349df0bb9 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx @@ -52,7 +52,7 @@ namespace drawinglayer protected: // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; public: SdrSpherePrimitive3D( diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx index c351fcd0aff0..a0c18f34788e 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx @@ -88,10 +88,6 @@ namespace drawinglayer private: double mfTransparence; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: UnifiedAlphaTexturePrimitive3D( double fTransparence, @@ -103,6 +99,9 @@ namespace drawinglayer // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; + // local decomposition. + virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; + // provide unique ID DeclPrimitrive3DIDBlock() }; @@ -120,10 +119,6 @@ namespace drawinglayer private: attribute::FillGradientAttribute maGradient; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: GradientTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, @@ -155,10 +150,6 @@ namespace drawinglayer private: attribute::FillBitmapAttribute maBitmap; - protected: - // local decomposition. - virtual Primitive3DSequence createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const; - public: BitmapTexturePrimitive3D( const attribute::FillBitmapAttribute& rBitmap, diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx index 5139b4d72119..fceae8dbeb31 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. + // virtual render method when the primitive implementation is BasePrimitive2D-based. // Default implementation does nothing virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx index ac15ec5f12cf..0c356e731169 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx @@ -103,7 +103,7 @@ namespace drawinglayer LanguageType meLang; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufferedDecompositionPrimitive2D-based. + // virtual render method when the primitive implementation is BasePrimitive2D-based. virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate); // direct primitive renderer support diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx index 8e2023c7e1bc..effc509d9981 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx @@ -57,7 +57,7 @@ namespace drawinglayer } // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. // Default implementation does nothing virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); diff --git a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx index e43fc0d7d8b3..457ede952ccd 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx @@ -61,7 +61,7 @@ namespace drawinglayer basegfx::BColorModifierStack maBColorModifierStack; // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx index ddb1d0179073..abb92693a037 100644 --- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx +++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx @@ -89,7 +89,7 @@ namespace drawinglayer basegfx::B2DPolyPolygon impDoShadowProjection(const basegfx::B3DPolyPolygon& rSource); // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate); public: diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index d2b824962fbf..b99168d1cb1e 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -114,7 +114,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedBlinkPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedBlinkPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(getChildren().hasElements()) { @@ -178,7 +178,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence AnimatedInterpolatePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence AnimatedInterpolatePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { const sal_uInt32 nSize(maMatrixStack.size()); diff --git a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx index 723a684c51ec..d425b1ea3138 100644 --- a/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/backgroundcolorprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BackgroundColorPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence BackgroundColorPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { if(!rViewInformation.getViewport().isEmpty()) { @@ -98,13 +98,13 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) + if(getBuffered2DDecomposition().hasElements() && (maLastViewport != rViewInformation.getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< BackgroundColorPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< BackgroundColorPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange const_cast< BackgroundColorPrimitive2D* >(this)->maLastViewport = rViewInformation.getViewport(); diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index db391ab1b548..dffde631b8c3 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -94,14 +94,14 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BufferedDecompositionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BufferedDecompositionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { return Primitive2DSequence(); } BufferedDecompositionPrimitive2D::BufferedDecompositionPrimitive2D() : BasePrimitive2D(), - maLocal2DDecomposition() + maBuffered2DDecomposition() { } @@ -109,13 +109,13 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { - const Primitive2DSequence aNewSequence(createLocal2DDecomposition(rViewInformation)); - const_cast< BufferedDecompositionPrimitive2D* >(this)->setLocal2DDecomposition(aNewSequence); + const Primitive2DSequence aNewSequence(create2DDecomposition(rViewInformation)); + const_cast< BufferedDecompositionPrimitive2D* >(this)->setBuffered2DDecomposition(aNewSequence); } - return getLocal2DDecomposition(); + return getBuffered2DDecomposition(); } } // end of namespace primitive2d } // end of namespace drawinglayer @@ -135,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BufferedDecompositionPrimitive2D* pCandidate(dynamic_cast< BufferedDecompositionPrimitive2D* >(rCandidate.get())); + const BasePrimitive2D* pCandidate(dynamic_cast< BasePrimitive2D* >(rCandidate.get())); if(pCandidate) { @@ -185,8 +185,8 @@ namespace drawinglayer return true; } - const BufferedDecompositionPrimitive2D* pA(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxA.get())); - const BufferedDecompositionPrimitive2D* pB(dynamic_cast< const BufferedDecompositionPrimitive2D* >(rxB.get())); + const BasePrimitive2D* pA(dynamic_cast< const BasePrimitive2D* >(rxA.get())); + const BasePrimitive2D* pB(dynamic_cast< const BasePrimitive2D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 205f11d688b0..1341a22f0d89 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -49,7 +49,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence BorderLinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence BorderLinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence xRetval; diff --git a/drawinglayer/source/primitive2d/controlprimitive2d.cxx b/drawinglayer/source/primitive2d/controlprimitive2d.cxx index 46392106f410..d3ddf3c8657f 100644 --- a/drawinglayer/source/primitive2d/controlprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/controlprimitive2d.cxx @@ -266,7 +266,7 @@ namespace drawinglayer return xRetval; } - Primitive2DSequence ControlPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ControlPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // try to create a bitmap decomposition. If that fails for some reason, // at least create a replacement decomposition. @@ -365,16 +365,16 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); const basegfx::B2DVector aNewScaling(rViewInformation.getObjectToViewTransformation() * basegfx::B2DVector(1.0, 1.0)); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(!maLastViewScaling.equal(aNewScaling)) { // conditions of last local decomposition have changed, delete - const_cast< ControlPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ControlPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewTransformation const_cast< ControlPrimitive2D* >(this)->maLastViewScaling = aNewScaling; diff --git a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx index c796048a4bf3..0c0a863733de 100644 --- a/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/embedded3dprimitive2d.cxx @@ -84,7 +84,7 @@ namespace drawinglayer return maShadowPrimitives.hasElements(); } - Primitive2DSequence Embedded3DPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence Embedded3DPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // use info to create a yellow 2d rectangle, similar to empty 3d scenes and/or groups const basegfx::B2DRange aLocal2DRange(getB2DRange(rViewInformation)); diff --git a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx index 636c798f448c..57d5d7c00c7c 100644 --- a/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillbitmapprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const Size aTileSizePixel(getFillBitmap().getBitmap().GetSizePixel()); Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index 283123621cee..2bc280b577fd 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -54,7 +54,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const attribute::GradientStyle aGradientStyle(maFillGradient.getStyle()); ::std::vector< basegfx::B2DHomMatrix > aMatrices; diff --git a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx index 1446e5677cdf..9e6e69516d43 100644 --- a/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillhatchprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence FillHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence FillHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create hatch const basegfx::BColor aHatchColor(maFillHatch.getColor()); diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx index 8f1e138d4ca4..b28bc2147187 100644 --- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx @@ -211,7 +211,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GraphicPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence GraphicPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/gridprimitive2d.cxx b/drawinglayer/source/primitive2d/gridprimitive2d.cxx index 083b5adefa9c..a449fa396c68 100644 --- a/drawinglayer/source/primitive2d/gridprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/gridprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence GridPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence GridPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -299,16 +299,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< GridPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< GridPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< GridPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx index 3b67c7714796..251ac110acd6 100644 --- a/drawinglayer/source/primitive2d/helplineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/helplineprimitive2d.cxx @@ -54,9 +54,9 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence HelplinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence HelplinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { - std::vector< BufferedDecompositionPrimitive2D* > aTempPrimitiveTarget; + std::vector< BasePrimitive2D* > aTempPrimitiveTarget; if(!rViewInformation.getViewport().isEmpty() && !getDirection().equalZero()) { @@ -200,16 +200,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastViewport != rViewInformation.getViewport() || maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< HelplinePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< HelplinePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< HelplinePrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx index b61f5df4bb5f..acb2335c0d1f 100644 --- a/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/markerarrayprimitive2d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MarkerArrayPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MarkerArrayPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; const std::vector< basegfx::B2DPoint >& rPositions = getPositions(); diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx index df95b7a87c29..ba8f81448968 100644 --- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence MediaPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence MediaPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval(1); diff --git a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx index 496415efdba4..ba879d9056c9 100644 --- a/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/pagepreviewprimitive2d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PagePreviewPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PagePreviewPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence xRetval; Primitive2DSequence aContent(getPageContent()); diff --git a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx index 4a3678645571..69cbd046efd2 100644 --- a/drawinglayer/source/primitive2d/polygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polygonprimitive2d.cxx @@ -110,7 +110,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence PolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { // calculate logic DashLength const basegfx::B2DVector aDashVector(rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(getDiscreteDashLength(), 0.0)); @@ -198,7 +198,7 @@ namespace drawinglayer ::osl::MutexGuard aGuard( m_aMutex ); bool bNeedNewDecomposition(false); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(rViewInformation.getInverseObjectToViewTransformation() != maLastInverseObjectToViewTransformation) { @@ -209,10 +209,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< PolygonMarkerPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< PolygonMarkerPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember last used InverseObjectToViewTransformation PolygonMarkerPrimitive2D* pThat = const_cast< PolygonMarkerPrimitive2D* >(this); @@ -235,7 +235,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { if(getB2DPolygon().count()) { @@ -392,7 +392,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonWavePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonWavePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; @@ -505,7 +505,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // copy local polygon, it may be changed basegfx::B2DPolygon aLocalPolygon(getB2DPolygon()); diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx index 163c3a8691aa..7c8688fed31f 100644 --- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHairlinePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHairlinePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -117,7 +117,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonMarkerPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonMarkerPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -185,7 +185,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -268,7 +268,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonStrokeArrowPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { const basegfx::B2DPolyPolygon aPolyPolygon(getB2DPolyPolygon()); const sal_uInt32 nCount(aPolyPolygon.count()); @@ -404,7 +404,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonGradientPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonGradientPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillGradientPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -451,7 +451,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonHatchPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonHatchPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillHatchPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); @@ -498,7 +498,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence PolyPolygonBitmapPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence PolyPolygonBitmapPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // create SubSequence with FillBitmapPrimitive2D const basegfx::B2DRange aPolyPolygonRange(getB2DPolyPolygon().getB2DRange()); diff --git a/drawinglayer/source/primitive2d/primitivetools2d.cxx b/drawinglayer/source/primitive2d/primitivetools2d.cxx index b441bb1b89ff..30af3a998daf 100644 --- a/drawinglayer/source/primitive2d/primitivetools2d.cxx +++ b/drawinglayer/source/primitive2d/primitivetools2d.cxx @@ -53,13 +53,13 @@ namespace drawinglayer // get the current DiscreteUnit const double fDiscreteUnit((rViewInformation.getInverseObjectToViewTransformation() * basegfx::B2DVector(1.0, 0.0)).getLength()); - if(getLocal2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) + if(getBuffered2DDecomposition().hasElements() && !basegfx::fTools::equal(fDiscreteUnit, getDiscreteUnit())) { // conditions of last local decomposition have changed, delete - const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< DiscreteMetricDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< DiscreteMetricDependentPrimitive2D* >(this)->mfDiscreteUnit = fDiscreteUnit; @@ -84,13 +84,13 @@ namespace drawinglayer // get the current Viewport const basegfx::B2DRange& rViewport = rViewInformation.getViewport(); - if(getLocal2DDecomposition().hasElements() && !rViewport.equal(getViewport())) + if(getBuffered2DDecomposition().hasElements() && !rViewport.equal(getViewport())) { // conditions of last local decomposition have changed, delete - const_cast< ViewportDependentPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ViewportDependentPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember new valid DiscreteUnit const_cast< ViewportDependentPrimitive2D* >(this)->maViewport = rViewport; diff --git a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx index 935b5a14c2d9..cfeb5e35edc5 100644 --- a/drawinglayer/source/primitive2d/sceneprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/sceneprimitive2d.cxx @@ -158,7 +158,7 @@ namespace drawinglayer } } - Primitive2DSequence ScenePrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence ScenePrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -365,7 +365,7 @@ namespace drawinglayer bool bNeedNewDecomposition(false); bool bDiscreteSizesAreCalculated(false); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { basegfx::B2DRange aVisibleDiscreteRange; calculateDsicreteSizes(rViewInformation, aDiscreteRange, aVisibleDiscreteRange, aUnitVisibleRange); @@ -392,10 +392,10 @@ namespace drawinglayer if(bNeedNewDecomposition) { // conditions of last local decomposition have changed, delete - const_cast< ScenePrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< ScenePrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { if(!bDiscreteSizesAreCalculated) { diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 695c92d2b951..787e221c406f 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -602,7 +602,7 @@ namespace drawinglayer } } - Primitive2DSequence TextDecoratedPortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextDecoratedPortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { std::vector< Primitive2DReference > aNewPrimitives; basegfx::DecomposedB2DHomMatrixContainer aDecTrans(getTextTransform()); diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index 22e51ae6f630..a2bbdb90889a 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -50,7 +50,7 @@ namespace drawinglayer { static double fDiscreteSize(1.1); - Primitive2DSequence TextEffectPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const + Primitive2DSequence TextEffectPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const { Primitive2DSequence aRetval; @@ -218,16 +218,16 @@ namespace drawinglayer { ::osl::MutexGuard aGuard( m_aMutex ); - if(getLocal2DDecomposition().hasElements()) + if(getBuffered2DDecomposition().hasElements()) { if(maLastObjectToViewTransformation != rViewInformation.getObjectToViewTransformation()) { // conditions of last local decomposition have changed, delete - const_cast< TextEffectPrimitive2D* >(this)->setLocal2DDecomposition(Primitive2DSequence()); + const_cast< TextEffectPrimitive2D* >(this)->setBuffered2DDecomposition(Primitive2DSequence()); } } - if(!getLocal2DDecomposition().hasElements()) + if(!getBuffered2DDecomposition().hasElements()) { // remember ViewRange and ViewTransformation const_cast< TextEffectPrimitive2D* >(this)->maLastObjectToViewTransformation = rViewInformation.getObjectToViewTransformation(); diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index b74c4eabf898..819f94759ae0 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -181,7 +181,7 @@ namespace drawinglayer } } - Primitive2DSequence TextSimplePortionPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence TextSimplePortionPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { Primitive2DSequence aRetval; diff --git a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx index 07022229bfa8..4d50cb78da06 100644 --- a/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/wrongspellprimitive2d.cxx @@ -48,7 +48,7 @@ namespace drawinglayer { namespace primitive2d { - Primitive2DSequence WrongSpellPrimitive2D::createLocal2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const + Primitive2DSequence WrongSpellPrimitive2D::create2DDecomposition(const geometry::ViewInformation2D& /*rViewInformation*/) const { // ATM this decompose is view-independent, what the original VCL-Display is not. To mimic // the old behaviour here if wanted it is necessary to add get2DDecomposition and implement diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx index 57a016851af9..c30545e4f7c3 100644 --- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx @@ -94,28 +94,28 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BufDecPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence BufferedDecompositionPrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { return Primitive3DSequence(); } - BufDecPrimitive3D::BufDecPrimitive3D() + BufferedDecompositionPrimitive3D::BufferedDecompositionPrimitive3D() : BasePrimitive3D(), - maLocal3DDecomposition() + maBuffered3DDecomposition() { } - Primitive3DSequence BufDecPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence BufferedDecompositionPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { ::osl::MutexGuard aGuard( m_aMutex ); - if(!getLocal3DDecomposition().hasElements()) + if(!getBuffered3DDecomposition().hasElements()) { - const Primitive3DSequence aNewSequence(createLocal3DDecomposition(rViewInformation)); - const_cast< BufDecPrimitive3D* >(this)->setLocal3DDecomposition(aNewSequence); + const Primitive3DSequence aNewSequence(create3DDecomposition(rViewInformation)); + const_cast< BufferedDecompositionPrimitive3D* >(this)->setBuffered3DDecomposition(aNewSequence); } - return getLocal3DDecomposition(); + return getBuffered3DDecomposition(); } } // end of namespace primitive3d } // end of namespace drawinglayer @@ -135,7 +135,7 @@ namespace drawinglayer if(rCandidate.is()) { // try to get C++ implementation base - const BufDecPrimitive3D* pCandidate(dynamic_cast< BufDecPrimitive3D* >(rCandidate.get())); + const BasePrimitive3D* pCandidate(dynamic_cast< BasePrimitive3D* >(rCandidate.get())); if(pCandidate) { @@ -185,8 +185,8 @@ namespace drawinglayer return true; } - const BufDecPrimitive3D* pA(dynamic_cast< const BufDecPrimitive3D* >(rxA.get())); - const BufDecPrimitive3D* pB(dynamic_cast< const BufDecPrimitive3D* >(rxB.get())); + const BasePrimitive3D* pA(dynamic_cast< const BasePrimitive3D* >(rxA.get())); + const BasePrimitive3D* pB(dynamic_cast< const BasePrimitive3D* >(rxB.get())); const bool bAEqualZero(pA == 0L); if(bAEqualZero != (pB == 0L)) diff --git a/drawinglayer/source/primitive3d/groupprimitive3d.cxx b/drawinglayer/source/primitive3d/groupprimitive3d.cxx index ae2a6fa8c75a..17736a276b38 100644 --- a/drawinglayer/source/primitive3d/groupprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/groupprimitive3d.cxx @@ -49,14 +49,8 @@ namespace drawinglayer { namespace primitive3d { - /// default: just return children, so all renderers not supporting group will use it's content - Primitive3DSequence GroupPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - GroupPrimitive3D::GroupPrimitive3D( const Primitive3DSequence& rChildren ) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maChildren(rChildren) { } @@ -67,7 +61,7 @@ namespace drawinglayer */ bool GroupPrimitive3D::operator==( const BasePrimitive3D& rPrimitive ) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const GroupPrimitive3D& rCompare = static_cast< const GroupPrimitive3D& >(rPrimitive); @@ -77,6 +71,12 @@ namespace drawinglayer return false; } + /// default: just return children, so all renderers not supporting group will use it's content + Primitive3DSequence GroupPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + return getChildren(); + } + // provide unique ID ImplPrimitrive3DIDBlock(GroupPrimitive3D, PRIMITIVE3D_ID_GROUPPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx index a0d202dc9dbe..381b70d4f6cc 100644 --- a/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hatchtextureprimitive3d.cxx @@ -59,7 +59,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HatchTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence HatchTexturePrimitive3D::impCreate3DDecomposition() const { Primitive3DSequence aRetval; @@ -76,12 +76,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufferedDecompositionPrimitive2D implementation - const BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const BufDecPrimitive3D* >(xReference.get()); + // try to cast to BasePrimitive2D implementation + const BasePrimitive3D* pBasePrimitive = dynamic_cast< const BasePrimitive3D* >(xReference.get()); if(pBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch // not all content is needed, remove transparencies and ModifiedColorPrimitives switch(pBasePrimitive->getPrimitive3DID()) { @@ -287,7 +287,8 @@ namespace drawinglayer bool bModulate, bool bFilter) : TexturePrimitive3D(rChildren, rTextureSize, bModulate, bFilter), - maHatch(rHatch) + maHatch(rHatch), + maBuffered3DDecomposition() { } @@ -303,6 +304,19 @@ namespace drawinglayer return false; } + Primitive3DSequence HatchTexturePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + ::osl::MutexGuard aGuard( m_aMutex ); + + if(!getBuffered3DDecomposition().hasElements()) + { + const Primitive3DSequence aNewSequence(impCreate3DDecomposition()); + const_cast< HatchTexturePrimitive3D* >(this)->setBuffered3DDecomposition(aNewSequence); + } + + return getBuffered3DDecomposition(); + } + // provide unique ID ImplPrimitrive3DIDBlock(HatchTexturePrimitive3D, PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx index 9288b3a79219..65aede8142aa 100644 --- a/drawinglayer/source/primitive3d/hittestprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/hittestprimitive3d.cxx @@ -49,12 +49,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence HitTestPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - // return empty sequence - return Primitive3DSequence(); - } - HitTestPrimitive3D::HitTestPrimitive3D( const Primitive3DSequence& rChildren) : GroupPrimitive3D(rChildren) @@ -66,6 +60,12 @@ namespace drawinglayer return getB3DRangeFromPrimitive3DSequence(getChildren(), rViewInformation); } + Primitive3DSequence HitTestPrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + { + // return empty sequence + return Primitive3DSequence(); + } + // provide unique ID ImplPrimitrive3DIDBlock(HitTestPrimitive3D, PRIMITIVE3D_ID_HITTESTPRIMITIVE3D) diff --git a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx index 9fba5c97cd93..ee38b8782cff 100644 --- a/drawinglayer/source/primitive3d/polygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygonprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer PolygonHairlinePrimitive3D::PolygonHairlinePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maPolygon(rPolygon), maBColor(rBColor) { @@ -64,7 +64,7 @@ namespace drawinglayer bool PolygonHairlinePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const PolygonHairlinePrimitive3D& rCompare = (PolygonHairlinePrimitive3D&)rPrimitive; @@ -92,7 +92,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonStrokePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonStrokePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; @@ -145,7 +145,7 @@ namespace drawinglayer const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute(rStrokeAttribute) @@ -155,7 +155,7 @@ namespace drawinglayer PolygonStrokePrimitive3D::PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, const attribute::LineAttribute& rLineAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maPolygon(rPolygon), maLineAttribute(rLineAttribute), maStrokeAttribute() @@ -164,7 +164,7 @@ namespace drawinglayer bool PolygonStrokePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive3D::operator==(rPrimitive)) { const PolygonStrokePrimitive3D& rCompare = (PolygonStrokePrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx index 5ce26203a703..d95473a27805 100644 --- a/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx @@ -178,7 +178,7 @@ namespace drawinglayer { // nSegments is for whole circle, adapt to half circle const sal_uInt32 nVerSeg(nSegments >> 1L); - std::vector< BufDecPrimitive3D* > aResultVector; + std::vector< BasePrimitive3D* > aResultVector; if(nVerSeg) { @@ -196,7 +196,7 @@ namespace drawinglayer { const basegfx::B3DPolygon aPartPolygon(aSphere.getB3DPolygon(a)); const basegfx::B3DPolyPolygon aPartPolyPolygon(aPartPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aPartPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } } @@ -345,7 +345,7 @@ namespace drawinglayer if(aNewPolygon.count()) { const basegfx::B3DPolyPolygon aNewPolyPolygon(aNewPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aNewPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -359,7 +359,7 @@ namespace drawinglayer // create primitive const basegfx::B3DPolyPolygon aMiterPolyPolygon(aMiterPolygon); - BufDecPrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); + BasePrimitive3D* pNew = new PolyPolygonMaterialPrimitive3D(aMiterPolyPolygon, rMaterial, false); aResultVector.push_back(pNew); } @@ -417,10 +417,10 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence PolygonTubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence PolygonTubePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const sal_uInt32 nPointCount(getB3DPolygon().count()); - std::vector< BufDecPrimitive3D* > aResultVector; + std::vector< BasePrimitive3D* > aResultVector; if(0L != nPointCount) { diff --git a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx index a80d757ee4a0..f05a85869cbf 100644 --- a/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/polypolygonprimitive3d.cxx @@ -55,7 +55,7 @@ namespace drawinglayer const basegfx::B3DPolyPolygon& rPolyPolygon, const attribute::MaterialAttribute3D& rMaterial, bool bDoubleSided) - : BufDecPrimitive3D(), + : BasePrimitive3D(), maPolyPolygon(rPolyPolygon), maMaterial(rMaterial), mbDoubleSided(bDoubleSided) @@ -64,7 +64,7 @@ namespace drawinglayer bool PolyPolygonMaterialPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BasePrimitive3D::operator==(rPrimitive)) { const PolyPolygonMaterialPrimitive3D& rCompare = (PolyPolygonMaterialPrimitive3D&)rPrimitive; diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index 1d5401533e00..739914562071 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrCubePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrCubePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index 00a53b2f6578..df682ab04e6f 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -221,7 +221,7 @@ namespace drawinglayer { bool bModulate(::com::sun::star::drawing::TextureMode_MODULATE == aSdr3DObjectAttribute.getTextureMode()); bool bFilter(aSdr3DObjectAttribute.getTextureFilter()); - BufDecPrimitive3D* pNewTexturePrimitive3D = 0L; + BasePrimitive3D* pNewTexturePrimitive3D = 0L; if(rFill.isGradient()) { diff --git a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx index bc99bab20740..3554e9266ec1 100644 --- a/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudeprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrExtrudePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrExtrudePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -510,14 +510,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocal3DDecomposition().hasElements() + (getBuffered3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrExtrudePrimitive3D* pThat = const_cast< SdrExtrudePrimitive3D* >(this); - pThat->setLocal3DDecomposition(Primitive3DSequence()); + pThat->setBuffered3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx index 852a08642375..5e6c34e644de 100644 --- a/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrlatheprimitive3d.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrLathePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const + Primitive3DSequence SdrLathePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const { Primitive3DSequence aRetval; @@ -369,14 +369,14 @@ namespace drawinglayer if(getSdr3DObjectAttribute().getReducedLineGeometry()) { if(!mpLastRLGViewInformation || - (getLocal3DDecomposition().hasElements() + (getBuffered3DDecomposition().hasElements() && *mpLastRLGViewInformation != rViewInformation)) { // conditions of last local decomposition with reduced lines have changed. Remember // new one and clear current decompositiopn ::osl::Mutex m_mutex; SdrLathePrimitive3D* pThat = const_cast< SdrLathePrimitive3D* >(this); - pThat->setLocal3DDecomposition(Primitive3DSequence()); + pThat->setBuffered3DDecomposition(Primitive3DSequence()); delete pThat->mpLastRLGViewInformation; pThat->mpLastRLGViewInformation = new geometry::ViewInformation3D(rViewInformation); } diff --git a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx index 5a12bc35a454..69049fb7b24d 100644 --- a/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrpolypolygonprimitive3d.cxx @@ -53,7 +53,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrPolyPolygonPrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrPolyPolygonPrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; diff --git a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx index dcef40ac3cdc..f8489b6418ff 100644 --- a/drawinglayer/source/primitive3d/sdrprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrprimitive3d.cxx @@ -103,7 +103,7 @@ namespace drawinglayer const basegfx::B2DVector& rTextureSize, const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute, const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute) - : BufDecPrimitive3D(), + : BufferedDecompositionPrimitive3D(), maTransform(rTransform), maTextureSize(rTextureSize), maSdrLFSAttribute(rSdrLFSAttribute), @@ -113,7 +113,7 @@ namespace drawinglayer bool SdrPrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const { - if(BufDecPrimitive3D::operator==(rPrimitive)) + if(BufferedDecompositionPrimitive3D::operator==(rPrimitive)) { const SdrPrimitive3D& rCompare = static_cast< const SdrPrimitive3D& >(rPrimitive); diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index 61d14181a8e8..663ae6ad0d37 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -56,7 +56,7 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence SdrSpherePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + Primitive3DSequence SdrSpherePrimitive3D::create3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { Primitive3DSequence aRetval; const basegfx::B3DRange aUnitRange(0.0, 0.0, 0.0, 1.0, 1.0, 1.0); diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index b5195811472b..16f33435a38b 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -81,7 +81,27 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence UnifiedAlphaTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const + UnifiedAlphaTexturePrimitive3D::UnifiedAlphaTexturePrimitive3D( + double fTransparence, + const Primitive3DSequence& rChildren) + : TexturePrimitive3D(rChildren, basegfx::B2DVector(), false, false), + mfTransparence(fTransparence) + { + } + + bool UnifiedAlphaTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const + { + if(TexturePrimitive3D::operator==(rPrimitive)) + { + const UnifiedAlphaTexturePrimitive3D& rCompare = (UnifiedAlphaTexturePrimitive3D&)rPrimitive; + + return (getTransparence() == rCompare.getTransparence()); + } + + return false; + } + + Primitive3DSequence UnifiedAlphaTexturePrimitive3D::get3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const { if(0.0 == getTransparence()) { @@ -103,26 +123,6 @@ namespace drawinglayer } } - UnifiedAlphaTexturePrimitive3D::UnifiedAlphaTexturePrimitive3D( - double fTransparence, - const Primitive3DSequence& rChildren) - : TexturePrimitive3D(rChildren, basegfx::B2DVector(), false, false), - mfTransparence(fTransparence) - { - } - - bool UnifiedAlphaTexturePrimitive3D::operator==(const BasePrimitive3D& rPrimitive) const - { - if(TexturePrimitive3D::operator==(rPrimitive)) - { - const UnifiedAlphaTexturePrimitive3D& rCompare = (UnifiedAlphaTexturePrimitive3D&)rPrimitive; - - return (getTransparence() == rCompare.getTransparence()); - } - - return false; - } - // provide unique ID ImplPrimitrive3DIDBlock(UnifiedAlphaTexturePrimitive3D, PRIMITIVE3D_ID_UNIFIEDALPHATEXTUREPRIMITIVE3D) @@ -135,11 +135,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence GradientTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - GradientTexturePrimitive3D::GradientTexturePrimitive3D( const attribute::FillGradientAttribute& rGradient, const Primitive3DSequence& rChildren, @@ -175,11 +170,6 @@ namespace drawinglayer { namespace primitive3d { - Primitive3DSequence BitmapTexturePrimitive3D::createLocal3DDecomposition(const geometry::ViewInformation3D& /*rViewInformation*/) const - { - return getChildren(); - } - BitmapTexturePrimitive3D::BitmapTexturePrimitive3D( const attribute::FillBitmapAttribute& rBitmap, const Primitive3DSequence& rChildren, diff --git a/drawinglayer/source/processor2d/baseprocessor2d.cxx b/drawinglayer/source/processor2d/baseprocessor2d.cxx index 28023c8b253f..76f66b85c9fa 100644 --- a/drawinglayer/source/processor2d/baseprocessor2d.cxx +++ b/drawinglayer/source/processor2d/baseprocessor2d.cxx @@ -74,12 +74,12 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufferedDecompositionPrimitive2D implementation - const primitive2d::BufferedDecompositionPrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BufferedDecompositionPrimitive2D* >(xReference.get()); + // try to cast to BasePrimitive2D implementation + const primitive2d::BasePrimitive2D* pBasePrimitive = dynamic_cast< const primitive2d::BasePrimitive2D* >(xReference.get()); if(pBasePrimitive) { - // it is a BufferedDecompositionPrimitive2D implementation, use local processor + // it is a BasePrimitive2D implementation, use local processor processBasePrimitive2D(*pBasePrimitive); } else diff --git a/drawinglayer/source/processor3d/baseprocessor3d.cxx b/drawinglayer/source/processor3d/baseprocessor3d.cxx index 532b792379a2..7d630f2522be 100644 --- a/drawinglayer/source/processor3d/baseprocessor3d.cxx +++ b/drawinglayer/source/processor3d/baseprocessor3d.cxx @@ -74,8 +74,8 @@ namespace drawinglayer if(xReference.is()) { - // try to cast to BufDecPrimitive3D implementation - const primitive3d::BufDecPrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BufDecPrimitive3D* >(xReference.get()); + // try to cast to BasePrimitive3D implementation + const primitive3d::BasePrimitive3D* pBasePrimitive = dynamic_cast< const primitive3d::BasePrimitive3D* >(xReference.get()); if(pBasePrimitive) { diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index d5658b966fe8..5f35960323fe 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -468,7 +468,7 @@ namespace drawinglayer void DefaultProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D : diff --git a/drawinglayer/source/processor3d/shadow3dextractor.cxx b/drawinglayer/source/processor3d/shadow3dextractor.cxx index 166620666300..5e6678fc3a8e 100644 --- a/drawinglayer/source/processor3d/shadow3dextractor.cxx +++ b/drawinglayer/source/processor3d/shadow3dextractor.cxx @@ -60,10 +60,10 @@ namespace drawinglayer namespace processor3d { // as tooling, the process() implementation takes over API handling and calls this - // virtual render method when the primitive implementation is BufDecPrimitive3D-based. + // virtual render method when the primitive implementation is BasePrimitive3D-based. void Shadow3DExtractingProcessor::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rCandidate.getPrimitive3DID()) { case PRIMITIVE3D_ID_SHADOWPRIMITIVE3D : diff --git a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx index f8f1056fbaac..48c1bee86575 100644 --- a/drawinglayer/source/processor3d/zbufferprocessor3d.cxx +++ b/drawinglayer/source/processor3d/zbufferprocessor3d.cxx @@ -486,7 +486,7 @@ namespace drawinglayer // the processing method for a single, known primitive void ZBufferProcessor3D::processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive) { - // it is a BufDecPrimitive3D implementation, use getPrimitive3DID() call for switch + // it is a BasePrimitive3D implementation, use getPrimitive3DID() call for switch switch(rBasePrimitive.getPrimitive3DID()) { case PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D : |