summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-10-28 16:56:00 +0100
committerArmin Le Grand <Armin.Le.Grand@Sun.COM>2009-10-28 16:56:00 +0100
commit95ccca996e41c0ff9fa70fb5007f06796a98bc1c (patch)
tree1c1d3b45c90d0e031d6dd74dc076f149e317b820
parentafc5047960fa639a4ab215abddecd8747532c2e0 (diff)
#i105323# added documentation to primitives
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx19
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx67
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx27
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx23
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx29
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx6
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx47
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx53
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx27
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx22
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx27
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx31
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx34
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx16
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx34
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx34
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx13
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx29
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx22
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx27
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx32
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx25
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx41
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx26
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx113
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx158
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx46
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx93
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx28
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx28
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx36
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx34
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx94
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx31
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx77
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx29
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx21
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx26
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx25
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx16
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx16
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx38
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx15
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx41
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx20
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx22
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx15
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx1
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx10
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx36
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx38
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx23
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx22
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx18
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx20
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx74
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx19
57 files changed, 1447 insertions, 547 deletions
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx
index 79518eb82358..10288b70bd1b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx
@@ -54,7 +54,12 @@ namespace drawinglayer
The basic definition is to use the Alpha content as Alpha-Mask by
interpreting the Alpha-content not as RGB, but as Luminance alpha mask
- using the common RGB_to_luminance definition as e.g. used by VCL
+ using the common RGB_to_luminance definition as e.g. used by VCL.
+
+ The defining geometry is the Range of the child primitive sequence,
+ this means the renderers will/shall use this geometric information for
+ rendering, not the alpha one. The alpha one should/will be clipped
+ accordingly.
*/
class AlphaPrimitive2D : public GroupPrimitive2D
{
@@ -63,7 +68,17 @@ namespace drawinglayer
Primitive2DSequence maAlpha;
public:
- /// constructor
+ /** constructor
+
+ @param rChildren
+ The content which is defined to have a transparency. The
+ range of this primitive is defined by this content
+
+ @param rAlpha
+ The definition of the Alpha-channel for this primitive. It
+ will be interpreted as mask by interpreting as gray values
+ using the common RGB_to_luminance definitions
+ */
AlphaPrimitive2D(
const Primitive2DSequence& rChildren,
const Primitive2DSequence& rAlpha);
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx
index c42853fe54b2..cd6133dc54d8 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/animatedprimitive2d.hxx
@@ -52,39 +52,59 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** AnimatedSwitchPrimitive2D class
+
+ This is the basic class for simple, animated primitives. The basic idea
+ is to have an animation definition (AnimationEntry) who's basic
+ functionality is to return a state value for any given animation time in
+ the range of [0.0 .. 1.0]. Depending on the state, the decomposition
+ calculates an index, which of the members of the child vector is to
+ be visualized.
+
+ An example: For blinking, the Child vector should exist of two entries;
+ for values of [0.0 .. 0.5] the first, else the last entry will be used.
+ This mechanism is not limited to two entries, though.
+ */
class AnimatedSwitchPrimitive2D : public GroupPrimitive2D
{
private:
- // the animation definition which allows translation of a point in time
- // to an animation state [0.0 .. 1.0]. This member contains a cloned
- // definition and is owned by this implementation
+ /**
+ The animation definition which allows translation of a point in time
+ to an animation state [0.0 .. 1.0]. This member contains a cloned
+ definition and is owned by this implementation.
+ */
animation::AnimationEntry* mpAnimationEntry;
- // bitfield
- // flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate
- // between both types if they are on/off
+ /// bitfield
+ /** flag if this is a text or graphic animation. Necessary since SdrViews need to differentiate
+ between both types if they are on/off
+ */
unsigned mbIsTextAnimation : 1;
public:
+ /// constructor
AnimatedSwitchPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
const Primitive2DSequence& rChildren,
bool bIsTextAnimation);
+
+ /// destructor - needed due to mpAnimationEntry
virtual ~AnimatedSwitchPrimitive2D();
- // get data
+ /// data read access
const animation::AnimationEntry& getAnimationEntry() const { return *mpAnimationEntry; }
bool isTextAnimation() const { return mbIsTextAnimation; }
bool isGraphicAnimation() const { return !isTextAnimation(); }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // The getDecomposition is overloaded here since the decompose is dependent of the point in time,
- // so the default implementation is nut useful here, it needs to be handled locally
+ /** The getDecomposition is overloaded here since the decompose is dependent of the point in time,
+ so the default implementation is nut useful here, it needs to be handled locally
+ */
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
@@ -96,19 +116,26 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** AnimatedBlinkPrimitive2D class
+
+ Basically the same mechanism as in AnimatedSwitchPrimitive2D, but the
+ decomposition is specialized in delivering the children in the
+ range [0.0.. 0.5] and an empty sequence else
+ */
class AnimatedBlinkPrimitive2D : public AnimatedSwitchPrimitive2D
{
protected:
public:
+ /// constructor
AnimatedBlinkPrimitive2D(
const animation::AnimationEntry& rAnimationEntry,
const Primitive2DSequence& rChildren,
bool bIsTextAnimation);
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -120,24 +147,32 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** AnimatedInterpolatePrimitive2D class
+
+ Specialized on multi-step animations based on matrix transformations. The
+ Child sequelce will be embedded in a matrix transformation. That transformation
+ will be linearly combined from the decomposed values and the animation value
+ to allow a smooth animation.
+ */
class AnimatedInterpolatePrimitive2D : public AnimatedSwitchPrimitive2D
{
private:
- // the transformations
+ /// the transformations
std::vector< basegfx::tools::B2DHomMatrixBufferedDecompose > maMatrixStack;
protected:
public:
+ /// constructor
AnimatedInterpolatePrimitive2D(
const std::vector< basegfx::B2DHomMatrix >& rmMatrixStack,
const animation::AnimationEntry& rAnimationEntry,
const Primitive2DSequence& rChildren,
bool bIsTextAnimation);
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
index 7b998fd3e749..82a568fc9ea1 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/backgroundcolorprimitive2d.hxx
@@ -46,35 +46,48 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** AnimatedInterpolatePrimitive2D class
+
+ This primitive is defined to fill the whole visible Viewport with
+ the given color (and thus decomposes to a filled polygon). This
+ makes it a view-depnendent primitive by definition. It only has
+ a valid decomposition if a valid Viewport is given in the
+ ViewInformation2D at decomposition time.
+
+ It will try to buffer it's last decomposition using maLastViewport
+ to detect changes in the get2DDecomposition call.
+ */
class BackgroundColorPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the fill color to use
basegfx::BColor maBColor;
- // the last used viewInformation, used from getDecomposition for buffering
+ /// the last used viewInformation, used from getDecomposition for buffering
basegfx::B2DRange maLastViewport;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
BackgroundColorPrimitive2D(
const basegfx::BColor& rBColor);
- // get data
+ /// data read access
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get 2d range
+ /// get B2Drange
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // Overload standard getDecomposition call to be view-dependent here
+ /// Overload standard getDecomposition call to be view-dependent here
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
index f41863f36992..6cf45ffefe54 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -76,7 +76,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
+ /** BasePrimitive2D class
+
+ Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
This class is strongly virtual due to the lack of getPrimitiveID() implementation.
This is by purpose, this base class shall not be incarnated and be used directly as
@@ -201,7 +203,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
+ /** BufferedDecompositionPrimitive2D class
+
+ Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
which want to buffer the decomoposition result
Buffering the decomposition is the most-used buffering and is thus used my most
@@ -270,23 +274,24 @@ namespace drawinglayer
{
namespace primitive2d
{
- // get B2DRange from a given Primitive2DReference
+ /// get B2DRange from a given Primitive2DReference
basegfx::B2DRange getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
- // get B2DRange from a given Primitive2DSequence
+ /// 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 (BasePrimitive2D)
- // and using compare operator
+ /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
+ and using compare operator
+ */
bool arePrimitive2DReferencesEqual(const Primitive2DReference& rA, const Primitive2DReference& rB);
- // compare two Primitive2DReferences for equality, uses arePrimitive2DReferencesEqual internally
+ /// compare two Primitive2DReferences for equality, uses arePrimitive2DReferencesEqual internally
bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB);
- // concatenate sequence
+ /// concatenate sequence
void appendPrimitive2DSequenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DSequence& rSource);
- // concatenate single Primitive2D
+ /// concatenate single Primitive2D
void appendPrimitive2DReferenceToPrimitive2DSequence(Primitive2DSequence& rDest, const Primitive2DReference& rSource);
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
index 209b0ed17e40..b13528184f3b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/borderlineprimitive2d.hxx
@@ -46,25 +46,41 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** BorderLinePrimitive2D class
+
+ This is the basic primitive to build frames around objects, e.g. tables.
+ It defines a single or double line from Start to nd using the LeftWidth,
+ Distance and RightWidth definitions.
+ The LineStart/End overlap is defined by the Extend(Inner|Outer)(Start|End)
+ definitions.
+ */
class BorderLinePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the line definition
basegfx::B2DPoint maStart;
basegfx::B2DPoint maEnd;
+
+ /// the widths of single/double line
double mfLeftWidth;
double mfDistance;
double mfRightWidth;
+
+ /// edge overlap sizes
double mfExtendInnerStart;
double mfExtendInnerEnd;
double mfExtendOuterStart;
double mfExtendOuterEnd;
+
+ /// the line color
basegfx::BColor maRGBColor;
- // bitfield
+ /// bitfield
+ /// flags to influence inside/outside creation
unsigned mbCreateInside : 1;
unsigned mbCreateOutside : 1;
- // helpers
+ /// local helpers
double getCorrectedLeftWidth() const
{
return basegfx::fTools::equal(1.0, mfLeftWidth) ? 0.0 : mfLeftWidth;
@@ -106,10 +122,11 @@ namespace drawinglayer
}
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
BorderLinePrimitive2D(
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd,
@@ -124,7 +141,7 @@ namespace drawinglayer
bool bCreateOutside,
const basegfx::BColor& rRGBColor);
- // get data
+ /// data read access
const basegfx::B2DPoint& getStart() const { return maStart; }
const basegfx::B2DPoint& getEnd() const { return maEnd; }
double getLeftWidth() const { return mfLeftWidth; }
@@ -138,10 +155,10 @@ namespace drawinglayer
bool getCreateOutside() const { return mbCreateOutside; }
const basegfx::BColor& getRGBColor() const { return maRGBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx
index 95c53347debb..b153e04ee1cb 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/chartprimitive2d.hxx
@@ -46,6 +46,12 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** ChartPrimitive2D class
+
+ This is a helper primitive which decomposes to the ChartMetaFile
+ visualisation. It is used to allow specific renderers to do something
+ direct for visualising the chart.
+ */
class ChartPrimitive2D : public GroupPrimitive2D
{
private:
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx
index 974faf506da8..5dd55405adf7 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/controlprimitive2d.hxx
@@ -47,63 +47,74 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** ControlPrimitive2D class
+
+ Base class for ControlPrimitive handling. It decoposes to a
+ graphical representation (Bitmap data) of the control. This
+ representation is limited to a quadratic pixel maximum defined
+ in the applicatin settings.
+ */
class ControlPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // object's base data
+ /// object's base data
basegfx::B2DHomMatrix maTransform;
com::sun::star::uno::Reference< com::sun::star::awt::XControlModel > mxControlModel;
- // the created an cached awt::XControl
+ /// the created an cached awt::XControl
com::sun::star::uno::Reference< com::sun::star::awt::XControl > mxXControl;
- // the last used scaling, used from getDecomposition for buffering
+ /// the last used scaling, used from getDecomposition for buffering
basegfx::B2DVector maLastViewScaling;
- // used from getXControl() to create a local awt::XControl which is remembered in mxXControl
- // and from thereon always used and returned by getXControl()
+ /** used from getXControl() to create a local awt::XControl which is remembered in mxXControl
+ and from thereon always used and returned by getXControl()
+ */
void createXControl();
- // single local decompositions, used from create2DDecomposition()
+ /// single local decompositions, used from create2DDecomposition()
Primitive2DReference createBitmapDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
Primitive2DReference createPlaceholderDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
protected:
- // local decomposition
+ /// local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
ControlPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& rxControlModel);
- // constructor with an additional XControl as parameter to allow to hand it over at incarnation time
- // if it exists. This will avoid to create a 2nd one on demand in createXControl()
- // and thus double the XControls.
+ /** constructor with an additional XControl as parameter to allow to hand it over at incarnation time
+ if it exists. This will avoid to create a 2nd one on demand in createXControl()
+ and thus double the XControls.
+ */
ControlPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& rxControlModel,
const com::sun::star::uno::Reference< com::sun::star::awt::XControl >& rxXControl);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const com::sun::star::uno::Reference< com::sun::star::awt::XControlModel >& getControlModel() const { return mxControlModel; }
- // mxControl access. This will on demand create the awt::XControl using createXControl()
- // if it does not exist. It may already have been created or even handed over at
- // incarnation
+ /** mxControl access. This will on demand create the awt::XControl using createXControl()
+ if it does not exist. It may already have been created or even handed over at
+ incarnation
+ */
const com::sun::star::uno::Reference< com::sun::star::awt::XControl >& getXControl() const;
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // Overload standard getDecomposition call to be view-dependent here
+ /// Overload standard getDecomposition call to be view-dependent here
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
index 86540d53e325..c27b6874891f 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/embedded3dprimitive2d.hxx
@@ -42,52 +42,65 @@
#include <basegfx/matrix/b2dhommatrix.hxx>
//////////////////////////////////////////////////////////////////////////////
-// BackgroundColorPrimitive2D class
+// Embedded3DPrimitive2D class
namespace drawinglayer
{
namespace primitive2d
{
+ /** Embedded3DPrimitive2D class
+
+ This is a helper primitive which allows embedding of single 3D
+ primitives to the 2D primitive logic. It will get the scene it's
+ involved and thus the 3D transformation. With this information it
+ is able to provide 2D range data for a 3D primitive.
+
+ This primitive will not be visualized and decomposes to a yellow
+ 2D rectangle to visualize that this should never be visualized
+ */
class Embedded3DPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // the sequence of 3d primitives
+ /// the sequence of 3d primitives
primitive3d::Primitive3DSequence mxChildren3D;
- // the 2D scene object transformation
+ /// the 2D scene object transformation
basegfx::B2DHomMatrix maObjectTransformation;
- // the 3D transformations
+ /// 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
+ /** 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)
+ /// the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
Primitive2DSequence maShadowPrimitives;
- // #i96669# add simple range buffering for this primitive
+ /// #i96669# add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
- // bitfield
- // flag if given 3D geometry is already cheched for shadow definitions and 2d shadows
- // are created in 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
+ /// private helpers
bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
Embedded3DPrimitive2D(
const primitive3d::Primitive3DSequence& rxChildren3D,
const basegfx::B2DHomMatrix& rObjectTransformation,
@@ -96,7 +109,7 @@ namespace drawinglayer
double fShadowSlant,
const basegfx::B3DRange& rScene3DRange);
- // get data
+ /// get data
const primitive3d::Primitive3DSequence& getChildren3D() const { return mxChildren3D; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; }
@@ -104,13 +117,13 @@ namespace drawinglayer
double getShadowSlant() const { return mfShadowSlant; }
const basegfx::B3DRange& getScene3DRange() const { return maScene3DRange; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx
index c2d305b78c11..7d2b084a9356 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillbitmapprimitive2d.hxx
@@ -47,32 +47,49 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** FillBitmapPrimitive2D class
+
+ This class defines a bitmap filling for a rectangular area. The
+ Range is defined by the Transformation, the fill by the FillBitmapAttribute.
+ There, the fill consists of a Bitmap (not transparent) defining the fill data
+ and a Point/Vector pair defining the relative position/size [0.0 .. 1.0]
+ inside the area where the bitmap is positioned. A flag defines then if this
+ is tiled or not.
+
+ Renderers should handle this primitive; it has a geometrically correct
+ decomposition, but on pixel oututs the areas where the tiled pieces are
+ aligned tend to show up (one overlapping or empty pixel)
+ */
class FillBitmapPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometric definition
basegfx::B2DHomMatrix maTransformation;
+
+ /// the fill attributes
attribute::FillBitmapAttribute maFillBitmap;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
FillBitmapPrimitive2D(
const basegfx::B2DHomMatrix& rTransformation,
const attribute::FillBitmapAttribute& rFillBitmap);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; }
- // compare operator
+ /// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index f995bb487b33..d6853e69b149 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -46,32 +46,44 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** FillGradientPrimitive2D class
+
+ This class defines a gradient filling for a rectangular area. The
+ Range is defined by the Transformation, the gradient by the FillGradientAttribute.
+
+ The decomposition will deliver the decomposed gradient, e.g. for an ellipse
+ gradient the various ellipses in various color steps will be created.
+ */
class FillGradientPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometric definition
basegfx::B2DRange maObjectRange;
+
+ /// the gradient definition
attribute::FillGradientAttribute maFillGradient;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
FillGradientPrimitive2D(
const basegfx::B2DRange& rObjectRange,
const attribute::FillGradientAttribute& rFillGradient);
- // get data
+ /// data read access
const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index 6181630e948d..1df3bb103eb0 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -40,41 +40,56 @@
#include <drawinglayer/attribute/fillattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
-// FillbitmapPrimitive2D class
+// FillHatchPrimitive2D class
namespace drawinglayer
{
namespace primitive2d
{
+ /** FillHatchPrimitive2D class
+
+ This class defines a hatch filling for a rectangular area. The
+ Range is defined by the Transformation, the hatch by the FillHatchAttribute.
+ If the background is to be filled, a flag in FillHatchAttribute is set and
+ the BColor defines the background color.
+
+ The decomposition will deliver the hatch lines.
+ */
class FillHatchPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometric definition
basegfx::B2DRange maObjectRange;
+
+ /// the hatch definition
attribute::FillHatchAttribute maFillHatch;
+
+ /// hatch background color (if used)
basegfx::BColor maBColor;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
FillHatchPrimitive2D(
const basegfx::B2DRange& rObjectRange,
const basegfx::BColor& rBColor,
const attribute::FillHatchAttribute& rFillHatch);
- // get data
+ /// data read access
const basegfx::B2DRange& getObjectRange() const { return maObjectRange; }
const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx
index 33923eebc259..e6adcacc97e0 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/graphicprimitive2d.hxx
@@ -46,18 +46,39 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** GraphicPrimitive2D class
+
+ Primitive to hold graphics defined by GraphicObject and GraphicAttr
+ combination. This includes MetaFiles and diverse pixel-oriented graphic
+ formats. It even includes animated GIFs, Croppings and other changes
+ defined in GraphicAttr.
+
+ This makes the decomposition contain a wide variety of possibilites,
+ too. From a simple BitmapPrimitive over AnimatedSwitchPrimitive2D,
+ MetafilePrimitive2D (with and without embedding in a masking when e.g.
+ the Metafile is bigger than the geometry) and embeddings in
+ TransformPrimitive2D and MaskPrimitive2D for croppings.
+
+ The primitive geometry area is defined by Transform.
+ */
class GraphicPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometric definition
basegfx::B2DHomMatrix maTransform;
+
+ /// the GraphicObject with all it's content possibilities
GraphicObject maGraphicObject;
+
+ /// The GraphicAttr with all it's modification possibilities
GraphicAttr maGraphicAttr;
protected:
- // local decomposition
+ /// local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor(s)
GraphicPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
const GraphicObject& rGraphicObject,
@@ -66,19 +87,19 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rTransform,
const GraphicObject& rGraphicObject);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const GraphicObject& getGraphicObject() const { return maGraphicObject; }
const GraphicAttr& getGraphicAttr() const { return maGraphicAttr; }
bool isTransparent() const;
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
index d2b90e271cda..4ba83fc75c88 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
@@ -48,29 +48,47 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** GridPrimitive2D class
+
+ This primitive is specialized to Grid visualisation. The graphic definition
+ (Transform) contains the whole grid area, but will of course be combined
+ with the visible area (Viewport) when decomposed. Also a reolution-dependent
+ point reduction is used to not create too much grid visualisation data. This
+ makes this primitive highly view-dependent and it dynamically buffers
+ the last decomposition dependent from the Viewport used.
+ */
class GridPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// The geometry definition for the grid area
basegfx::B2DHomMatrix maTransform;
+
+ /// grid layout definitions
double mfWidth;
double mfHeight;
double mfSmallestViewDistance;
double mfSmallestSubdivisionViewDistance;
sal_uInt32 mnSubdivisionsX;
sal_uInt32 mnSubdivisionsY;
+
+ /// Grid color for single-pixel grid points
basegfx::BColor maBColor;
+
+ /// The Bitmap (with alpha) for grid cross points
BitmapEx maCrossMarker;
- // the last used object to view transformtion and the last Viewport,
- // used from getDecomposition for decide buffering
+ /** the last used object to view transformtion and the last Viewport,
+ used from getDecomposition for decide buffering
+ */
basegfx::B2DHomMatrix maLastObjectToViewTransformation;
basegfx::B2DRange maLastViewport;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
GridPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
double fWidth,
@@ -82,7 +100,7 @@ namespace drawinglayer
const basegfx::BColor& rBColor,
const BitmapEx& rCrossMarker);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
double getWidth() const { return mfWidth; }
double getHeight() const { return mfHeight; }
@@ -93,16 +111,16 @@ namespace drawinglayer
const basegfx::BColor& getBColor() const { return maBColor; }
const BitmapEx& getCrossMarker() const { return maCrossMarker; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get 2d range
+ /// get 2d range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // Overload standard getDecomposition call to be view-dependent here
+ /// Overload standard getDecomposition call to be view-dependent here
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
index cd6efef472bb..89b49420a3e7 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
@@ -45,7 +45,9 @@ namespace drawinglayer
{
namespace primitive2d
{
- /** Baseclass for all grouping 2D primitives
+ /** GroupPrimitive2D class
+
+ Baseclass for all grouping 2D primitives
The grouping primitive in it's basic form is capable of holding
a child primitive content and returns it on decomposition on default.
@@ -78,23 +80,23 @@ namespace drawinglayer
class GroupPrimitive2D : public BasePrimitive2D
{
private:
- // the children. Declared private since this shall never be changed at all after construction
+ /// the children. Declared private since this shall never be changed at all after construction
Primitive2DSequence maChildren;
public:
- // constructor
+ /// constructor
GroupPrimitive2D(const Primitive2DSequence& rChildren);
- // data access
+ /// data read access
const Primitive2DSequence& getChildren() const { return maChildren; }
- // compare operator
+ /// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
- // local decomposition. Implementation will just return children
+ /// local decomposition. Implementation will just return children
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
index 0ba83b2c383a..a1171cb846e0 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/helplineprimitive2d.hxx
@@ -47,32 +47,52 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** HelplineStyle2D definition
+
+ The available styles of Helplines
+ */
enum HelplineStyle2D
{
HELPLINESTYLE2D_POINT,
HELPLINESTYLE2D_LINE
};
+ /** HelplinePrimitive2D class
+
+ This primitive provides a view-dependent helpline definition. The Helpline
+ is defined by a line equation (Point and vector) and a style. When the style
+ is a line, dependent from Viewport the visible part of that Helpline is
+ constructed. For Point, a cross is constructed. This primitive is highly
+ view-dependent.
+
+ The visualisation uses the two given colors to create a dashed line with
+ the given dash length.
+ */
class HelplinePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// Helpline geometry definition
basegfx::B2DPoint maPosition;
basegfx::B2DVector maDirection;
HelplineStyle2D meStyle;
+
+ /// Helpline style definition
basegfx::BColor maRGBColA;
basegfx::BColor maRGBColB;
double mfDiscreteDashLength;
- // the last used object to view transformtion and the last Viewport,
- // used from getDecomposition for decide buffering
+ /** the last used object to view transformtion and the last Viewport,
+ used from getDecomposition for decide buffering
+ */
basegfx::B2DHomMatrix maLastObjectToViewTransformation;
basegfx::B2DRange maLastViewport;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
HelplinePrimitive2D(
const basegfx::B2DPoint& rPosition,
const basegfx::B2DVector& rDirection,
@@ -81,7 +101,7 @@ namespace drawinglayer
const basegfx::BColor& aRGBColB,
double fDiscreteDashLength);
- // get data
+ /// data read access
const basegfx::B2DPoint getPosition() const { return maPosition; }
const basegfx::B2DVector getDirection() const { return maDirection; }
HelplineStyle2D getStyle() const { return meStyle; }
@@ -89,13 +109,13 @@ namespace drawinglayer
const basegfx::BColor& getRGBColB() const { return maRGBColB; }
double getDiscreteDashLength() const { return mfDiscreteDashLength; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // Overload standard getDecomposition call to be view-dependent here
+ /// Overload standard getDecomposition call to be view-dependent here
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx
index 1df9ca2111af..3b69c685c985 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx
@@ -44,29 +44,35 @@ namespace drawinglayer
{
namespace primitive2d
{
- // This primitive is used to represent geometry for non-visible objects,
- // e.g. a PresObj's outline. To still be able to use primitives for HitTest
- // functionality, the 2d decompositions will produce an as much as possible
- // simplified line geometry encapsulated in this primtive when there is no
- // line geometry. In a further enchanced version this may change to 'if neither
- // filled nor lines' creation criteria. The whole primitive decomposes to nothing,
- // so no one not knowing it will be influenced. Only helper processors for hit test
- // (and maybe BoundRect extractors) will use it and it's children subcontent.
+ /** HitTestPrimitive2D class
+
+ This primitive is used to represent geometry for non-visible objects,
+ e.g. a PresObj's outline. To still be able to use primitives for HitTest
+ functionality, the 2d decompositions will produce an as much as possible
+ simplified line geometry encapsulated in this primtive when there is no
+ line geometry. In a further enchanced version this may change to 'if neither
+ filled nor lines' creation criteria. The whole primitive decomposes to nothing,
+ so no one not knowing it will be influenced. Only helper processors for hit test
+ (and maybe BoundRect extractors) will use it and it's children subcontent.
+ */
class HitTestPrimitive2D : public GroupPrimitive2D
{
public:
+ /// constructor
HitTestPrimitive2D(const Primitive2DSequence& rChildren);
- // despite returning an empty decomposition since it's no visualisation data,
- // range calculation is intended to use invisible replacement geometry, so
- // the local implementation will return the children's range
+ /** despite returning an empty decomposition since it's no visualisation data,
+ range calculation is intended to use invisible replacement geometry, so
+ the local implementation will return the children's range
+ */
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // local decomposition. Implementation will return empty Primitive2DSequence
- // since this is no visualisation data
+ /** local decomposition. Implementation will return empty Primitive2DSequence
+ since this is no visualisation data
+ */
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx
index ae7a316e03da..9ba7e7796395 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/invertprimitive2d.hxx
@@ -44,12 +44,23 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** HitTestPrimitive2D class
+
+ This is a helper class which encapsulates geometry that should be
+ painted XOR, e.g. old cursor visualisations. It decomposes to
+ it's content, so when not supporting it, the contained geometry
+ will be visualized normally.
+ Unfortunately this is still needed, but hard to support on various
+ systems. XOR painting needs read access to the target, so modern
+ graphic systems tend to not support it anymore.
+ */
class InvertPrimitive2D : public GroupPrimitive2D
{
public:
+ /// constructor
InvertPrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
index 77f450403302..cc4c054f8bb3 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
@@ -41,38 +41,55 @@
#include <vcl/bitmapex.hxx>
//////////////////////////////////////////////////////////////////////////////
-// MarkerPrimitive2D class
+// MarkerArrayPrimitive2D class
namespace drawinglayer
{
namespace primitive2d
{
+ /** MarkerArrayPrimitive2D class
+
+ This primtive defines an array of markers. Their size is defined
+ in pixels and independent from the view transformation which makes
+ this primitive highly view-dependent. It is also transformation
+ invariant, so that the bitmap is always visualized unscaled and
+ unrotated.
+ It is used e.g. for grid position visualisation. The given Bitmap
+ (with alpha) is defined to be visible centered at each of the given
+ positions.
+ It decomposes to the needed number of BitmapPrimitive2D's, so it would
+ be efficient to handle it directly in a renderer.
+ */
class MarkerArrayPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the positions for the marker
std::vector< basegfx::B2DPoint > maPositions;
+
+ /// the marker definintion to visualize
BitmapEx maMarker;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
MarkerArrayPrimitive2D(
const std::vector< basegfx::B2DPoint >& rPositions,
const BitmapEx& rMarker);
- // get data
+ /// data read access
const std::vector< basegfx::B2DPoint >& getPositions() const { return maPositions; }
const BitmapEx& getMarker() const { return maMarker; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx
index 9be17376941e..72d5bd3b9b6b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/maskprimitive2d.hxx
@@ -45,23 +45,39 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** MaskPrimitive2D class
+
+ This is the central masking primitive. It's a grouping
+ primitive and contains a PolyPolygon which defines the visible
+ area. Only visualisation parts of the Child primitive sequence
+ inside of the mask PolyPolygon is defined to be visible.
+
+ This primitive should be handled by a renderer. If it is not handled,
+ it decomposes to it's Child content, and thus the visualisation would
+ contaiun no clips.
+
+ The geometrc range of this primitive is completely defined by the Mask
+ PolyPolygon since by definition nothing outside of the mask is visible.
+ */
class MaskPrimitive2D : public GroupPrimitive2D
{
private:
+ /// the mask PolyPolygon
basegfx::B2DPolyPolygon maMask;
public:
+ /// constructor
MaskPrimitive2D(
const basegfx::B2DPolyPolygon& rMask,
const Primitive2DSequence& rChildren);
- // get data
+ /// data read access
const basegfx::B2DPolyPolygon& getMask() const { return maMask; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
index da8e49b644c6..e5f884f09294 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/mediaprimitive2d.hxx
@@ -46,38 +46,55 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** MediaPrimitive2D class
+
+ This is a unified primitive for Media visualisation, e.g. animations
+ or sounds. It's geometry is defined by Transform. For conveinience,
+ it also contains a discrete border size (aka Pixels) which will be added
+ if used. This makes it a view-dependent primitive. It also gets a filled
+ background and the decomposition will try to create a graphic representation
+ if te content (defined by the URL), e.g. a still frome for animated stuff.
+ */
class MediaPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the geometry definition
basegfx::B2DHomMatrix maTransform;
+
+ /// the content definition
rtl::OUString maURL;
+
+ /// style: background color
basegfx::BColor maBackgroundColor;
+
+ /// discrete border (in 'pixels')
sal_uInt32 mnDiscreteBorder;
protected:
- // local decomposition
+ /// local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
MediaPrimitive2D(
const basegfx::B2DHomMatrix& rTransform,
const rtl::OUString& rURL,
const basegfx::BColor& rBackgroundColor,
sal_uInt32 nDiscreteBorder);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
const rtl::OUString& getURL() const { return maURL; }
const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; }
sal_uInt32 getDiscreteBorder() const { return mnDiscreteBorder; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
index 23eb5dd1b36e..039db9387024 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
@@ -47,28 +47,52 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** MediaPrimitive2D class
+
+ This is the MetaFile representing primitive. It's geometry is defined
+ by MetaFileTransform. The content (defined by MetaFile) will be scaled
+ to the geometric definiton by using PrefMapMode and PrefSize of the
+ Metafile.
+
+ It has shown that this not always guarantees that all Metafile content
+ is inside the geometric definition, but this primitive defines that this
+ is the case to allow a getB2DRange implementation. If it cannot be
+ guaranteed that the Metafile is inside the geometric definition, it should
+ be embedded to a MaskPrimitive2D.
+
+ This primitive has no decomposition yet, so when not supported by a renderer,
+ it will not be visualized.
+
+ In the future, a decomposition implementation would be appreciated and would
+ have many advantages; Metafile would no longer have to be rendered by
+ sub-systems and a standard way for converting Metafiles would exist.
+ */
class MetafilePrimitive2D : public BasePrimitive2D
{
private:
+ /// the geometry definition
basegfx::B2DHomMatrix maMetaFileTransform;
+
+ /// the content definition
GDIMetaFile maMetaFile;
public:
+ /// constructor
MetafilePrimitive2D(
const basegfx::B2DHomMatrix& rMetaFileTransform,
const GDIMetaFile& rMetaFile);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransform() const { return maMetaFileTransform; }
const GDIMetaFile& getMetaFile() const { return maMetaFile; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
index 903ba89c9a5b..e93dd523e0b7 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx
@@ -45,23 +45,42 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** ModifiedColorPrimitive2D class
+
+ This primitive is a grouping primitive and allows to define
+ how the colors of it's child content shall be modified for
+ visualisation. This can be (and is) used e.g. for generic shadow
+ visualisation by forcing all color usages of the contained
+ sub-content to the shadow color.
+
+ For the possibilities of color modifications, please refer
+ to the basegfx::BColorModifier definitions in basegfx. For
+ processing there is tooling in basegfx to build a stack of
+ BColorModifiers to always be able to proccess the correct
+ colors.
+
+ If a renderer does not handle this primitive, the content will
+ be visualized unchanged.
+ */
class ModifiedColorPrimitive2D : public GroupPrimitive2D
{
private:
+ /// The ColorModifier to use
basegfx::BColorModifier maColorModifier;
public:
+ /// constructor
ModifiedColorPrimitive2D(
const Primitive2DSequence& rChildren,
const basegfx::BColorModifier& rColorModifier);
- // get data
+ /// data read access
const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
index 52ed2435f5e7..5eca0ac2ab13 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/pagepreviewprimitive2d.hxx
@@ -46,38 +46,43 @@ namespace drawinglayer
{
namespace primitive2d
{
- // This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing
- // the page contents (given as PageContent here) if these contain e.g.
- // view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want
- // those primitives to be visualized correctly, Your renderer needs to locally correct it's
- // ViewInformation2D to reference the new XDrawPage.
+ /** PagePreviewPrimitive2D class
+
+ This primitive is needed to have the correct XDrawPage as ViewInformation for decomposing
+ the page contents (given as PageContent here) if these contain e.g.
+ view-dependent (in this case XDrawPage-dependent) text fields like PageNumber. If You want
+ those primitives to be visualized correctly, Your renderer needs to locally correct it's
+ ViewInformation2D to reference the new XDrawPage.
+ */
class PagePreviewPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // the XDrawPage visualized by this primitive. When we go forward with primitives
- // this will not only be used by the renderers to provide the correct decompose
- // graphic attribute context, but also to completely create the page's sub-content.
+ /** the XDrawPage visualized by this primitive. When we go forward with primitives
+ this will not only be used by the renderers to provide the correct decompose
+ graphic attribute context, but also to completely create the page's sub-content.
+ */
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > mxDrawPage;
- // the PageContent
+ /// the PageContent
Primitive2DSequence maPageContent;
- // the own geometry
+ /// the own geometry
basegfx::B2DHomMatrix maTransform;
- // content width and height
+ /// content width and height
double mfContentWidth;
double mfContentHeight;
- // bitfield
- // flag to allow keeping the aspect ratio
+ /// bitfield
+ /// flag to allow keeping the aspect ratio
unsigned mbKeepAspectRatio : 1;
protected:
- // local decomposition. Implementation will just return children
+ /// local decomposition. Implementation will just return children
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PagePreviewPrimitive2D(
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& rxDrawPage,
const basegfx::B2DHomMatrix& rTransform,
@@ -86,7 +91,7 @@ namespace drawinglayer
const Primitive2DSequence& rPageContent,
bool bKeepAspectRatio);
- // get data
+ /// data read access
const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& getXDrawPage() const { return mxDrawPage; }
const Primitive2DSequence& getPageContent() const { return maPageContent; }
const basegfx::B2DHomMatrix& getTransform() const { return maTransform; }
@@ -94,13 +99,13 @@ namespace drawinglayer
double getContentHeight() const { return mfContentHeight; }
bool getKeepAspectRatio() const { return mbKeepAspectRatio; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // own getB2DRange
+ /// own getB2DRange
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
index 7e82f53c2401..793c96444bac 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/pointarrayprimitive2d.hxx
@@ -40,37 +40,51 @@
#include <basegfx/color/bcolor.hxx>
//////////////////////////////////////////////////////////////////////////////
-// MarkerPrimitive2D class
+// PointArrayPrimitive2D class
namespace drawinglayer
{
namespace primitive2d
{
+ /** PointArrayPrimitive2D class
+
+ This primitive defines single,discrete 'pixels' for the given
+ positions in the given color. This makes it view-dependent since
+ the logic size of a 'pixel' depends on the view transformation.
+
+ This is one of the non-decomposable primitives, so a renderer
+ should proccess it (Currently it is only used for grid visualisation,
+ but this may change).
+ */
class PointArrayPrimitive2D : public BasePrimitive2D
{
private:
+ /// the array of positions
std::vector< basegfx::B2DPoint > maPositions;
+
+ /// the color to use
basegfx::BColor maRGBColor;
- // #i96669# add simple range buffering for this primitive
+ /// #i96669# add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
public:
+ /// constructor
PointArrayPrimitive2D(
const std::vector< basegfx::B2DPoint >& rPositions,
const basegfx::BColor& rRGBColor);
- // get data
+ /// data read access
const std::vector< basegfx::B2DPoint >& getPositions() const { return maPositions; }
const basegfx::BColor& getRGBColor() const { return maRGBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
index 4e04786fb2e5..4c6f5b49bf01 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
@@ -49,26 +49,40 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolygonHairlinePrimitive2D class
+
+ This primitive defines a Hairline. Since hairlines are view-dependent,
+ this primitive is view-dependent, too.
+
+ This is one of the non-decomposable primitives, so a renderer
+ should proccess it.
+ */
class PolygonHairlinePrimitive2D : public BasePrimitive2D
{
private:
+ /// the hairline geometry
basegfx::B2DPolygon maPolygon;
+
+ /// the hairline color
basegfx::BColor maBColor;
public:
- PolygonHairlinePrimitive2D(const basegfx::B2DPolygon& rPolygon, const basegfx::BColor& rBColor);
+ /// constructor
+ PolygonHairlinePrimitive2D(
+ const basegfx::B2DPolygon& rPolygon,
+ const basegfx::BColor& rBColor);
- // get data
+ /// data read access
const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; }
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -81,44 +95,59 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolygonMarkerPrimitive2D class
+
+ This primitive defines a two-colored marker hairline which is
+ dashed with the given dash length. Since hairlines are view-dependent,
+ this primitive is view-dependent, too.
+
+ It will be decomposed to the needed PolygonHairlinePrimitive2D if
+ not handled directly by a renderer.
+ */
class PolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the marker hairline geometry
basegfx::B2DPolygon maPolygon;
+
+ /// the two colors
basegfx::BColor maRGBColorA;
basegfx::BColor maRGBColorB;
+
+ /// the dash distance in 'pixels'
double mfDiscreteDashLength;
- // decomposition is view-dependent, remember last InverseObjectToViewTransformation
+ /// decomposition is view-dependent, remember last InverseObjectToViewTransformation
basegfx::B2DHomMatrix maLastInverseObjectToViewTransformation;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolygonMarkerPrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const basegfx::BColor& rRGBColorA,
const basegfx::BColor& rRGBColorB,
double fDiscreteDashLength);
- // get data
+ /// data read access
const basegfx::B2DPolygon& getB2DPolygon() const { return maPolygon; }
const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
double getDiscreteDashLength() const { return mfDiscreteDashLength; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // get local decomposition. Overloaded since this decomposition is view-dependent
+ /// get local decomposition. Overloaded since this decomposition is view-dependent
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -131,39 +160,52 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolygonStrokePrimitive2D class
+
+ This primitive defines a line with line width, line join, line color
+ and stroke attributes. It will be decomposed dependent on the definition
+ to the needed primitives, e.g. filled PolyPolygons for fat lines.
+ */
class PolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the line geometry
basegfx::B2DPolygon maPolygon;
+
+ /// the line attributes like width, join and color
attribute::LineAttribute maLineAttribute;
+
+ /// the line stroking (if used)
attribute::StrokeAttribute maStrokeAttribute;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolygonStrokePrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute);
+ /// constructor without stroking
PolygonStrokePrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute);
- // get data
+ /// data read access
basegfx::B2DPolygon getB2DPolygon() const { return maPolygon; }
const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -176,17 +218,24 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolygonWavePrimitive2D class
+
+ This primitive defines a waveline based on a PolygonStrokePrimitive2D
+ where the wave is defined by wave width and wave length.
+ */
class PolygonWavePrimitive2D : public PolygonStrokePrimitive2D
{
private:
+ /// wave definition
double mfWaveWidth;
double mfWaveHeight;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolygonWavePrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
@@ -194,23 +243,24 @@ namespace drawinglayer
double fWaveWidth,
double fWaveHeight);
+ /// constructor without stroking
PolygonWavePrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
double fWaveWidth,
double fWaveHeight);
- // get data
+ /// data read access
double getWaveWidth() const { return mfWaveWidth; }
double getWaveHeight() const { return mfWaveHeight; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -223,17 +273,25 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolygonStrokeArrowPrimitive2D class
+
+ This primitive defines a PolygonStrokePrimitive2D which is extended
+ eventually by start and end definitions which are normally used for
+ arrows.
+ */
class PolygonStrokeArrowPrimitive2D : public PolygonStrokePrimitive2D
{
private:
+ /// geometric definitions for line start and end
attribute::LineStartEndAttribute maStart;
attribute::LineStartEndAttribute maEnd;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
@@ -241,23 +299,24 @@ namespace drawinglayer
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd);
+ /// constructor without stroking
PolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd);
- // get data
+ /// data read access
const attribute::LineStartEndAttribute& getStart() const { return maStart; }
const attribute::LineStartEndAttribute& getEnd() const { return maEnd; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index 0a288cd2ac65..8c0512402120 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -51,30 +51,40 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonHairlinePrimitive2D class
+
+ This primitive defines a multi-PolygonHairlinePrimitive2D and is
+ just for convenience. The definition is not different from the single
+ defined PolygonHairlinePrimitive2Ds.
+ */
class PolyPolygonHairlinePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the hairline geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the hairline color
basegfx::BColor maBColor;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor);
- // get data
+ /// data read access
basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; }
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -87,38 +97,50 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonMarkerPrimitive2D class
+
+ This primitive defines a multi-PolygonMarkerPrimitive2D and is
+ just for convenience. The definition is not different from the single
+ defined PolygonMarkerPrimitive2Ds.
+ */
class PolyPolygonMarkerPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the marker hairline geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the two colors
basegfx::BColor maRGBColorA;
basegfx::BColor maRGBColorB;
+
+ /// the dash distance in 'pixels'
double mfDiscreteDashLength;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonMarkerPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const basegfx::BColor& rRGBColorA,
const basegfx::BColor& rRGBColorB,
double fDiscreteDashLength);
- // get data
+ // data read access
basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; }
const basegfx::BColor& getRGBColorA() const { return maRGBColorA; }
const basegfx::BColor& getRGBColorB() const { return maRGBColorB; }
double getDiscreteDashLength() const { return mfDiscreteDashLength; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -131,39 +153,52 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonStrokePrimitive2D class
+
+ This primitive defines a multi-PolygonStrokePrimitive2D and is
+ just for convenience. The definition is not different from the single
+ defined PolygonStrokePrimitive2Ds.
+ */
class PolyPolygonStrokePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the line geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the line attributes like width, join and color
attribute::LineAttribute maLineAttribute;
+
+ /// the line stroking (if used)
attribute::StrokeAttribute maStrokeAttribute;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute);
+ /// constructor without stroking
PolyPolygonStrokePrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::LineAttribute& rLineAttribute);
- // get data
+ /// data read access
basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; }
const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -176,17 +211,25 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonStrokePrimitive2D class
+
+ This primitive defines a multi-PolygonStrokeArrowPrimitive2D and is
+ just for convenience. The definition is not different from the single
+ defined PolygonStrokeArrowPrimitive2Ds.
+ */
class PolyPolygonStrokeArrowPrimitive2D : public PolyPolygonStrokePrimitive2D
{
private:
+ /// geometric definitions for line start and end
attribute::LineStartEndAttribute maStart;
attribute::LineStartEndAttribute maEnd;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::LineAttribute& rLineAttribute,
@@ -194,23 +237,24 @@ namespace drawinglayer
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd);
+ /// constructor without stroking
PolyPolygonStrokeArrowPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::LineAttribute& rLineAttribute,
const attribute::LineStartEndAttribute& rStart,
const attribute::LineStartEndAttribute& rEnd);
- // get data
+ /// data read access
const attribute::LineStartEndAttribute& getStart() const { return maStart; }
const attribute::LineStartEndAttribute& getEnd() const { return maEnd; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -223,28 +267,38 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonColorPrimitive2D class
+
+ This primitive defines a PolyPolygon filled with a single color.
+ This is one of the non-decomposable primitives, so a renderer
+ should proccess it.
+ */
class PolyPolygonColorPrimitive2D : public BasePrimitive2D
{
private:
+ /// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the polygon fill color
basegfx::BColor maBColor;
public:
+ /// constructor
PolyPolygonColorPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const basegfx::BColor& rBColor);
- // get data
+ /// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -257,29 +311,39 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonColorPrimitive2D class
+
+ This primitive defines a PolyPolygon filled with a gradient. The
+ decomosition will create a MaskPrimitive2D containing a
+ FillGradientPrimitive2D.
+ */
class PolyPolygonGradientPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the gradient definition
attribute::FillGradientAttribute maFillGradient;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonGradientPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::FillGradientAttribute& rFillGradient);
- // get data
+ /// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
const attribute::FillGradientAttribute& getFillGradient() const { return maFillGradient; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -292,32 +356,44 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonHatchPrimitive2D class
+
+ This primitive defines a PolyPolygon filled with a hatch. The
+ decomosition will create a MaskPrimitive2D containing a
+ FillHatchPrimitive2D.
+ */
class PolyPolygonHatchPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the hatch definition
attribute::FillHatchAttribute maFillHatch;
+
+ /// the hatch background color (if used)
basegfx::BColor maBackgroundColor;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonHatchPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const basegfx::BColor& rBackgroundColor,
const attribute::FillHatchAttribute& rFillHatch);
- // get data
+ /// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
const basegfx::BColor& getBackgroundColor() const { return maBackgroundColor; }
const attribute::FillHatchAttribute& getFillHatch() const { return maFillHatch; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -330,29 +406,39 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** PolyPolygonBitmapPrimitive2D class
+
+ This primitive defines a PolyPolygon filled with bitmap data
+ (including alpha). The decomosition will create a MaskPrimitive2D
+ containing a FillBitmapPrimitive2D.
+ */
class PolyPolygonBitmapPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// the PolyPolygon geometry
basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the bitmap fill definition (may include tiling)
attribute::FillBitmapAttribute maFillBitmap;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
PolyPolygonBitmapPrimitive2D(
const basegfx::B2DPolyPolygon& rPolyPolygon,
const attribute::FillBitmapAttribute& rFillBitmap);
- // get data
+ /// data read access
const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
const attribute::FillBitmapAttribute& getFillBitmap() const { return maFillBitmap; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx
index f7e9b1dcac0b..77d56ca8026f 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/primitivetools2d.hxx
@@ -39,68 +39,78 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
//////////////////////////////////////////////////////////////////////////////
-// 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 create2DDecomposition
-// implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit()
namespace drawinglayer
{
namespace primitive2d
{
+ /** DiscreteMetricDependentPrimitive2D class
+
+ 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 create2DDecomposition
+ implementation may use an up-to-date DiscreteUnit accessible using getDiscreteUnit()
+ */
class DiscreteMetricDependentPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // the last used fDiscreteUnit definitions for decomposition. Since this
- // is checked and updated from get2DDecomposition() it will be current and
- // usable in create2DDecomposition()
+ /** the last used fDiscreteUnit definitions for decomposition. Since this
+ is checked and updated from get2DDecomposition() it will be current and
+ usable in create2DDecomposition()
+ */
double mfDiscreteUnit;
public:
+ /// constructor
DiscreteMetricDependentPrimitive2D()
: BufferedDecompositionPrimitive2D(),
mfDiscreteUnit(0.0)
{
}
- // data access
+ /// data read access
double getDiscreteUnit() const { return mfDiscreteUnit; }
- // get local decomposition. Overloaded since this decomposition is view-dependent
+ /// get local decomposition. Overloaded since this decomposition is view-dependent
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
} // end of 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 create2DDecomposition
-// implementation may use an up-to-date Viewport accessible using getViewport()
namespace drawinglayer
{
namespace primitive2d
{
+ /** ViewportDependentPrimitive2D class
+
+ 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 create2DDecomposition
+ implementation may use an up-to-date Viewport accessible using getViewport()
+ */
class ViewportDependentPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // the last used Viewport definition for decomposition. Since this
- // is checked and updated from get2DDecomposition() it will be current and
- // usable in create2DDecomposition()
+ /** the last used Viewport definition for decomposition. Since this
+ is checked and updated from get2DDecomposition() it will be current and
+ usable in create2DDecomposition()
+ */
basegfx::B2DRange maViewport;
public:
+ /// constructor
ViewportDependentPrimitive2D()
: BufferedDecompositionPrimitive2D(),
maViewport()
{
}
- // data access
+ /// data read access
const basegfx::B2DRange& getViewport() const { return maViewport; }
- // get local decomposition. Overloaded since this decomposition is view-dependent
+ /// get local decomposition. Overloaded since this decomposition is view-dependent
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
index a86e32adca26..65d2bdf67f92 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -49,33 +49,60 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** ScenePrimitive2D class
+
+ This primitive defines a 3D scene as a 2D primitive and is the anchor point
+ for a 3D visualisation. The decomposition is view-dependent and will try to
+ re-use already rendered 3D content.
+
+ The rendering is done using the default-3D renderer from basegfx which supports
+ AntiAliasing.
+
+ The 2D primitive's geometric range is defined completely by the
+ ObjectTransformation combined with evtl. 2D shadows from the 3D objects. The
+ shadows of 3D objects are 2D polygons, projected with the 3D transformation.
+
+ This is the class a renderer may process directly when he wants to implement
+ an own (e.g. system-specific) 3D renderer.
+ */
class ScenePrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- primitive3d::Primitive3DSequence mxChildren3D; // the 3d sub-primitives
- attribute::SdrSceneAttribute maSdrSceneAttribute; // 3d scene attribute set
- attribute::SdrLightingAttribute maSdrLightingAttribute; // lighting attribute set
- basegfx::B2DHomMatrix maObjectTransformation; // object transformation for scene for 2d definition
- geometry::ViewInformation3D maViewInformation3D; // scene transformation set and object transformation
+ /// the 3D geometry definition
+ primitive3d::Primitive3DSequence mxChildren3D;
+
+ /// 3D scene attribute set
+ attribute::SdrSceneAttribute maSdrSceneAttribute;
+
+ /// lighting attribute set
+ attribute::SdrLightingAttribute maSdrLightingAttribute;
+
+ /// object transformation for scene for 2D definition
+ basegfx::B2DHomMatrix maObjectTransformation;
+
+ /// scene transformation set and object transformation
+ geometry::ViewInformation3D maViewInformation3D;
- // the primitiveSequence for on-demand created shadow primitives (see mbShadow3DChecked)
+ /// 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
+ /// bitfield
+ /** flag if given 3D geometry is already cheched for shadow definitions and 2d shadows
+ are created in maShadowPrimitives
+ */
unsigned mbShadow3DChecked : 1;
- // the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition
+ /// the last used NewDiscreteSize and NewUnitVisiblePart definitions for decomposition
double mfOldDiscreteSizeX;
double mfOldDiscreteSizeY;
basegfx::B2DRange maOldUnitVisiblePart;
- // the last created BitmapEx, e.g. for fast HitTest. This does not really need
- // memory since BitmapEx is internally RefCounted
+ /** the last created BitmapEx, e.g. for fast HitTest. This does not really need
+ memory since BitmapEx is internally RefCounted
+ */
BitmapEx maOldRenderedBitmap;
- // private helpers
+ /// private helpers
bool impGetShadow3D(const geometry::ViewInformation2D& rViewInformation) const;
void calculateDiscreteSizes(
const geometry::ViewInformation2D& rViewInformation,
@@ -84,28 +111,30 @@ namespace drawinglayer
basegfx::B2DRange& rUnitVisibleRange) const;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
- // public helpers
- // 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.
+ /// public helpers
+ /** 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;
Primitive2DSequence getShadow2D(const geometry::ViewInformation2D& rViewInformation) const;
- // Fast HitTest which uses the last buffered BitmapEx from the last
- // rendered area if available. The return value describes if the check
- // could be done with the current information, so do NOT use o_rResult
- // when it returns false. o_rResult will be changed on return true and
- // then contains a definitive answer if content of this scene is hit or
- // not. On return false, it is normally necessary to use the geometric
- // HitTest (see CutFindProcessor usages). The given HitPoint
- // has to be in logic coordinates in scene's ObjectCoordinateSystem.
+ /** Fast HitTest which uses the last buffered BitmapEx from the last
+ rendered area if available. The return value describes if the check
+ could be done with the current information, so do NOT use o_rResult
+ when it returns false. o_rResult will be changed on return true and
+ then contains a definitive answer if content of this scene is hit or
+ not. On return false, it is normally necessary to use the geometric
+ HitTest (see CutFindProcessor usages). The given HitPoint
+ has to be in logic coordinates in scene's ObjectCoordinateSystem.
+ */
bool tryToCheckLastVisualisationDirectHit(const basegfx::B2DPoint& rLogicHitPoint, bool& o_rResult) const;
- // constructor/destructor
+ /// constructor
ScenePrimitive2D(
const primitive3d::Primitive3DSequence& rxChildren3D,
const attribute::SdrSceneAttribute& rSdrSceneAttribute,
@@ -113,23 +142,23 @@ namespace drawinglayer
const basegfx::B2DHomMatrix& rObjectTransformation,
const geometry::ViewInformation3D& rViewInformation3D);
- // get data
+ /// data ead access
const primitive3d::Primitive3DSequence& getChildren3D() const { return mxChildren3D; }
const attribute::SdrSceneAttribute& getSdrSceneAttribute() const { return maSdrSceneAttribute; }
const attribute::SdrLightingAttribute& getSdrLightingAttribute() const { return maSdrLightingAttribute; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const geometry::ViewInformation3D& getViewInformation3D() const { return maViewInformation3D; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // get local decomposition. Overloaded since this decomposition is view-dependent
+ /// get local decomposition. Overloaded since this decomposition is view-dependent
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx
index 3da621f5f174..0e3f7258441a 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/shadowprimitive2d.hxx
@@ -46,32 +46,50 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** ShadowPrimitive2D class
+
+ This primitive defines a generic shadow geometry construction
+ for 2D objects. It decomposes to a TransformPrimitive2D embedded
+ into a ModifiedColorPrimitive2D.
+
+ It's for primtive usage convenience, so that not everyone has
+ to implement the generic shadow construction by himself.
+
+ The same geometry as sequence of primitives is used as geometry and
+ as shadow. Since these are RefCounted Uno-Api objects, no extra objects
+ are needed for the shadow itself; all the local decompositions of the
+ original geometry can be reused from the renderer for shadow visualisation.
+ */
class ShadowPrimitive2D : public GroupPrimitive2D
{
private:
+ /// the shadow transformation, normally just an offset
basegfx::B2DHomMatrix maShadowTransform;
+
+ /// the shadow color to which all geometry is to be forced
basegfx::BColor maShadowColor;
public:
+ /// constructor
ShadowPrimitive2D(
const basegfx::B2DHomMatrix& rShadowTransform,
const basegfx::BColor& rShadowColor,
const Primitive2DSequence& rChildren);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
const basegfx::BColor& getShadowColor() const { return maShadowColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // create decomposition
+ /// create decomposition
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx
index 9ccb91e7bebd..c86e4c91bb86 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/structuretagprimitive2d.hxx
@@ -45,30 +45,34 @@ namespace drawinglayer
{
namespace primitive2d
{
- // This class is used to provode simple support for adding grouped
- // pdf writer structured element information like used in sd from
- // unomodel.cxx where a ViewObjectContactRedirector is used to add
- // such information for diverse objects.
- // This primitive encapsulates these and the VCLPdfRenderer uses it
- // to apply the needed infos directly to the pdf export in a compatible
- // way.
- // If a renderer ignores this, it just decomposes to it's child
- // content.
+ /** StructureTagPrimitive2D class
+
+ This class is used to provode simple support for adding grouped
+ pdf writer structured element information like used in sd from
+ unomodel.cxx where a ViewObjectContactRedirector is used to add
+ such information for diverse objects.
+ This primitive encapsulates these and the VCLPdfRenderer uses it
+ to apply the needed infos directly to the pdf export in a compatible
+ way.
+ If a renderer ignores this, it just decomposes to it's child
+ content.
+ */
class StructureTagPrimitive2D : public GroupPrimitive2D
{
private:
- // the PDF structure element this grouping represents
+ /// the PDF structure element this grouping represents
vcl::PDFWriter::StructElement maStructureElement;
public:
+ /// constructor
StructureTagPrimitive2D(
const vcl::PDFWriter::StructElement& rStructureElement,
const Primitive2DSequence& rChildren);
- // data access
+ /// data read access
const vcl::PDFWriter::StructElement& getStructureElement() const { return maStructureElement; }
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
index fb72500fcb38..4f33c8a7d48b 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx
@@ -55,7 +55,10 @@ namespace drawinglayer
{
namespace primitive2d
{
- // This is used for both underline and overline
+ /** FontUnderline definition
+
+ This is used for both underline and overline
+ */
enum FontUnderline
{
FONT_UNDERLINE_NONE,
@@ -78,6 +81,7 @@ namespace drawinglayer
FONT_UNDERLINE_BOLDWAVE
};
+ /** FontStrikeout definition */
enum FontStrikeout
{
FONT_STRIKEOUT_NONE,
@@ -88,6 +92,7 @@ namespace drawinglayer
FONT_STRIKEOUT_X
};
+ /** FontEmphasisMark definition */
enum FontEmphasisMark
{
FONT_EMPHASISMARK_NONE,
@@ -97,6 +102,7 @@ namespace drawinglayer
FONT_EMPHASISMARK_ACCENT
};
+ /** FontRelief definition */
enum FontRelief
{
FONT_RELIEF_NONE,
@@ -104,9 +110,17 @@ namespace drawinglayer
FONT_RELIEF_ENGRAVED
};
+ /** TextDecoratedPortionPrimitive2D class
+
+ This primitive expands the TextSimplePortionPrimitive2D by common
+ decorations used in the office. It can be decomposed and will create
+ a TextSimplePortionPrimitive2D and all the contained decorations (if used)
+ as geometry.
+ */
class TextDecoratedPortionPrimitive2D : public TextSimplePortionPrimitive2D
{
private:
+ /// decoration definitions
basegfx::BColor maOverlineColor;
basegfx::BColor maTextlineColor;
FontUnderline meFontOverline;
@@ -115,14 +129,14 @@ namespace drawinglayer
FontEmphasisMark meFontEmphasisMark;
FontRelief meFontRelief;
- // bitfield
+ /// bitfield
unsigned mbUnderlineAbove : 1;
unsigned mbWordLineMode : 1;
unsigned mbEmphasisMarkAbove : 1;
unsigned mbEmphasisMarkBelow : 1;
unsigned mbShadow : 1;
- // helper methods
+ /// helper methods
void impCreateTextLine(
std::vector< Primitive2DReference >& rTarget,
basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans,
@@ -150,13 +164,14 @@ namespace drawinglayer
basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans) const;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
TextDecoratedPortionPrimitive2D(
- // TextSimplePortionPrimitive2D parameters
+ /// TextSimplePortionPrimitive2D parameters
const basegfx::B2DHomMatrix& rNewTransform,
const String& rText,
xub_StrLen aTextPosition,
@@ -166,7 +181,7 @@ namespace drawinglayer
const ::com::sun::star::lang::Locale& rLocale,
const basegfx::BColor& rFontColor,
- // local parameters
+ /// local parameters
const basegfx::BColor& rOverlineColor,
const basegfx::BColor& rTextlineColor,
FontUnderline eFontOverline = FONT_UNDERLINE_NONE,
@@ -180,7 +195,7 @@ namespace drawinglayer
FontRelief eFontRelief = FONT_RELIEF_NONE,
bool bShadow = false);
- // get data
+ /// data read access
FontUnderline getFontOverline() const { return meFontOverline; }
FontUnderline getFontUnderline() const { return meFontUnderline; }
FontStrikeout getFontStrikeout() const { return meFontStrikeout; }
@@ -188,20 +203,19 @@ namespace drawinglayer
FontRelief getFontRelief() const { return meFontRelief; }
basegfx::BColor getOverlineColor() const { return maOverlineColor; }
basegfx::BColor getTextlineColor() const { return maTextlineColor; }
-
bool getUnderlineAbove() const { return mbUnderlineAbove; }
bool getWordLineMode() const { return mbWordLineMode; }
bool getEmphasisMarkAbove() const { return mbEmphasisMarkAbove; }
bool getEmphasisMarkBelow() const { return mbEmphasisMarkBelow; }
bool getShadow() const { return mbShadow; }
- // compare operator
+ /// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
index 19f910f3444d..77b64d16ea24 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/texteffectprimitive2d.hxx
@@ -45,6 +45,7 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** TextEffectStyle2D definition */
enum TextEffectStyle2D
{
TEXTEFFECTSTYLE2D_RELIEF_EMBOSSED_DEFAULT,
@@ -54,50 +55,59 @@ namespace drawinglayer
TEXTEFFECTSTYLE2D_OUTLINE
};
+ /** TextEffectPrimitive2D class
+
+ This primitive embeds text primitives (normally, as can be seen can
+ also be used for any other primitives) which have some TextEffect applied
+ and create the needed geometry and embedding on decomposition.
+ */
class TextEffectPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- // the text content
+ /// the text (or other) content
Primitive2DSequence maTextContent;
- // the style to apply, the direction and the rotation center
+ /// the style to apply, the direction and the rotation center
const basegfx::B2DPoint maRotationCenter;
double mfDirection;
TextEffectStyle2D meTextEffectStyle2D;
- // the last used object to view transformtion used from getDecomposition
- // for decide buffering
+ /** the last used object to view transformtion used from getDecomposition
+ for decide buffering
+ */
basegfx::B2DHomMatrix maLastObjectToViewTransformation;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// construcor
TextEffectPrimitive2D(
const Primitive2DSequence& rTextContent,
const basegfx::B2DPoint& rRotationCenter,
double fDirection,
TextEffectStyle2D eTextEffectStyle2D);
- // get data
+ /// data read access
const Primitive2DSequence& getTextContent() const { return maTextContent; }
const basegfx::B2DPoint& getRotationCenter() const { return maRotationCenter; }
double getDirection() const { return mfDirection; }
TextEffectStyle2D getTextEffectStyle2D() const { return meTextEffectStyle2D; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // own get range implementation to solve more effective. Content is by definition displaced
- // by a fixed discrete unit, thus the contained geometry needs only once be asked for it's
- // own basegfx::B2DRange
+ /** own get range implementation to solve more effective. Content is by definition displaced
+ by a fixed discrete unit, thus the contained geometry needs only once be asked for it's
+ own basegfx::B2DRange
+ */
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
- // Overload standard getDecomposition call to be view-dependent here
+ /// Overload standard getDecomposition call to be view-dependent here
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
index 1160704c0fa3..3f9c02b6e9bd 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/texthierarchyprimitive2d.hxx
@@ -45,17 +45,23 @@ namespace drawinglayer
{
namespace primitive2d
{
- // text format hierarchy helper class. It decomposes to it's
- // content, so all direct renderers may ignore it. If You need
- // to know more about line hierarchies You may react on it and
- // also need to take care that the source of data uses it.
+ /** TextHierarchyLinePrimitive2D class
+
+ Text format hierarchy helper class. It decomposes to it's
+ content, so all direct renderers may ignore it. If You need
+ to know more about line hierarchies You may react on it and
+ also need to take care that the source of data uses it.
+
+ This primitive encapsulates text lines.
+ */
class TextHierarchyLinePrimitive2D : public GroupPrimitive2D
{
private:
public:
+ /// constructor
TextHierarchyLinePrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -67,14 +73,18 @@ namespace drawinglayer
{
namespace primitive2d
{
- // see TextHierarchyLinePrimitive2D comment
+ /** TextHierarchyBulletPrimitive2D class
+
+ This primitive encapsulates text bullets.
+ */
class TextHierarchyBulletPrimitive2D : public GroupPrimitive2D
{
private:
public:
+ /// constructor
TextHierarchyBulletPrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -86,14 +96,18 @@ namespace drawinglayer
{
namespace primitive2d
{
- // see TextHierarchyLinePrimitive2D comment
+ /** TextHierarchyParagraphPrimitive2D class
+
+ This primitive encapsulates text paragraphs.
+ */
class TextHierarchyParagraphPrimitive2D : public GroupPrimitive2D
{
private:
public:
+ /// constructor
TextHierarchyParagraphPrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -105,14 +119,18 @@ namespace drawinglayer
{
namespace primitive2d
{
- // see TextHierarchyLinePrimitive2D comment
+ /** TextHierarchyBlockPrimitive2D class
+
+ This primitive encapsulates text blocks.
+ */
class TextHierarchyBlockPrimitive2D : public GroupPrimitive2D
{
private:
public:
+ /// constructor
TextHierarchyBlockPrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -124,19 +142,28 @@ namespace drawinglayer
{
namespace primitive2d
{
- // type enum
+ /** FieldType definition */
enum FieldType
{
- FIELD_TYPE_COMMON, // unspecified. If more info is needed for a FieldType,
- // create a new type and it's handling
- FIELD_TYPE_PAGE, // uses "FIELD_SEQ_BEGIN;PageField" -> special handling
- FIELD_TYPE_URL // uses URL as string -> special handling
+ /** unspecified. If more info is needed for a FieldType,
+ create a new type and it's handling
+ */
+ FIELD_TYPE_COMMON,
+
+ /** uses "FIELD_SEQ_BEGIN;PageField" -> special handling */
+ FIELD_TYPE_PAGE,
+
+ /** uses URL as string -> special handling */
+ FIELD_TYPE_URL
};
- // see TextHierarchyLinePrimitive2D comment.
- // Also: This type uses a type enum to transport the encapsulated field
- // type. Also added is a String which is type-dependent. E.g. for URL
- // fields, it contains the URL.
+ /** TextHierarchyFieldPrimitive2D class
+
+ This primitive encapsulates text fields.
+ Also: This type uses a type enum to transport the encapsulated field
+ type. Also added is a String which is type-dependent. E.g. for URL
+ fields, it contains the URL.
+ */
class TextHierarchyFieldPrimitive2D : public GroupPrimitive2D
{
private:
@@ -144,19 +171,20 @@ namespace drawinglayer
rtl::OUString maString;
public:
+ /// constructor
TextHierarchyFieldPrimitive2D(
const Primitive2DSequence& rChildren,
const FieldType& rFieldType,
const rtl::OUString& rString);
- // get data
+ /// data read access
FieldType getType() const { return meType; }
const rtl::OUString& getString() const { return maString; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
@@ -168,20 +196,24 @@ namespace drawinglayer
{
namespace primitive2d
{
- // #i97628#
- // Primitive to encapsulate text from an active text edit; some
- // renderers need to suppress this output due to painting the
- // edited text in e.g. an OutlinerEditView. It's derived from
- // GroupPrimitive2D, so the implicit decomposition will use the
- // content. To suppress, this primitive needs to be parsed by
- // the renderer without taking any action
+ /** TextHierarchyEditPrimitive2D class
+
+ #i97628#
+ Primitive to encapsulate text from an active text edit; some
+ renderers need to suppress this output due to painting the
+ edited text in e.g. an OutlinerEditView. It's derived from
+ GroupPrimitive2D, so the implicit decomposition will use the
+ content. To suppress, this primitive needs to be parsed by
+ the renderer without taking any action.
+ */
class TextHierarchyEditPrimitive2D : public GroupPrimitive2D
{
private:
public:
+ /// constructor
TextHierarchyEditPrimitive2D(const Primitive2DSequence& rChildren);
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
index df09718a7582..e0e2b6bbc4cb 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -66,15 +66,24 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** TextLayouterDevice class
+
+ This helper class exists to isolate all accesses to VCL
+ text formatting/handling functionality for primitive implementations.
+ When in the future FontHandling may move to an own library independent
+ from VCL, primitives will be prepared.
+ */
class TextLayouterDevice
{
- // internally used VirtualDevice
+ /// internally used VirtualDevice
VirtualDevice& mrDevice;
public:
+ /// constructor/destructor
TextLayouterDevice();
~TextLayouterDevice();
+ /// tooling methods
void setFont(const Font& rFont);
void setFontAttributes(
const FontAttributes& rFontAttributes,
@@ -116,11 +125,12 @@ namespace drawinglayer
{
namespace primitive2d
{
- // Create a VCL-Font based on the definitions in FontAttributes
- // and the given FontScaling. The FontScaling defines the FontHeight
- // (fFontScaleY) and the FontWidth (fFontScaleX). The combination of
- // both defines FontStretching, where no stretching happens at
- // fFontScaleY == fFontScaleX
+ /** Create a VCL-Font based on the definitions in FontAttributes
+ and the given FontScaling. The FontScaling defines the FontHeight
+ (fFontScaleY) and the FontWidth (fFontScaleX). The combination of
+ both defines FontStretching, where no stretching happens at
+ fFontScaleY == fFontScaleX
+ */
Font getVclFontFromFontAttributes(
const FontAttributes& rFontAttributes,
double fFontScaleX,
@@ -128,10 +138,11 @@ namespace drawinglayer
double fFontRotation,
const ::com::sun::star::lang::Locale & rLocale);
- // Generate FontAttributes DataSet derived from the given VCL-Font.
- // The FontScaling with fFontScaleY, fFontScaleX relationship (see
- // above) will be set in return parameter o_rSize to allow further
- // processing
+ /** Generate FontAttributes DataSet derived from the given VCL-Font.
+ The FontScaling with fFontScaleY, fFontScaleX relationship (see
+ above) will be set in return parameter o_rSize to allow further
+ processing
+ */
FontAttributes getFontAttributesFromVclFont(
basegfx::B2DVector& o_rSize,
const Font& rFont,
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
index 25b11d7cbf29..43e06ecc3b53 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textprimitive2d.hxx
@@ -60,15 +60,20 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** FontAttributes class
+
+ This attribute class is able to hold all parameters needed/used
+ to completely define the parametrisation of a text portion.
+ */
class FontAttributes
{
private:
- // core data
+ /// core data
String maFamilyName; // Font Family Name
String maStyleName; // Font Style Name
sal_uInt16 mnWeight; // Font weight
- // bitfield
+ /// bitfield
unsigned mbSymbol : 1; // Symbol Font Flag
unsigned mbVertical : 1; // Vertical Text Flag
unsigned mbItalic : 1; // Italic Flag
@@ -78,6 +83,7 @@ namespace drawinglayer
// TODO: pair kerning and CJK kerning
public:
+ /// constructor
FontAttributes(
const String& rFamilyName,
const String& rStyleName,
@@ -100,10 +106,10 @@ namespace drawinglayer
{
}
- // compare operator
+ /// compare operator
bool operator==(const FontAttributes& rCompare) const;
- // data access
+ /// data read access
const String& getFamilyName() const { return maFamilyName; }
const String& getStyleName() const { return maStyleName; }
sal_uInt16 getWeight() const { return mnWeight; }
@@ -123,26 +129,52 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** TextSimplePortionPrimitive2D class
+
+ This is the basic primitive for representing a text portion. It contains
+ all needed information. If it is not handled by a renderer, it's decomposition
+ will provide the text PolyPolygon outlines as filled polygons, correctly
+ transformed.
+
+ To get better text quality, it is suggested to handle tis primitive directly
+ in a renderer. In that case, e.g. hintings on the system can be supported.
+ */
class TextSimplePortionPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
- basegfx::B2DHomMatrix maTextTransform; // text range transformation from unit range ([0.0 .. 1.0]) to text range
- String maText; // the text, used from maTextPosition up to maTextPosition + maTextLength
- xub_StrLen maTextPosition; // the index from where on maText is used
- xub_StrLen maTextLength; // the length for maText usage, starting from maTextPosition
- ::std::vector< double > maDXArray; // the DX array scale-independent in unit coordinates
- FontAttributes maFontAttributes; // the font to use
- ::com::sun::star::lang::Locale maLocale; // the Locale for the text
- basegfx::BColor maFontColor; // font color
-
- // #i96669# add simple range buffering for this primitive
+ /// text range transformation from unit range ([0.0 .. 1.0]) to text range
+ basegfx::B2DHomMatrix maTextTransform;
+
+ /// The text, used from maTextPosition up to maTextPosition + maTextLength
+ String maText;
+
+ /// The index from where on maText is used
+ xub_StrLen maTextPosition;
+
+ /// The length for maText usage, starting from maTextPosition
+ xub_StrLen maTextLength;
+
+ /// The DX array scale-independent in unit coordinates
+ ::std::vector< double > maDXArray;
+
+ /// The font to use
+ FontAttributes maFontAttributes;
+
+ /// The Locale for the text
+ ::com::sun::star::lang::Locale maLocale;
+
+ /// font color
+ basegfx::BColor maFontColor;
+
+ /// #i96669# add simple range buffering for this primitive
basegfx::B2DRange maB2DRange;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
TextSimplePortionPrimitive2D(
const basegfx::B2DHomMatrix& rNewTransform,
const String& rText,
@@ -153,12 +185,13 @@ namespace drawinglayer
const ::com::sun::star::lang::Locale& rLocale,
const basegfx::BColor& rFontColor);
- // helpers
- // get text outlines as polygons and their according ObjectTransformation. Handles all
- // the necessary VCL outline extractins, scaling adaptions and other stuff.
+ /// helpers
+ /** get text outlines as polygons and their according ObjectTransformation. Handles all
+ the necessary VCL outline extractins, scaling adaptions and other stuff.
+ */
void getTextOutlinesAndTransformation(basegfx::B2DPolyPolygonVector& rTarget, basegfx::B2DHomMatrix& rTransformation) const;
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; }
const String& getText() const { return maText; }
xub_StrLen getTextPosition() const { return maTextPosition; }
@@ -168,13 +201,13 @@ namespace drawinglayer
const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; }
const basegfx::BColor& getFontColor() const { return maFontColor; }
- // compare operator
+ /// compare operator
virtual bool operator==( const BasePrimitive2D& rPrimitive ) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx
index 1646667342af..1723cc708ea8 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/transformprimitive2d.hxx
@@ -45,26 +45,47 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** TransformPrimitive2D class
+
+ This is one of the basic grouping primitives and it provides
+ embedding a sequence of primitives (a geometry) into a
+ transformation. All renderers have to handle this, usually by
+ building a current transformation stack (linear combination)
+ and applying this to all to-be-rendered geometry. If not handling
+ this, the output will be mostly wrong since this primitive is
+ widely used.
+
+ It does transform by embedding an existing geometry into a
+ transformation as Child-content. This allows re-usage of the
+ refcounted Uno-Api primitives and their existung, buffered
+ decompositions.
+
+ It could e.g. be used to show a single object geometry in 1000
+ different, transformed states without the need to create those
+ thousand primitive contents.
+ */
class TransformPrimitive2D : public GroupPrimitive2D
{
private:
+ // the transformation to apply to the child geometry
basegfx::B2DHomMatrix maTransformation;
public:
+ /// constructor
TransformPrimitive2D(
const basegfx::B2DHomMatrix& rTransformation,
const Primitive2DSequence& rChildren);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx
index d7ca69129e02..6e8970e7bee5 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx
@@ -44,26 +44,37 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** UnifiedAlphaPrimitive2D class
+
+ This primitive encapsualtes a child hierarchy and defines
+ that it shall be visualized with the given transparency. That
+ transparency is unique for all contained geometry, so that
+ e.g. overlapping polygons in the child geometry will not show
+ regions of combined transparency, but be all rendered with the
+ defined, single transparency.
+ */
class UnifiedAlphaPrimitive2D : public GroupPrimitive2D
{
private:
- double mfAlpha; // unified transparence
+ /// the unified alpha transparence
+ double mfAlpha;
public:
+ /// constructor
UnifiedAlphaPrimitive2D(
const Primitive2DSequence& rChildren,
double fAlpha);
- // get data
+ /// data read access
double getAlpha() const { return mfAlpha; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // create decomposition
+ /// create decomposition
virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
index 6bf84a401891..3ceae01ed3b2 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/wrongspellprimitive2d.hxx
@@ -47,35 +47,53 @@ namespace drawinglayer
{
namespace primitive2d
{
+ /** WrongSpellPrimitive2D class
+
+ This is a helper primitive to hold evtl. WrongSpell visualisations
+ in the sequence of primitives. The primitive holds this information
+ separated form the TextPortions to where it belongs to tot expand the
+ TextSimplePortionPrimitive2D more as needed.
+
+ A renderer who does not want to visualize this (if contained at all)
+ can detect and ignore this primitive. If it's decomposition is used,
+ it will be visualized as red wavelines.
+
+ The geometric definition defines a line on the X-Axis (no Y-coordinates)
+ which will when transformed by Transformation, create the coordinate data.
+ */
class WrongSpellPrimitive2D : public BufferedDecompositionPrimitive2D
{
private:
+ /// geometry definition
basegfx::B2DHomMatrix maTransformation;
double mfStart;
double mfStop;
+
+ /// color (usually red)
basegfx::BColor maColor;
protected:
- // create local decomposition
+ /// create local decomposition
virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
public:
+ /// constructor
WrongSpellPrimitive2D(
const basegfx::B2DHomMatrix& rTransformation,
double fStart,
double fStop,
const basegfx::BColor& rColor);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getTransformation() const { return maTransformation; }
double getStart() const { return mfStart; }
double getStop() const { return mfStop; }
const basegfx::BColor& getColor() const { return maColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive2DIDBlock()
};
} // end of namespace primitive2d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
index 73d28c82ebda..9bf56edb2c53 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/baseprimitive3d.hxx
@@ -76,7 +76,9 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
+ /** BasePrimitive3D class
+
+ 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.
@@ -85,6 +87,8 @@ namespace drawinglayer
- PolygonHairlinePrimitive3D (for 3D hairlines)
- PolyPolygonMaterialPrimitive3D (for 3D filled plane polygons)
+
+ That's all for 3D!
*/
class BasePrimitive3D
: private boost::noncopyable,
@@ -144,7 +148,9 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** Baseclass for all C++ implementations of com::sun::star::graphic::XPrimitive2D
+ /** BufferedDecompositionPrimitive3D class
+
+ 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
@@ -191,23 +197,24 @@ namespace drawinglayer
{
namespace primitive3d
{
- // get B3DRange from a given Primitive3DReference
+ /// get B3DRange from a given Primitive3DReference
basegfx::B3DRange getB3DRangeFromPrimitive3DReference(const Primitive3DReference& rCandidate, const geometry::ViewInformation3D& aViewInformation);
- // get range3D from a given Primitive3DSequence
+ /// 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 (BasePrimitive2D)
- // and using compare operator
+ /** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
+ and using compare operator
+ */
bool arePrimitive3DReferencesEqual(const Primitive3DReference& rA, const Primitive3DReference& rB);
- // compare two Primitive3DReferences for equality, uses arePrimitive3DReferencesEqual internally
+ /// compare two Primitive3DReferences for equality, uses arePrimitive3DReferencesEqual internally
bool arePrimitive3DSequencesEqual(const Primitive3DSequence& rA, const Primitive3DSequence& rB);
- // concatenate sequence
+ /// concatenate sequence
void appendPrimitive3DSequenceToPrimitive3DSequence(Primitive3DSequence& rDest, const Primitive3DSequence& rSource);
- // concatenate single Primitive3D
+ /// concatenate single Primitive3D
void appendPrimitive3DReferenceToPrimitive3DSequence(Primitive3DSequence& rDest, const Primitive3DReference& rSource);
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
index 6912ff25b04d..69e406c75d67 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
@@ -44,7 +44,9 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** Baseclass for all grouping 3D primitives
+ /** GroupPrimitive3D class
+
+ Baseclass for all grouping 3D primitives
The description/functionality is identical with the 2D case in groupprimitive2d.hxx,
please see there for detailed information.
@@ -64,23 +66,23 @@ namespace drawinglayer
class GroupPrimitive3D : public BasePrimitive3D
{
private:
- // the children. Declared private since this shall never be changed at all after construction
+ /// the children. Declared private since this shall never be changed at all after construction
Primitive3DSequence maChildren;
public:
- // constructor
+ /// constructor
GroupPrimitive3D(const Primitive3DSequence& rChildren);
- // data access
+ /// data read access
Primitive3DSequence getChildren() const { return maChildren; }
- // compare operator
+ /// compare operator
virtual bool operator==( const BasePrimitive3D& rPrimitive ) const;
- // local decomposition. Implementation will just return children
+ /// local decomposition. Implementation will just return children
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
index 2e1d7e0b5fe4..2675a1284779 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
@@ -44,7 +44,9 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** HatchTexturePrimitive3D is derived from GroupPrimitive3D, but implements
+ /** HatchTexturePrimitive3D class
+
+ 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
@@ -52,7 +54,10 @@ namespace drawinglayer
class HatchTexturePrimitive3D : public TexturePrimitive3D
{
private:
+ /// the hatch definition
attribute::FillHatchAttribute maHatch;
+
+ /// the buffered decomposed hatch
Primitive3DSequence maBuffered3DDecomposition;
protected:
@@ -64,6 +69,7 @@ namespace drawinglayer
void setBuffered3DDecomposition(const Primitive3DSequence& rNew) { maBuffered3DDecomposition = rNew; }
public:
+ /// constructor
HatchTexturePrimitive3D(
const attribute::FillHatchAttribute& rHatch,
const Primitive3DSequence& rChildren,
@@ -71,16 +77,16 @@ namespace drawinglayer
bool bModulate,
bool bFilter);
- // get data
+ /// data read access
const attribute::FillHatchAttribute& getHatch() const { return maHatch; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx
index 0c5082699e8d..4779241033b0 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx
@@ -44,31 +44,37 @@ namespace drawinglayer
{
namespace primitive3d
{
- // This primitive is used to represent geometry for non-visible objects,
- // e.g. a 3D cube without fill attributes. To still be able to use
- // primitives for HitTest functionality, the 3d decompositions produce
- // an as much as possible simplified fill geometry encapsulated in this
- // primtive when there is no fill geometry. Currently, the 3d hit test
- // uses only areas, so maybe in a further enchanced version this will change
- // to 'if neither filled nor lines' creation criteria. The whole primitive
- // decomposes to nothing, so no one not knowing it will be influenced. Only
- // helper processors for hit test (and maybe BoundRect extractors) will
- // use it and it's children subcontent.
+ /** HitTestPrimitive3D class
+
+ This primitive is used to represent geometry for non-visible objects,
+ e.g. a 3D cube without fill attributes. To still be able to use
+ primitives for HitTest functionality, the 3d decompositions produce
+ an as much as possible simplified fill geometry encapsulated in this
+ primtive when there is no fill geometry. Currently, the 3d hit test
+ uses only areas, so maybe in a further enchanced version this will change
+ to 'if neither filled nor lines' creation criteria. The whole primitive
+ decomposes to nothing, so no one not knowing it will be influenced. Only
+ helper processors for hit test (and maybe BoundRect extractors) will
+ use it and it's children subcontent.
+ */
class HitTestPrimitive3D : public GroupPrimitive3D
{
public:
+ /// constructor
HitTestPrimitive3D(const Primitive3DSequence& rChildren);
- // despite returning an empty decomposition since it's no visualisation data,
- // range calculation is intended to use invisible replacement geometry, so
- // the local implementation will return the children's range
+ /** despite returning an empty decomposition since it's no visualisation data,
+ range calculation is intended to use invisible replacement geometry, so
+ 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
+ /** local decomposition. Implementation will return empty Primitive3DSequence
+ since this is no visualisation data
+ */
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
index 0771e8117fc5..3840bf71a397 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/modifiedcolorprimitive3d.hxx
@@ -45,23 +45,32 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** ModifiedColorPrimitive3D class
+
+ This primitive is a grouping primitive and allows to define
+ how the colors of it's child content shall be modified for
+ visualisation. Please see the ModifiedColorPrimitive2D
+ description for more info.
+ */
class ModifiedColorPrimitive3D : public GroupPrimitive3D
{
private:
+ /// The ColorModifier to use
basegfx::BColorModifier maColorModifier;
public:
+ /// constructor
ModifiedColorPrimitive3D(
const Primitive3DSequence& rChildren,
const basegfx::BColorModifier& rColorModifier);
- // get data
+ /// data read access
const basegfx::BColorModifier& getColorModifier() const { return maColorModifier; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx
index 9b97f60d3642..c73850e4f794 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx
@@ -48,28 +48,40 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** PolygonHairlinePrimitive3D class
+
+ This primitive defines a Hairline in 3D. Since hairlines are view-dependent,
+ this primitive is view-dependent, too.
+
+ This is one of the non-decomposable 3D primitives, so a renderer
+ should proccess it.
+ */
class PolygonHairlinePrimitive3D : public BasePrimitive3D
{
private:
+ /// the hairline geometry
basegfx::B3DPolygon maPolygon;
+
+ /// the hairline color
basegfx::BColor maBColor;
public:
+ /// constructor
PolygonHairlinePrimitive3D(
const basegfx::B3DPolygon& rPolygon,
const basegfx::BColor& rBColor);
- // get data
+ /// data read access
const basegfx::B3DPolygon& getB3DPolygon() const { return maPolygon; }
const basegfx::BColor& getBColor() const { return maBColor; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
@@ -81,36 +93,49 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** PolygonStrokePrimitive3D class
+
+ This primitive defines a 3D line with line width, line join, line color
+ and stroke attributes. It will be decomposed dependent on the definition
+ to the needed primitives, e.g. filled Tubes for fat lines.
+ */
class PolygonStrokePrimitive3D : public BufferedDecompositionPrimitive3D
{
private:
+ /// the line geometry
basegfx::B3DPolygon maPolygon;
+
+ /// the line attributes like width, join and color
attribute::LineAttribute maLineAttribute;
+
+ /// the line stroking (if used)
attribute::StrokeAttribute maStrokeAttribute;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
PolygonStrokePrimitive3D(
const basegfx::B3DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute,
const attribute::StrokeAttribute& rStrokeAttribute);
+ /// constructor without stroking
PolygonStrokePrimitive3D(
const basegfx::B3DPolygon& rPolygon,
const attribute::LineAttribute& rLineAttribute);
- // get data
+ /// data read access
basegfx::B3DPolygon getB3DPolygon() const { return maPolygon; }
const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; }
const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx
index 695d16ec7cf5..f5d45f7c1639 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx
@@ -52,13 +52,20 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** PolygonStrokePrimitive3D class
+
+ This 3D primitive extends a 3D hairline to a 3D tube which is
+ e.g. used for fat lines in 3D. It's decomposition will create all
+ 3D objects needed for the line tubes and the edge roundings
+ in full 3D.
+ */
class PolygonTubePrimitive3D : public PolygonHairlinePrimitive3D
{
private:
- // hold the last decompositon since it's expensive
+ /// hold the last decompositon since it's expensive
Primitive3DSequence maLast3DDecomposition;
- // visualisation parameters
+ /// visualisation parameters
double mfRadius;
double mfDegreeStepWidth;
double mfMiterMinimumAngle;
@@ -72,10 +79,11 @@ namespace drawinglayer
const Primitive3DSequence& getLast3DDecomposition() const { return maLast3DDecomposition; }
void setLast3DDecomposition(const Primitive3DSequence& rNew) { maLast3DDecomposition = rNew; }
- // local decomposition.
+ /// local decomposition.
Primitive3DSequence impCreate3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
PolygonTubePrimitive3D(
const basegfx::B3DPolygon& rPolygon,
const basegfx::BColor& rBColor,
@@ -83,13 +91,13 @@ namespace drawinglayer
double fDegreeStepWidth = 10.0 * F_PI180,
double fMiterMinimumAngle = 15.0 * F_PI180);
- // get data
+ /// data read access
double getRadius() const { return mfRadius; }
double getDegreeStepWidth() const { return mfDegreeStepWidth; }
double getMiterMinimumAngle() const { return mfMiterMinimumAngle; }
basegfx::B2DLineJoin getLineJoin() const { return maLineJoin; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
/** local decomposition. Use own buffering since we are not derived from
@@ -97,7 +105,7 @@ namespace drawinglayer
*/
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
index 1c5b9e400bbb..091e8181e38f 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/polypolygonprimitive3d.hxx
@@ -46,33 +46,45 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** PolyPolygonMaterialPrimitive3D class
+
+ This primitive defines a planar 3D PolyPolygon filled with a single color.
+ This is one of the non-decomposable primitives, so a renderer
+ should proccess it.
+
+ It is assumed here that the PolyPolgon is a single plane in 3D.
+ */
class PolyPolygonMaterialPrimitive3D : public BasePrimitive3D
{
private:
+ /// the PolyPolygon geometry
basegfx::B3DPolyPolygon maPolyPolygon;
+
+ /// the fill parameters
attribute::MaterialAttribute3D maMaterial;
- // bitfield
+ /// bitfield
unsigned mbDoubleSided : 1;
public:
+ /// constructor
PolyPolygonMaterialPrimitive3D(
const basegfx::B3DPolyPolygon& rPolyPolygon,
const attribute::MaterialAttribute3D& rMaterial,
bool bDoubleSided);
- // get data
+ /// data read access
const basegfx::B3DPolyPolygon& getB3DPolyPolygon() const { return maPolyPolygon; }
const attribute::MaterialAttribute3D& getMaterial() const { return maMaterial; }
bool getDoubleSided() const { return mbDoubleSided; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
index 42a9ab94f327..b3a57f2677dc 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
@@ -44,26 +44,33 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** SdrCubePrimitive3D class
+
+ This 3D primitive expands the SdrPrimitive3D to a 3D cube definition.
+ The cube is implicitely in unit coordinates and the given transformation
+ defines it's geometry in space.
+ */
class SdrCubePrimitive3D : public SdrPrimitive3D
{
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
SdrCubePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
index 772e030781fe..5b793a6928f8 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
@@ -42,6 +42,7 @@
//////////////////////////////////////////////////////////////////////////////
// predefines
+
namespace basegfx {
class B3DPolygon;
class B3DPolyPolygon;
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
index 43ae13d4625f..b80198d127d2 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudelathetools3d.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer
{
namespace primitive3d
{
- // Slice3D types
+ /** SliceType3D definition */
enum SliceType3D
{
SLICETYPE3D_REGULAR, // normal geoemtry Slice3D
@@ -61,7 +61,7 @@ namespace drawinglayer
SLICETYPE3D_BACKCAP // back cap
};
- // class to hold one Slice3D
+ /// class to hold one Slice3D
class Slice3D
{
protected:
@@ -92,10 +92,10 @@ namespace drawinglayer
SliceType3D getSliceType() const { return maSliceType; }
};
- // typedef for a group of Slice3Ds
+ /// typedef for a group of Slice3Ds
typedef ::std::vector< Slice3D > Slice3DVector;
- // helpers for creation
+ /// helpers for creation
void createLatheSlices(
Slice3DVector& rSliceVector,
const basegfx::B2DPolyPolygon& rSource,
@@ -117,7 +117,7 @@ namespace drawinglayer
bool bCloseFront,
bool bCloseBack);
- // helpers for geometry extraction
+ /// helpers for geometry extraction
basegfx::B3DPolyPolygon extractHorizontalLinesFromSlice(const Slice3DVector& rSliceVector, bool bCloseHorLines);
basegfx::B3DPolyPolygon extractVerticalLinesFromSlice(const Slice3DVector& rSliceVector);
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
index a5975b050797..a810e0f5ec8e 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -45,23 +45,34 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** SdrExtrudePrimitive3D class
+
+ This 3D primitive expands the SdrPrimitive3D to a 3D extrude definition.
+ The given 2D PolyPolygon geometry is imagined as lying on the XY-plane in 3D
+ and gets extruded in Z-Direction by Depth.
+
+ Various possibilities e.g. for creating diagonals (edge roudings in 3D)
+ and similar are given.
+
+ The decomposition will create all necessary 3D planes for visualisation.
+ */
class SdrExtrudePrimitive3D : public SdrPrimitive3D
{
private:
- // geometry helper for slices
+ /// geometry helper for slices
basegfx::B2DPolyPolygon maCorrectedPolyPolygon;
Slice3DVector maSlices;
- // primitive data
+ /// primitive geometry data
basegfx::B2DPolyPolygon maPolyPolygon;
double mfDepth;
double mfDiagonal;
double mfBackScale;
- // decomposition data when ReducedLineGeometry is used, see get3DDecomposition
+ /// decomposition data when ReducedLineGeometry is used, see get3DDecomposition
geometry::ViewInformation3D* mpLastRLGViewInformation;
- // bitfield
+ /// bitfield
unsigned mbSmoothNormals : 1; // Plane self
unsigned mbSmoothHorizontalNormals : 1; // always
unsigned mbSmoothLids : 1; // Front/back
@@ -69,17 +80,18 @@ namespace drawinglayer
unsigned mbCloseFront : 1;
unsigned mbCloseBack : 1;
- // create slices
+ /// create slices
void impCreateSlices();
- // get (evtl. create) slices
+ /// get (evtl. create) slices
const Slice3DVector& getSlices() const;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
SdrExtrudePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
@@ -97,7 +109,7 @@ namespace drawinglayer
bool bCloseBack);
virtual ~SdrExtrudePrimitive3D();
- // data access
+ /// data read access
const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
double getDepth() const { return mfDepth; }
double getDiagonal() const { return mfDiagonal; }
@@ -109,16 +121,16 @@ namespace drawinglayer
bool getCloseFront() const { return mbCloseFront; }
bool getCloseBack() const { return mbCloseBack; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// 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
+ /// 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
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
index 7d80cbde015c..084ce5bce35e 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -45,14 +45,25 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** SdrLathePrimitive3D class
+
+ This 3D primitive expands the SdrPrimitive3D to a 3D rotation definition.
+ The given 2D PolyPolygon geometry is imagined as lying on the XY-plane in 3D
+ and gets rotated around the Y-Axis.
+
+ Various possibilities e.g. for creating diagonals (edge roudings in 3D)
+ and similar are given.
+
+ The decomposition will create all necessary 3D planes for visualisation.
+ */
class SdrLathePrimitive3D : public SdrPrimitive3D
{
private:
- // geometry helper for slices
+ /// geometry helper for slices
basegfx::B2DPolyPolygon maCorrectedPolyPolygon;
Slice3DVector maSlices;
- // primitive data
+ /// primitive geometry data
basegfx::B2DPolyPolygon maPolyPolygon;
sal_uInt32 mnHorizontalSegments;
sal_uInt32 mnVerticalSegments;
@@ -60,10 +71,10 @@ namespace drawinglayer
double mfBackScale;
double mfRotation;
- // decomposition data when ReducedLineGeometry is used, see get3DDecomposition
+ /// decomposition data when ReducedLineGeometry is used, see get3DDecomposition
geometry::ViewInformation3D* mpLastRLGViewInformation;
- // bitfield
+ /// bitfield
unsigned mbSmoothNormals : 1; // Plane self
unsigned mbSmoothHorizontalNormals : 1; // always
unsigned mbSmoothLids : 1; // Front/back
@@ -71,14 +82,14 @@ namespace drawinglayer
unsigned mbCloseFront : 1;
unsigned mbCloseBack : 1;
- // create slices
+ /// create slices
void impCreateSlices();
- // get (evtl. create) slices
+ /// get (evtl. create) slices
const Slice3DVector& getSlices() const;
protected:
- // local helpers
+ /// local helpers
void impCreateOutlines(
const geometry::ViewInformation3D& rViewInformation,
const basegfx::B3DPolygon& rLoopA,
@@ -90,10 +101,11 @@ namespace drawinglayer
const basegfx::B2DPoint& rStart,
const basegfx::B2DPoint& rEnd) const;
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
SdrLathePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
@@ -113,7 +125,7 @@ namespace drawinglayer
bool bCloseBack);
virtual ~SdrLathePrimitive3D();
- // data access
+ /// data read access
const basegfx::B2DPolyPolygon& getPolyPolygon() const { return maPolyPolygon; }
sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; }
sal_uInt32 getVerticalSegments() const { return mnVerticalSegments; }
@@ -127,16 +139,16 @@ namespace drawinglayer
bool getCloseFront() const { return mbCloseFront; }
bool getCloseBack() const { return mbCloseBack; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// 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
+ /// 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
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
index b0d7cc5c26a2..a6c68bd16da8 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
@@ -44,17 +44,28 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** SdrPolyPolygonPrimitive3D class
+
+ This 3D primitive defines a PolyPolgon in space which may have
+ Line- and FillStyles and extra 3D surface attributes. It is assumed
+ that the given 3D PolyPolgon (which may contain texture and normal
+ information) is planar in 3D.
+
+ The decomposition will include all needed 3D data for visualisation,
+ including FatLines and fill styles.
+ */
class SdrPolyPolygonPrimitive3D : public SdrPrimitive3D
{
private:
- // the polyPolygon evtl with normals and texture coordinates
+ /// the planar polyPolygon evtl with normals and texture coordinates
basegfx::B3DPolyPolygon maPolyPolygon3D;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
SdrPolyPolygonPrimitive3D(
const basegfx::B3DPolyPolygon& rPolyPolygon3D,
const basegfx::B3DHomMatrix& rTransform,
@@ -62,16 +73,16 @@ namespace drawinglayer
const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
- // data access
+ /// data access
const basegfx::B3DPolyPolygon& getPolyPolygon3D() const { return maPolyPolygon3D; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
index d2296968a000..4dd620848387 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
@@ -47,43 +47,49 @@
namespace drawinglayer
{
- /** base class for the more complicated geometric primitives, so
+ /** SdrPrimitive3D class
+
+ Base class for the more complicated geometric primitives, so
derive from buffered primitive to allow overloading of
- create3DDecomposition there
+ create3DDecomposition there.
*/
namespace primitive3d
{
class SdrPrimitive3D : public BufferedDecompositionPrimitive3D
{
private:
+ /// object surface attributes
basegfx::B3DHomMatrix maTransform;
basegfx::B2DVector maTextureSize;
attribute::SdrLineFillShadowAttribute maSdrLFSAttribute;
attribute::Sdr3DObjectAttribute maSdr3DObjectAttribute;
protected:
- // Standard implementation for primitive3D which
- // will use maTransform as range and expand by evtl. line width / 2
+ /** Standard implementation for primitive3D which
+ will use maTransform as range and expand by evtl. line width / 2
+ */
basegfx::B3DRange getStandard3DRange() const;
- // implementation for primitive3D which
- // will use given Slice3Ds and expand by evtl. line width / 2
+ /** implementation for primitive3D which
+ will use given Slice3Ds and expand by evtl. line width / 2
+ */
basegfx::B3DRange get3DRangeFromSlices(const Slice3DVector& rSlices) const;
public:
+ /// constructor
SdrPrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
- // data access
+ /// data read access
const basegfx::B3DHomMatrix& getTransform() const { return maTransform; }
const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
const attribute::SdrLineFillShadowAttribute& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
const attribute::Sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
index 3e6349df0bb9..52e646e6b4dc 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
@@ -44,17 +44,25 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** SdrSpherePrimitive3D class
+
+ This 3D primitive expands the SdrPrimitive3D to a 3D sphere definition.
+ The sphere is implicitely in unit coordinates and the given transformation
+ defines it's geometry in space.
+ */
class SdrSpherePrimitive3D : public SdrPrimitive3D
{
private:
+ /// additional geometry definitions
sal_uInt32 mnHorizontalSegments;
sal_uInt32 mnVerticalSegments;
protected:
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence create3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
public:
+ /// constructor
SdrSpherePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
@@ -63,17 +71,17 @@ namespace drawinglayer
sal_uInt32 nHorizontalSegments,
sal_uInt32 nVerticalSegments);
- // data access
+ /// data read access
sal_uInt32 getHorizontalSegments() const { return mnHorizontalSegments; }
sal_uInt32 getVerticalSegments() const { return mnVerticalSegments; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx
index d511c89a9998..cb8e9cd385d0 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/shadowprimitive3d.hxx
@@ -46,17 +46,29 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** ShadowPrimitive3D class
+
+ This 3D grouping primitive is used to define a shadow for
+ 3d geometry by embedding it. The shadow of 3D objects are
+ 2D polygons, so the shadow transformation is a 2D transformation.
+
+ If the Shadow3D flag is set, the shadow definition has to be
+ combined with the scene and camera definition to create the correct
+ projected shadow 2D-Polygons.
+ */
class ShadowPrimitive3D : public GroupPrimitive3D
{
protected:
+ /// 2D shadow definition
basegfx::B2DHomMatrix maShadowTransform;
basegfx::BColor maShadowColor;
double mfShadowTransparence;
- // bitfield
+ /// bitfield
unsigned mbShadow3D : 1;
public:
+ /// constructor
ShadowPrimitive3D(
const basegfx::B2DHomMatrix& rShadowTransform,
const basegfx::BColor& rShadowColor,
@@ -64,16 +76,16 @@ namespace drawinglayer
bool bShadow3D,
const Primitive3DSequence& rChildren);
- // get data
+ /// data read access
const basegfx::B2DHomMatrix& getShadowTransform() const { return maShadowTransform; }
const basegfx::BColor& getShadowColor() const { return maShadowColor; }
double getShadowTransparence() const { return mfShadowTransparence; }
bool getShadow3D() const { return mbShadow3D; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
index a0c18f34788e..052d42f7290e 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
@@ -47,31 +47,39 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** TexturePrimitive3D class
+
+ This 3D grouping primitive is used to define a texture for
+ 3d geometry by embedding it. It is used as bae class for
+ extended texture definitions
+ */
class TexturePrimitive3D : public GroupPrimitive3D
{
private:
+ /// texture geometry definition
basegfx::B2DVector maTextureSize;
- // bitfield
- // flag if texture shall be modulated with white interpolated color
+ /// bitfield
+ /// flag if texture shall be modulated with white interpolated color
unsigned mbModulate : 1;
- // flag if texture shall be filtered
+ /// flag if texture shall be filtered
unsigned mbFilter : 1;
public:
+ /// constructor
TexturePrimitive3D(
const Primitive3DSequence& rChildren,
const basegfx::B2DVector& rTextureSize,
bool bModulate,
bool bFilter);
- // get data
+ /// data read access
const basegfx::B2DVector& getTextureSize() const { return maTextureSize; }
bool getModulate() const { return mbModulate; }
bool getFilter() const { return mbFilter; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
};
} // end of namespace primitive3d
@@ -83,26 +91,34 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** UnifiedAlphaTexturePrimitive3D class
+
+ This 3D primitive expands TexturePrimitive3D to a unified
+ alpha (transparence) texture definition. All 3D primitives
+ embedded here will be shown with the given transparency.
+ */
class UnifiedAlphaTexturePrimitive3D : public TexturePrimitive3D
{
private:
+ /// transparency definition
double mfTransparence;
public:
+ /// constructor
UnifiedAlphaTexturePrimitive3D(
double fTransparence,
const Primitive3DSequence& rChildren);
- // get data
+ /// data read access
double getTransparence() const { return mfTransparence; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // local decomposition.
+ /// local decomposition.
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
@@ -114,12 +130,20 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** GradientTexturePrimitive3D class
+
+ This 3D primitive expands TexturePrimitive3D to a gradient texture
+ definition. All 3D primitives embedded here will be shown with the
+ defined gradient.
+ */
class GradientTexturePrimitive3D : public TexturePrimitive3D
{
private:
+ /// the gradient definition
attribute::FillGradientAttribute maGradient;
public:
+ /// constructor
GradientTexturePrimitive3D(
const attribute::FillGradientAttribute& rGradient,
const Primitive3DSequence& rChildren,
@@ -127,13 +151,13 @@ namespace drawinglayer
bool bModulate,
bool bFilter);
- // get data
+ /// data read access
const attribute::FillGradientAttribute& getGradient() const { return maGradient; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
@@ -145,12 +169,20 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** BitmapTexturePrimitive3D class
+
+ This 3D primitive expands TexturePrimitive3D to a bitmap texture
+ definition. All 3D primitives embedded here will be shown with the
+ defined bitmap (maybe tiled if defined).
+ */
class BitmapTexturePrimitive3D : public TexturePrimitive3D
{
private:
+ /// bitmap fill attribute
attribute::FillBitmapAttribute maBitmap;
public:
+ /// constructor
BitmapTexturePrimitive3D(
const attribute::FillBitmapAttribute& rBitmap,
const Primitive3DSequence& rChildren,
@@ -158,13 +190,13 @@ namespace drawinglayer
bool bModulate,
bool bFilter);
- // get data
+ /// data read access
const attribute::FillBitmapAttribute& getBitmap() const { return maBitmap; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
@@ -176,18 +208,26 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** AlphaTexturePrimitive3D class
+
+ This 3D primitive expands TexturePrimitive3D to a alpha texture
+ definition. For alpha definition, a gradient is used. The values in
+ that gradient will be interpreted as luminance Alpha-Values. All 3D
+ primitives embedded here will be shown with the defined transparence.
+ */
class AlphaTexturePrimitive3D : public GradientTexturePrimitive3D
{
public:
+ /// constructor
AlphaTexturePrimitive3D(
const attribute::FillGradientAttribute& rGradient,
const Primitive3DSequence& rChildren,
const basegfx::B2DVector& rTextureSize);
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx
index 720f28445dec..bbf2b8444969 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/transformprimitive3d.hxx
@@ -45,26 +45,37 @@ namespace drawinglayer
{
namespace primitive3d
{
+ /** TransformPrimitive3D class
+
+ This is one of the basic grouping 3D primitives and it provides
+ embedding a sequence of primitives (a geometry) into a
+ 3D transformation.
+
+ Please see the description for TransformPrimitive2D since these
+ primitives are pretty similar.
+ */
class TransformPrimitive3D : public GroupPrimitive3D
{
private:
+ // the 3D transformation to apply
basegfx::B3DHomMatrix maTransformation;
public:
+ /// constructor
TransformPrimitive3D(
const basegfx::B3DHomMatrix& rTransformation,
const Primitive3DSequence& rChildren);
- // get data
+ /// data read access
const basegfx::B3DHomMatrix& getTransformation() const { return maTransformation; }
- // compare operator
+ /// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
- // get range
+ /// get range
virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
- // provide unique ID
+ /// provide unique ID
DeclPrimitrive3DIDBlock()
};
} // end of namespace primitive3d