summaryrefslogtreecommitdiff
path: root/drawinglayer/inc
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/inc')
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx100
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx104
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx43
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx9
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx9
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx17
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx9
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx23
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx23
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx11
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx24
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx46
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx10
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx7
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx6
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx18
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx17
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx16
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx11
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx18
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx7
21 files changed, 314 insertions, 214 deletions
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
index cc0b74319e69..d38250e7bf47 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewinformation2d.hxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:20 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -62,62 +62,110 @@ namespace drawinglayer
{
namespace geometry
{
+ /** ViewInformation2D class
+
+ This class holds all view-relevant information for a 2d geometry. It works
+ together with UNO API definitions and supports holding a sequence of PropertyValues.
+ The most used data is for convenience offered directly using basegfx tooling classes.
+ It is an implementation to support the sequence of PropertyValues used in a
+ ::com::sun::star::graphic::XPrimitive2D for C++ implementations working with those
+ */
class ViewInformation2D
{
private:
- // impl pointer
+ /// pointer to private implementation class
ImpViewInformation2D* mpViewInformation2D;
public:
- // constructor to easily build a ViewInformation2D when all view
- // information is available as basegfx implementation classes. The
- // ExtendedParameters allows adding extra parameters besides ViewTransformation,
- // Viewport, ViewTime and DrawPage and should not itself include one of these.
+ /** Constructor: Create a ViewInformation2D
+
+ @param rObjectTransformation
+ The Transformation from Object to World coordinates (normally logic coordinates).
+
+ @param rViewTransformation
+ The Transformation from World to View coordinates (normally logic coordinates
+ to discrete units, e.g. pixels).
+
+ @param rViewport
+ The visible part of the view in World coordinates. If empty (getViewport().isEmpty())
+ everything is visible. The data is in World coordinates.
+
+ @param rxDrawPage
+ The currently displaqyed page. This information is needed e.g. due to existing PageNumber
+ fields which need to be interpreted.
+
+ @param fViewTime
+ The time the view is defined for. Default is 0.0. This parameter is used e.g. for
+ animated objects
+
+ @param rExtendedParameters
+ A sequence of property values which allows holding various other parameters besides
+ the obvious and needed ones above. For this constructor none of the other parameters
+ should be added as data. The constructor will parse the given parameters and if
+ data for the other parameters is given, the value in rExtendedParameters will
+ be preferred and overwrite the given parameter
+ */
ViewInformation2D(
+ const basegfx::B2DHomMatrix& rObjectTransformation,
const basegfx::B2DHomMatrix& rViewTransformation,
const basegfx::B2DRange& rViewport,
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage,
double fViewTime,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rExtendedParameters);
- // constructor to create a ViewInformation2D based on API information only. The
- // ViewParameters can contain ViewTransformation, Viewport and ViewTime but also
- // other parameters which will be preserved in the ExtendedInformation. The three
- // named information will be extracted locally for faster access.
+ /** Constructor: Create a ViewInformation2D
+
+ @param rViewParameters
+ A sequence of property values which allows holding any combination of local and various
+ other parameters. This constructor is feeded completely with a sequence of PropertyValues
+ which will be parsed to be able to offer the most used ones in a convenient way.
+ */
ViewInformation2D(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
- // copy constructor
+ /// copy constructor
ViewInformation2D(const ViewInformation2D& rCandidate);
- // destructor
+ /// destructor
~ViewInformation2D();
- // assignment operator
+ /// assignment operator
ViewInformation2D& operator=(const ViewInformation2D& rCandidate);
- // compare operator
+ /// compare operators
bool operator==(const ViewInformation2D& rCandidate) const;
+ bool operator!=(const ViewInformation2D& rCandidate) const { return !operator==(rCandidate); }
- // data access
+ /// data access
+ const basegfx::B2DHomMatrix& getObjectTransformation() const;
const basegfx::B2DHomMatrix& getViewTransformation() const;
const basegfx::B2DRange& getViewport() const;
double getViewTime() const;
-
- // get the DrawPage which is visualized. Tjhis is needed e.g. for the
- // view-dependent decomposition of PageNumber Fields in Texts
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& getVisualizedPage() const;
- // data access with on-demand preparations
- const basegfx::B2DHomMatrix& getInverseViewTransformation() const;
+ /// On-demand prepared Object to View transformation and it's inerse for convenience
+ const basegfx::B2DHomMatrix& getObjectToViewTransformation() const;
+ const basegfx::B2DHomMatrix& getInverseObjectToViewTransformation() const;
+
+ /// On-demand prepared Viewport in discrete units for convenience
const basegfx::B2DRange& getDiscreteViewport() const;
- // get the uno::Sequence< beans::PropertyValue > which contains all information. When
- // constructed using the API constructor, You will get back Your input. If not, the
- // needed sequence will be constructed including the extended informations.
+ /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation
+
+ Use this call if You need to extract all contained ViewInformation. The ones
+ directly supported for convenience will be added to the ones only available
+ as PropertyValues. This set completely describes this ViewInformation2D and
+ can be used for complete information transport over UNO API.
+ */
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getViewInformationSequence() const;
- // get the uno::Sequence< beans::PropertyValue > which contains only extra information. This means
- // information different from ViewTransformation, Viewport, ViewTime and DrawPage.
+ /** Get the uno::Sequence< beans::PropertyValue > which contains only ViewInformation
+ not offered directly
+
+ Use this call if You only need ViewInformation which is not offered conveniently,
+ but only exists as PropertyValue. This is e.g. used to create partially updated
+ incarnations of ViewInformation2D without losing the only with PropertyValues
+ defined data. It does not contain a complete description.
+ */
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getExtendedInformationSequence() const;
};
} // end of namespace geometry
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
index 0a5dc8b2c39f..6a6cb5d767e5 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: viewinformation3d.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:20 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -60,63 +60,113 @@ namespace drawinglayer
{
namespace geometry
{
+ /** ViewInformation3D class
+
+ This class holds all view-relevant information for a 3d geometry. It works
+ together with UNO API definitions and supports holding a sequence of PropertyValues.
+ The most used data is for convenience offered directly using basegfx tooling classes.
+ It is an implementation to support the sequence of PropertyValues used in a
+ ::com::sun::star::graphic::XPrimitive3D for C++ implementations working with those
+ */
class ViewInformation3D
{
private:
- // impl pointer
+ /// pointer to private implementation class
ImpViewInformation3D* mpViewInformation3D;
public:
- // constructor to easily build a ViewInformation3D when all view
- // information is available as basegfx implementation classes. The
- // ExtendedParameters allows adding extra parameters besides the simple ones
- // and should not itself include one of these.
+ /** Constructor: Create a ViewInformation3D
+
+ @param rObjectTransformation
+ The Transformation from Object to World coordinates (normally logic coordinates).
+
+ @param rOrientation
+ A part of the 3D ViewTransformation, the World to Camera coordinates transformation
+ which holds the camera coordinate system.
+
+ @param rProjection
+ A part of the 3D ViewTransformation, the Camera to Device transformation which
+ transforms coordinates to a [0.0 .. 1.0] device range in X,Y and Z. Z may be used
+ as source for for Z-Buffers. This transformation may be e.g. a parallell projection,
+ but also a perspective one and thus may use the last line of the matrix.
+
+ @param rDeviceToView
+ A part of the 3D ViewTransformation, the Device to View transformation which normally
+ translates and scales from [0.0 .. 1.0] range in X,Y and Z to discrete position and
+ size.
+
+ rOrientation, rProjection and rDeviceToView define the 3D transformation pipeline
+ and are normally used multiplied together to have a direct transformation from
+ World to View coordinates
+
+ @param fViewTime
+ The time the view is defined for. Default is 0.0. This parameter is used e.g. for
+ animated objects
+
+ @param rExtendedParameters
+ A sequence of property values which allows holding various other parameters besides
+ the obvious and needed ones above. For this constructor none of the other parameters
+ should be added as data. The constructor will parse the given parameters and if
+ data for the other parameters is given, the value in rExtendedParameters will
+ be preferred and overwrite the given parameter
+ */
ViewInformation3D(
- const basegfx::B3DHomMatrix& rTransformation,
+ const basegfx::B3DHomMatrix& rObjectTransformation,
const basegfx::B3DHomMatrix& rOrientation,
const basegfx::B3DHomMatrix& rProjection,
const basegfx::B3DHomMatrix& rDeviceToView,
double fViewTime,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rExtendedParameters);
- // constructor to create a ViewInformation3D based on API information only. The
- // ViewParameters can contain ViewTransformation, Viewport and ViewTime but also
- // other parameters which will be preserved in the ExtendedInformation. The three
- // named information will be extracted locally for faster access.
+ /** Constructor: Create a ViewInformation3D
+
+ @param rViewParameters
+ A sequence of property values which allows holding any combination of local and various
+ other parameters. This constructor is feeded completely with a sequence of PropertyValues
+ which will be parsed to be able to offer the most used ones in a convenient way.
+ */
ViewInformation3D(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
- // copy constructor
+ /// copy constructor
ViewInformation3D(const ViewInformation3D& rCandidate);
- // destructor
+ /// destructor
~ViewInformation3D();
- // assignment operator
+ /// assignment operator
ViewInformation3D& operator=(const ViewInformation3D& rCandidate);
- // compare operator
+ /// compare operators
bool operator==(const ViewInformation3D& rCandidate) const;
+ bool operator!=(const ViewInformation3D& rCandidate) const { return !operator==(rCandidate); }
- // data access
- // the four transformations defining the 3D view pipeline complately
- const basegfx::B3DHomMatrix& getTransformation() const;
+ /// data access
+ const basegfx::B3DHomMatrix& getObjectTransformation() const;
const basegfx::B3DHomMatrix& getOrientation() const;
const basegfx::B3DHomMatrix& getProjection() const;
const basegfx::B3DHomMatrix& getDeviceToView() const;
+ double getViewTime() const;
- // for convenience, the linear combination of the above four transformations
+ /// for convenience, the linear combination of the above four transformations is offered
const basegfx::B3DHomMatrix& getObjectToView() const;
- // time at which the transformation is to be used. This may be used from animated objects
- double getViewTime() const;
+ /** Get the uno::Sequence< beans::PropertyValue > which contains all ViewInformation
- // get the uno::Sequence< beans::PropertyValue > which contains all information. When
- // constructed using the API constructor, You will get back Your input. If not, the
- // needed sequence will be constructed including the extended informations.
+ Use this call if You need to extract all contained ViewInformation. The ones
+ directly supported for convenience will be added to the ones only available
+ as PropertyValues. This set completely describes this ViewInformation3D and
+ can be used for complete information transport over UNO API.
+ */
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getViewInformationSequence() const;
- // get the uno::Sequence< beans::PropertyValue > which contains only extra information. This means
- // information different from the four transformations.
+ /** Get the uno::Sequence< beans::PropertyValue > which contains only ViewInformation
+ not offered directly
+
+ Use this call if You only need ViewInformation which is not offered conveniently,
+ but only exists as PropertyValue. This is e.g. used to create partially updated
+ incarnations of ViewInformation3D without losing the only with PropertyValues
+ defined data. It does not contain a complete description.
+ */
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& getExtendedInformationSequence() const;
};
} // end of namespace geometry
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
index b7ec9dfe219a..a6c4a3935d5b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: embedded3dprimitive2d.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -51,9 +51,34 @@ namespace drawinglayer
class Embedded3DPrimitive2D : public BasePrimitive2D
{
private:
- primitive3d::Primitive3DSequence mxChildren3D;
- basegfx::B2DHomMatrix maObjectTransformation;
- geometry::ViewInformation3D maViewInformation3D;
+ // the sequence of 3d primitives
+ primitive3d::Primitive3DSequence mxChildren3D;
+
+ // the 2D scene object transformation
+ basegfx::B2DHomMatrix maObjectTransformation;
+
+ // the 3D transformations
+ geometry::ViewInformation3D maViewInformation3D;
+
+ // if the embedded 3D primitives contain shadow, these parameters are needed
+ // to extract the shadow wich is a sequence od 2D primitives and may expand
+ // the 2D range. Since every single 3D object in a scene may individually
+ // have shadow or not, these values need to be provided and prepared. The shadow
+ // distance itself (a 2D transformation) is part of the 3D shadow definition
+ basegfx::B3DVector maLightNormal;
+ double mfShadowSlant;
+ basegfx::B3DRange maScene3DRange;
+
+ // the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
+ Primitive2DSequence maShadowPrimitives;
+
+ // bitfield
+ // flag if given 3D geometry is already cheched for shadow definitions and 2d shadows
+ // are created in maShadowPrimitives
+ unsigned mbShadow3DChecked : 1;
+
+ // private helpers
+ bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
protected:
// local decomposition.
@@ -63,12 +88,18 @@ namespace drawinglayer
Embedded3DPrimitive2D(
const primitive3d::Primitive3DSequence& rxChildren3D,
const basegfx::B2DHomMatrix& rObjectTransformation,
- const geometry::ViewInformation3D& rViewInformation3D);
+ const geometry::ViewInformation3D& rViewInformation3D,
+ const basegfx::B3DVector& rLightNormal,
+ double fShadowSlant,
+ const basegfx::B3DRange& rScene3DRange);
// get data
const primitive3d::Primitive3DSequence& getChildren3D() const { return mxChildren3D; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; }
+ const basegfx::B3DVector& getLightNormal() const { return maLightNormal; }
+ double getShadowSlant() const { return mfShadowSlant; }
+ const basegfx::B3DRange& getScene3DRange() const { return maScene3DRange; }
// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
index cd2258eba8c7..ff0356f07988 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: gridprimitive2d.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -59,8 +59,9 @@ namespace drawinglayer
sal_uInt32 mnSubdivisionsY;
basegfx::BColor maBColor;
- // the last used viewInformation, used from getDecomposition for buffering
- basegfx::B2DHomMatrix maLastViewTransformation;
+ // the last used object to view transformtion and the last Viewport,
+ // used from getDecomposition for decide buffering
+ basegfx::B2DHomMatrix maLastObjectToViewTransformation;
basegfx::B2DRange maLastViewport;
protected:
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
index e5b111cf9062..a5927d41b3a6 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: helplineprimitive2d.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -63,8 +63,9 @@ namespace drawinglayer
basegfx::BColor maRGBColB;
double mfViewDashLength;
- // the last used viewInformation, used from getDecomposition for buffering
- basegfx::B2DHomMatrix maLastViewTransformation;
+ // the last used object to view transformtion and the last Viewport,
+ // used from getDecomposition for decide buffering
+ basegfx::B2DHomMatrix maLastObjectToViewTransformation;
basegfx::B2DRange maLastViewport;
protected:
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 59c498d312f7..7a559d864229 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sceneprimitive2d.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -60,27 +60,18 @@ namespace drawinglayer
// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
Primitive2DSequence maShadowPrimitives;
- // the primitiveSequence for on-demand created label primitives (see mbLabelChecked)
- Primitive2DSequence maLabelPrimitives;
-
// bitfield
-
// flag if given 3D geometry is already cheched for shadow definitions and 2d shadows
// are created in maShadowPrimitives
unsigned mbShadow3DChecked : 1;
- // flag if given 3D geometry is already cheched for label definitions and 2d labels
- // are created in maLabelPrimitives
- unsigned mbLabel3DChecked : 1;
-
// the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition
double mfOldDiscreteSizeX;
double mfOldDiscreteSizeY;
basegfx::B2DRange maOldUnitVisiblePart;
- // protected helpers
+ // private helpers
bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
- bool impGetLabel3D(const geometry::ViewInformation2D& rViewInformation) const;
void calculateDsicreteSizes(
const geometry::ViewInformation2D& rViewInformation,
basegfx::B2DRange& rDiscreteRange,
@@ -93,7 +84,7 @@ namespace drawinglayer
public:
// public helpers
- // Geometry extractor. Shadow and labels will be added as in createLocalDecomposition, but
+ // Geometry extractor. Shadow will be added as in createLocalDecomposition, but
// the 3D content is not converted to a bitmap visualisation but to projected 2D gemetry. This
// helper is useful for Contour extraction.
Primitive2DSequence getGeometry2D(const geometry::ViewInformation2D& rViewInformation) const;
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
index cc0797dd6963..128b1ea5a210 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: texteffectprimitive2d.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -62,8 +62,9 @@ namespace drawinglayer
double mfDirection;
TextEffectStyle2D meTextEffectStyle2D;
- // the last used viewTransformation, used from getDecomposition for buffering
- basegfx::B2DHomMatrix maLastViewTransformation;
+ // the last used object to view transformtion used from getDecomposition
+ // for decide buffering
+ basegfx::B2DHomMatrix maLastObjectToViewTransformation;
protected:
// create local decomposition
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
index c46c75396262..c17ca34d733a 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: drawinglayer_primitivetypes3d.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: aw $ $Date: 2007-03-06 12:31:47 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -54,16 +54,15 @@
#define PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 6)
#define PRIMITIVE3D_ID_SDRCUBEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 7)
#define PRIMITIVE3D_ID_SDREXTRUDEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 8)
-#define PRIMITIVE3D_ID_SDRLABELPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 9)
-#define PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 10)
-#define PRIMITIVE3D_ID_SDRPOLYPOLYGONPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 11)
-#define PRIMITIVE3D_ID_SDRSPHEREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 12)
-#define PRIMITIVE3D_ID_SHADOWPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 13)
-#define PRIMITIVE3D_ID_UNIFIEDALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 14)
-#define PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 15)
-#define PRIMITIVE3D_ID_BITMAPTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 16)
-#define PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 17)
-#define PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 18)
+#define PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 9)
+#define PRIMITIVE3D_ID_SDRPOLYPOLYGONPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 10)
+#define PRIMITIVE3D_ID_SDRSPHEREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 11)
+#define PRIMITIVE3D_ID_SHADOWPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 12)
+#define PRIMITIVE3D_ID_UNIFIEDALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 13)
+#define PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 14)
+#define PRIMITIVE3D_ID_BITMAPTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 15)
+#define PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 16)
+#define PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 17)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
index 2fb0f92ecf99..43ae13d4625f 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sdrextrudelathetools3d.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -43,6 +43,10 @@
//////////////////////////////////////////////////////////////////////////////
// predefines
+namespace drawinglayer { namespace geometry {
+ class ViewInformation3D;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -114,12 +118,8 @@ namespace drawinglayer
bool bCloseBack);
// helpers for geometry extraction
- void extractLinesFromSlice(
- basegfx::B3DPolyPolygon& rLine,
- const Slice3DVector& rSliceVector,
- bool bClosed,
- bool bAddHorizontal,
- bool bAddVertical);
+ basegfx::B3DPolyPolygon extractHorizontalLinesFromSlice(const Slice3DVector& rSliceVector, bool bCloseHorLines);
+ basegfx::B3DPolyPolygon extractVerticalLinesFromSlice(const Slice3DVector& rSliceVector);
void extractPlanesFromSlice(
::std::vector< basegfx::B3DPolyPolygon >& rFill,
@@ -134,6 +134,13 @@ namespace drawinglayer
bool bCreateTextureCoordinates,
const basegfx::B2DHomMatrix& rTexTransform);
+ void createReducedOutlines(
+ const geometry::ViewInformation3D& rViewInformation,
+ const basegfx::B3DHomMatrix& rObjectTransform,
+ const basegfx::B3DPolygon& rLoopA,
+ const basegfx::B3DPolygon& rLoopB,
+ basegfx::B3DPolyPolygon& rTarget);
+
} // end of namespace overlay
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
index d17f3493178d..a6d386bf194a 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sdrextrudeprimitive3d.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -58,6 +58,9 @@ namespace drawinglayer
double mfDiagonal;
double mfBackScale;
+ // decomposition data when ReducedLineGeometry is used, see get3DDecomposition
+ geometry::ViewInformation3D* mpLastRLGViewInformation;
+
// bitfield
unsigned mbSmoothNormals : 1; // Plane self
unsigned mbSmoothHorizontalNormals : 1; // always
@@ -92,6 +95,7 @@ namespace drawinglayer
bool bCharacterMode,
bool bCloseFront,
bool bCloseBack);
+ virtual ~SdrExtrudePrimitive3D();
// data access
const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
@@ -111,6 +115,9 @@ namespace drawinglayer
// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
+ // Overloaded to allow for reduced line mode to decide if to buffer decomposition or not
+ virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
+
// provide unique ID
DeclPrimitrive3DIDBlock()
};
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
index ec9ebe3fabe8..99d06e256431 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: sdrlatheprimitive3d.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -49,6 +49,7 @@ namespace drawinglayer
{
private:
// geometry helper for slices
+ basegfx::B2DPolyPolygon maCorrectedPolyPolygon;
Slice3DVector maSlices;
// primitive data
@@ -59,6 +60,9 @@ namespace drawinglayer
double mfBackScale;
double mfRotation;
+ // decomposition data when ReducedLineGeometry is used, see get3DDecomposition
+ geometry::ViewInformation3D* mpLastRLGViewInformation;
+
// bitfield
unsigned mbSmoothNormals : 1; // Plane self
unsigned mbSmoothHorizontalNormals : 1; // always
@@ -74,6 +78,18 @@ namespace drawinglayer
const Slice3DVector& getSlices() const;
protected:
+ // local helpers
+ void impCreateOutlines(
+ const geometry::ViewInformation3D& rViewInformation,
+ const basegfx::B3DPolygon& rLoopA,
+ const basegfx::B3DPolygon& rLoopB,
+ basegfx::B3DPolyPolygon& rTarget) const;
+
+ bool impHasCutWith(
+ const basegfx::B2DPolygon& rPoly,
+ const basegfx::B2DPoint& rStart,
+ const basegfx::B2DPoint& rEnd) const;
+
// local decomposition.
virtual Primitive3DSequence createLocalDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
@@ -95,6 +111,7 @@ namespace drawinglayer
bool bCharacterMode,
bool bCloseFront,
bool bCloseBack);
+ virtual ~SdrLathePrimitive3D();
// data access
const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
@@ -116,6 +133,9 @@ namespace drawinglayer
// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
+ // Overloaded to allow for reduced line mode to decide if to buffer decomposition or not
+ virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
+
// provide unique ID
DeclPrimitrive3DIDBlock()
};
diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
index 45cc54e9df23..fceae8dbeb31 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprocessor2d.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -56,12 +56,17 @@ namespace drawinglayer
maViewInformation2D = rViewInformation2D;
}
+ // as tooling, the process() implementation takes over API handling and calls this
+ // virtual render method when the primitive implementation is BasePrimitive2D-based.
+ // Default implementation does nothing
+ virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
+
public:
BaseProcessor2D(const geometry::ViewInformation2D& rViewInformation);
virtual ~BaseProcessor2D();
// the central processing method
- virtual void process(const primitive2d::Primitive2DSequence& rSource) = 0;
+ virtual void process(const primitive2d::Primitive2DSequence& rSource);
// data access
const geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
@@ -71,41 +76,6 @@ namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
-namespace drawinglayer
-{
- namespace processor2d
- {
- class CollectingProcessor2D : public BaseProcessor2D
- {
- private:
- primitive2d::Primitive2DSequence maPrimitive2DSequence;
-
- public:
- CollectingProcessor2D(const geometry::ViewInformation2D& rViewInformation);
-
- // the central processing method
- virtual void process(const primitive2d::Primitive2DSequence& rSource);
-
- // helpers for adding to local sequence
- void appendPrimitive2DSequence(const primitive2d::Primitive2DSequence& rSource)
- {
- primitive2d::appendPrimitive2DSequenceToPrimitive2DSequence(maPrimitive2DSequence, rSource);
- }
-
- void appendPrimitive2DReference(const primitive2d::Primitive2DReference& rSource)
- {
- primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(maPrimitive2DSequence, rSource);
- }
-
- // data access and reset
- const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
- void reset() { maPrimitive2DSequence = primitive2d::Primitive2DSequence(); }
- };
- } // end of namespace processor2d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
#endif //INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
// eof
diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
index b023b1288b8d..8e14f3118c70 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: canvasprocessor.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -75,9 +75,6 @@ namespace drawinglayer
// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
- // the current transformation
- basegfx::B2DHomMatrix maCurrentTransformation;
-
// SvtOptionsDrawinglayer incarnation to react on diverse settings
const SvtOptionsDrawinglayer maDrawinglayerOpt;
@@ -98,9 +95,6 @@ namespace drawinglayer
const com::sun::star::uno::Reference< com::sun::star::rendering::XCanvas >& rCanvas);
virtual ~canvasProcessor2D();
- // the central processing method
- virtual void process(const primitive2d::Primitive2DSequence& rSource);
-
// access to Drawinglayer configuration options
const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
};
diff --git a/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
index 43ad95d0e9ef..dbe85fab07c5 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: contourextractor2d.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -49,7 +49,7 @@ namespace drawinglayer
class ContourExtractor2D : public BaseProcessor2D
{
private:
- basegfx::B2DHomMatrix maCurrentTransformation;
+ // the extracted contour
std::vector< basegfx::B2DPolyPolygon > maExtractedContour;
// tooling methods
@@ -59,7 +59,6 @@ namespace drawinglayer
ContourExtractor2D(const geometry::ViewInformation2D& rViewInformation);
virtual ~ContourExtractor2D();
- virtual void process(const primitive2d::Primitive2DSequence& rSource);
const std::vector< basegfx::B2DPolyPolygon >& getExtractedContour() const { return maExtractedContour; }
};
} // end of namespace processor2d
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index 6361a7be7eec..f0d0ff881bc5 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclmetafileprocessor2d.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -106,7 +106,7 @@ namespace drawinglayer
// same for SvtGraphicStroke
sal_uInt32 mnSvtGraphicStrokeCount;
- // hold the last unified transparence value to have ot handy
+ // hold the last unified transparence value to have it handy
// on SvtGraphicStroke creation
double mfCurrentUnifiedTransparence;
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
index 0bf9233384e7..fb9bf24bdb2e 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: vclprocessor2d.hxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -81,7 +81,9 @@ namespace drawinglayer
// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
- // the current transformation
+ // the current transformation. Since VCL pixel renderer transforms to pixels
+ // and VCL MetaFile renderer to World (logic) coordinates, the local
+ // ViewInformation2D cannot directly be used, but needs to be kept up to date
basegfx::B2DHomMatrix maCurrentTransformation;
// SvtOptionsDrawinglayer incarnation to react on diverse settings
@@ -121,10 +123,6 @@ namespace drawinglayer
// FormControl support
basegfx::B2DPoint PositionAndSizeControl(const primitive2d::ControlPrimitive2D& rControlPrimitive2D);
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive2D-based.
- virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate) = 0;
-
public:
// constructor/destructor
VclProcessor2D(
@@ -132,12 +130,6 @@ namespace drawinglayer
OutputDevice& rOutDev);
virtual ~VclProcessor2D();
- // the central processing method
- // This VCL base implementation takes over the API handling and calls processBasePrimitive2D
- // directly when it's a BasePrinitive2D implementation. This is used as tooling from derived
- // implementations
- virtual void process(const primitive2d::Primitive2DSequence& rSource);
-
// access to Drawinglayer configuration options
const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
};
diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
index 9528973415ab..effc509d9981 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: baseprocessor3d.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -56,12 +56,17 @@ namespace drawinglayer
maViewInformation3D = rViewInformation3D;
}
+ // as tooling, the process() implementation takes over API handling and calls this
+ // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ // Default implementation does nothing
+ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+
public:
BaseProcessor3D(const geometry::ViewInformation3D& rViewInformation);
virtual ~BaseProcessor3D();
// the central processing method
- virtual void process(const primitive3d::Primitive3DSequence& rSource) = 0;
+ virtual void process(const primitive3d::Primitive3DSequence& rSource);
// data access
const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; }
@@ -82,16 +87,12 @@ namespace drawinglayer
public:
CollectingProcessor3D(const geometry::ViewInformation3D& rViewInformation);
+ virtual ~CollectingProcessor3D();
// the central processing method
virtual void process(const primitive3d::Primitive3DSequence& rSource);
// helpers for adding to local sequence
- void appendPrimitive3DSequence(const primitive3d::Primitive3DSequence& rSource)
- {
- primitive3d::appendPrimitive3DSequenceToPrimitive3DSequence(maPrimitive3DSequence, rSource);
- }
-
void appendPrimitive3DReference(const primitive3d::Primitive3DReference& rSource)
{
primitive3d::appendPrimitive3DReferenceToPrimitive3DSequence(maPrimitive3DSequence, rSource);
diff --git a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
index cef93af14cd7..7f01f9328153 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: defaultprocessor3d.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:21 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -82,15 +82,9 @@ namespace drawinglayer
const attribute::SdrSceneAttribute& mrSdrSceneAttribute; // read-only scene infos (normal handling, etc...)
const attribute::SdrLightingAttribute& mrSdrLightingAttribute; // read-only light infos (lights, etc...)
- // renderer transformations and range. Need to be correctly set by the
- // derived implementations
- basegfx::B3DHomMatrix maWorldToEye; // world to eye coordinates
- basegfx::B3DHomMatrix maWorldToView; // mul maWorldToEye with maProjection and maDeviceToView
+ // renderer range. Need to be correctly set by the derived implementations
basegfx::B2DRange maRasterRange; // the (0, 0, W, H) range from mpBZPixelRaster
- // inverse from maWorldToView, filled on demand
- basegfx::B3DHomMatrix maInvWorldToView; // back from view to world coordinates
-
// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
@@ -131,10 +125,6 @@ namespace drawinglayer
const attribute::SdrLightingAttribute& rSdrLightingAttribute);
virtual ~DefaultProcessor3D();
- // the central processing method. It checks for known primitive implementation
- // and uses processBasePrimitive3D or forwards to API implementations
- virtual void process(const primitive3d::Primitive3DSequence& rSource);
-
// data read access
const attribute::SdrSceneAttribute& getSdrSceneAttribute() const { return mrSdrSceneAttribute; }
const attribute::SdrLightingAttribute& getSdrLightingAttribute() const { return mrSdrLightingAttribute; }
diff --git a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
index a12e0792a42d..457ede952ccd 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: geometry2dextractor.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:22 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -60,14 +60,15 @@ namespace drawinglayer
// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
+ // as tooling, the process() implementation takes over API handling and calls this
+ // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+
public:
Geometry2DExtractingProcessor(
const geometry::ViewInformation3D& rViewInformation,
const basegfx::B2DHomMatrix& rObjectTransformation);
- // the central processing method
- virtual void process(const primitive3d::Primitive3DSequence& rSource);
-
// data access
const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
index 6aff5a46fbe3..abb92693a037 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: shadow3dextractor.hxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:22 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -44,7 +44,6 @@
#include <basegfx/polygon/b3dpolygon.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <basegfx/polygon/b3dpolypolygon.hxx>
-#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -89,16 +88,17 @@ namespace drawinglayer
basegfx::B2DPolygon impDoShadowProjection(const basegfx::B3DPolygon& rSource);
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 BasePrimitive3D-based.
+ virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
+
public:
Shadow3DExtractingProcessor(
const geometry::ViewInformation3D& rViewInformation,
const basegfx::B2DHomMatrix& rObjectTransformation,
- const attribute::SdrLightingAttribute& rSdrLightingAttribute,
- const primitive3d::Primitive3DSequence& rPrimitiveVector,
- double fShadowSlant);
-
- // the central processing method
- virtual void process(const primitive3d::Primitive3DSequence& rSource);
+ const basegfx::B3DVector& rLightNormal,
+ double fShadowSlant,
+ const basegfx::B3DRange& rContained3DRange);
// data access
const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
diff --git a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
index dd0d0bc1b4eb..d2ef8bd7f249 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: zbufferprocessor3d.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2008-06-10 09:29:22 $
+ * last change: $Author: aw $ $Date: 2008-06-24 15:30:18 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -117,9 +117,6 @@ namespace drawinglayer
// get the result as bitmapEx
BitmapEx getBitmapEx() const;
-
- // data access
- const basegfx::B3DHomMatrix& getViewToEye() const { return maInvEyeToView; }
};
} // end of namespace processor3d
} // end of namespace drawinglayer