summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/inc/drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fillattribute.hxx130
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx42
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx121
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fillhatchattribute.hxx112
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx81
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx61
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx47
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/materialattribute3d.hxx12
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrallattribute3d.hxx66
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx215
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrattribute3d.hxx209
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx99
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx61
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrlightattribute3d.hxx96
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrlightingattribute3d.hxx99
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrlineattribute.hxx104
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrlinestartendattribute.hxx102
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrobjectattribute3d.hxx111
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrsceneattribute3d.hxx94
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/sdrshadowattribute.hxx93
-rw-r--r--drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx54
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx6
-rw-r--r--drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx6
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx95
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx8
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx20
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx3
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx79
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx78
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx6
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx4
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/sdrdecompositiontools2d.hxx85
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx21
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/transparenceprimitive2d.hxx103
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx80
-rw-r--r--drawinglayer/inc/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx91
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx38
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx1
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hiddengeometryprimitive3d.hxx81
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx80
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx11
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx8
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx2
-rw-r--r--drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx26
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx177
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx13
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx9
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx37
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx9
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/textaspolygonextractor2d.hxx8
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx56
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx23
-rw-r--r--drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx13
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx27
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx37
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx52
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx19
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx35
-rw-r--r--drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx41
70 files changed, 2201 insertions, 1318 deletions
diff --git a/drawinglayer/inc/drawinglayer/attribute/fillattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fillattribute.hxx
deleted file mode 100644
index 5e9f3ca4abe7..000000000000
--- a/drawinglayer/inc/drawinglayer/attribute/fillattribute.hxx
+++ /dev/null
@@ -1,130 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLATTRIBUTE_HXX
-
-#include <basegfx/color/bcolor.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// predefines
-class XHatch;
-
-namespace drawinglayer
-{
- namespace attribute
- {
- enum GradientStyle
- {
- GRADIENTSTYLE_LINEAR,
- GRADIENTSTYLE_AXIAL,
- GRADIENTSTYLE_RADIAL,
- GRADIENTSTYLE_ELLIPTICAL,
- GRADIENTSTYLE_SQUARE,
- GRADIENTSTYLE_RECT
- };
-
- enum HatchStyle
- {
- HATCHSTYLE_SINGLE,
- HATCHSTYLE_DOUBLE,
- HATCHSTYLE_TRIPLE
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class FillGradientAttribute
- {
- basegfx::BColor maStartColor;
- basegfx::BColor maEndColor;
- double mfBorder;
- double mfOffsetX;
- double mfOffsetY;
- double mfAngle;
- GradientStyle meStyle;
- sal_uInt16 mnSteps;
-
- public:
- FillGradientAttribute(
- GradientStyle eStyle, double fBorder, double fOffsetX, double fOffsetY, double fAngle,
- const basegfx::BColor& rStartColor, const basegfx::BColor& rEndColor, sal_uInt16 nSteps);
- bool operator==(const FillGradientAttribute& rCandidate) const;
-
- // data access
- const basegfx::BColor& getStartColor() const { return maStartColor; }
- const basegfx::BColor& getEndColor() const { return maEndColor; }
- double getBorder() const { return mfBorder; }
- double getOffsetX() const { return mfOffsetX; }
- double getOffsetY() const { return mfOffsetY; }
- double getAngle() const { return mfAngle; }
- GradientStyle getStyle() const { return meStyle; }
- sal_uInt16 getSteps() const { return mnSteps; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class FillHatchAttribute
- {
- double mfDistance;
- double mfAngle;
- basegfx::BColor maColor;
- HatchStyle meStyle;
-
- // bitfield
- unsigned mbFillBackground : 1;
-
- public:
- FillHatchAttribute(HatchStyle eStyle, double fDistance, double fAngle, const basegfx::BColor& rColor, bool bFillBackground);
- bool operator==(const FillHatchAttribute& rCandidate) const;
-
- // data access
- double getDistance() const { return mfDistance; }
- double getAngle() const { return mfAngle; }
- const basegfx::BColor& getColor() const { return maColor; }
- HatchStyle getStyle() const { return meStyle; }
- bool isFillBackground() const { return mbFillBackground; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLATTRIBUTE_HXX
-
-// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx
index 8425400daf0d..1bb8a864fa81 100644
--- a/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/fillbitmapattribute.hxx
@@ -28,18 +28,22 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLBITMAPATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLBITMAPATTRIBUTE_HXX
-#include <vcl/bitmapex.hxx>
-#include <basegfx/point/b2dpoint.hxx>
-#include <basegfx/vector/b2dvector.hxx>
+#include <sal/types.h>
//////////////////////////////////////////////////////////////////////////////
// predefines
+class BitmapEx;
+
namespace basegfx {
- class B2DRange;
- class BColor;
+ class B2DPoint;
+ class B2DVector;
}
+namespace drawinglayer { namespace attribute {
+ class ImpFillBitmapAttribute;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -48,26 +52,32 @@ namespace drawinglayer
{
class FillBitmapAttribute
{
- BitmapEx maBitmapEx;
- basegfx::B2DPoint maTopLeft;
- basegfx::B2DVector maSize;
-
- // bitfield
- unsigned mbTiling : 1;
+ private:
+ ImpFillBitmapAttribute* mpFillBitmapAttribute;
public:
+ /// constructors/assignmentoperator/destructor
FillBitmapAttribute(
const BitmapEx& rBitmapEx,
const basegfx::B2DPoint& rTopLeft,
const basegfx::B2DVector& rSize,
bool bTiling);
+ FillBitmapAttribute();
+ FillBitmapAttribute(const FillBitmapAttribute& rCandidate);
+ FillBitmapAttribute& operator=(const FillBitmapAttribute& rCandidate);
+ ~FillBitmapAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
bool operator==(const FillBitmapAttribute& rCandidate) const;
- // data access
- const BitmapEx& getBitmapEx() const { return maBitmapEx; }
- const basegfx::B2DPoint& getTopLeft() const { return maTopLeft; }
- const basegfx::B2DVector& getSize() const { return maSize; }
- bool getTiling() const { return mbTiling; }
+ // data read access
+ const BitmapEx& getBitmapEx() const;
+ const basegfx::B2DPoint& getTopLeft() const;
+ const basegfx::B2DVector& getSize() const;
+ bool getTiling() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx
new file mode 100644
index 000000000000..f7bddbfe0f89
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/fillgradientattribute.hxx
@@ -0,0 +1,121 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fillattribute.hxx,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpFillGradientAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+// declarations
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ enum GradientStyle
+ {
+ GRADIENTSTYLE_LINEAR,
+ GRADIENTSTYLE_AXIAL,
+ GRADIENTSTYLE_RADIAL,
+ GRADIENTSTYLE_ELLIPTICAL,
+ GRADIENTSTYLE_SQUARE,
+ GRADIENTSTYLE_RECT
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class FillGradientAttribute
+ {
+ private:
+ ImpFillGradientAttribute* mpFillGradientAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ FillGradientAttribute(
+ GradientStyle eStyle,
+ double fBorder,
+ double fOffsetX,
+ double fOffsetY,
+ double fAngle,
+ const basegfx::BColor& rStartColor,
+ const basegfx::BColor& rEndColor,
+ sal_uInt16 nSteps);
+ FillGradientAttribute();
+ FillGradientAttribute(const FillGradientAttribute& rCandidate);
+ FillGradientAttribute& operator=(const FillGradientAttribute& rCandidate);
+ ~FillGradientAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const FillGradientAttribute& rCandidate) const;
+
+ // data read access
+ GradientStyle getStyle() const;
+ double getBorder() const;
+ double getOffsetX() const;
+ double getOffsetY() const;
+ double getAngle() const;
+ const basegfx::BColor& getStartColor() const;
+ const basegfx::BColor& getEndColor() const;
+ sal_uInt16 getSteps() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/fillhatchattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fillhatchattribute.hxx
new file mode 100644
index 000000000000..9f147b36ef34
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/fillhatchattribute.hxx
@@ -0,0 +1,112 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: fillattribute.hxx,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpFillHatchAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+// declarations
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ enum HatchStyle
+ {
+ HATCHSTYLE_SINGLE,
+ HATCHSTYLE_DOUBLE,
+ HATCHSTYLE_TRIPLE
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class FillHatchAttribute
+ {
+ private:
+ ImpFillHatchAttribute* mpFillHatchAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ FillHatchAttribute(
+ HatchStyle eStyle,
+ double fDistance,
+ double fAngle,
+ const basegfx::BColor& rColor,
+ bool bFillBackground);
+ FillHatchAttribute();
+ FillHatchAttribute(const FillHatchAttribute& rCandidate);
+ FillHatchAttribute& operator=(const FillHatchAttribute& rCandidate);
+ ~FillHatchAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const FillHatchAttribute& rCandidate) const;
+
+ // data read access
+ HatchStyle getStyle() const;
+ double getDistance() const;
+ double getAngle() const;
+ const basegfx::BColor& getColor() const;
+ bool isFillBackground() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
index d565d8037800..6dffd80b332e 100644
--- a/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/fontattribute.hxx
@@ -28,9 +28,16 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX
-#include <sal/config.h>
#include <sal/types.h>
-#include <tools/string.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+class String;
+
+namespace drawinglayer { namespace attribute {
+ class ImpFontAttribute;
+}}
//////////////////////////////////////////////////////////////////////////////
@@ -46,22 +53,11 @@ namespace drawinglayer
class FontAttribute
{
private:
- /// core data
- String maFamilyName; // Font Family Name
- String maStyleName; // Font Style Name
- sal_uInt16 mnWeight; // Font weight
-
- /// bitfield
- unsigned mbSymbol : 1; // Symbol Font Flag
- unsigned mbVertical : 1; // Vertical Text Flag
- unsigned mbItalic : 1; // Italic Flag
- unsigned mbOutline : 1; // Outline Flag
- unsigned mbRTL : 1; // RTL Flag
- unsigned mbBiDiStrong : 1; // BiDi Flag
- // TODO: pair kerning and CJK kerning
+ ImpFontAttribute* mpFontAttribute;
public:
- /// constructor
+ /// constructors/assignmentoperator/destructor
+ /// TODO: pair kerning and CJK kerning
FontAttribute(
const String& rFamilyName,
const String& rStyleName,
@@ -71,45 +67,28 @@ namespace drawinglayer
bool bItalic = false,
bool bOutline = false,
bool bRTL = false,
- bool bBiDiStrong = false)
- : maFamilyName(rFamilyName),
- maStyleName(rStyleName),
- mnWeight(nWeight),
- mbSymbol(bSymbol),
- mbVertical(bVertical),
- mbItalic(bItalic),
- mbOutline(bOutline),
- mbRTL(bRTL),
- mbBiDiStrong(bBiDiStrong)
- {
- }
+ bool bBiDiStrong = false);
+ FontAttribute();
+ FontAttribute(const FontAttribute& rCandidate);
+ FontAttribute& operator=(const FontAttribute& rCandidate);
+ ~FontAttribute();
- FontAttribute()
- : maFamilyName(),
- maStyleName(),
- mnWeight(0),
- mbSymbol(false),
- mbVertical(false),
- mbItalic(false),
- mbOutline(false),
- mbRTL(false),
- mbBiDiStrong(false)
- {
- }
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
- /// compare operator
- bool operator==(const FontAttribute& rCompare) const;
+ // compare operator
+ bool operator==(const FontAttribute& rCandidate) const;
/// data read access
- const String& getFamilyName() const { return maFamilyName; }
- const String& getStyleName() const { return maStyleName; }
- sal_uInt16 getWeight() const { return mnWeight; }
- bool getSymbol() const { return mbSymbol; }
- bool getVertical() const { return mbVertical; }
- bool getItalic() const { return mbItalic; }
- bool getOutline() const { return mbOutline; }
- bool getRTL() const { return mbRTL; }
- bool getBiDiStrong() const { return mbBiDiStrong; }
+ const String& getFamilyName() const;
+ const String& getStyleName() const;
+ sal_uInt16 getWeight() const;
+ bool getSymbol() const;
+ bool getVertical() const;
+ bool getItalic() const;
+ bool getOutline() const;
+ bool getRTL() const;
+ bool getBiDiStrong() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx
index b541c2cf10df..4e29cf05e27f 100644
--- a/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx
@@ -28,13 +28,19 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX
-#include <basegfx/polygon/b2dlinegeometry.hxx>
-#include <basegfx/color/bcolor.hxx>
-#include <vector>
+#include <basegfx/vector/b2enums.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
+namespace basegfx {
+ class BColor;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpLineAttribute;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -44,50 +50,29 @@ namespace drawinglayer
class LineAttribute
{
private:
- basegfx::BColor maColor; // color
- double mfWidth; // absolute line width
- basegfx::B2DLineJoin meLineJoin; // type of LineJoin
+ ImpLineAttribute* mpLineAttribute;
public:
+ /// constructors/assignmentoperator/destructor
LineAttribute(
const basegfx::BColor& rColor,
double fWidth = 0.0,
- basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLINEJOIN_ROUND)
- : maColor(rColor),
- mfWidth(fWidth),
- meLineJoin(aB2DLineJoin)
- {
- }
-
- LineAttribute(const LineAttribute& rCandidate)
- {
- *this = rCandidate;
- }
-
- LineAttribute& operator=(const LineAttribute& rCandidate)
- {
- maColor = rCandidate.maColor;
- mfWidth = rCandidate.mfWidth;
- meLineJoin = rCandidate.meLineJoin;
- return *this;
- }
+ basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLINEJOIN_ROUND);
+ LineAttribute();
+ LineAttribute(const LineAttribute& rCandidate);
+ LineAttribute& operator=(const LineAttribute& rCandidate);
+ ~LineAttribute();
- ~LineAttribute()
- {
- }
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
// compare operator
- bool operator==(const LineAttribute& rCandidate) const
- {
- return (maColor == rCandidate.maColor
- && mfWidth == rCandidate.mfWidth
- && meLineJoin == rCandidate.meLineJoin);
- }
+ bool operator==(const LineAttribute& rCandidate) const;
- // data access
- const basegfx::BColor& getColor() const { return maColor; }
- double getWidth() const { return mfWidth; }
- basegfx::B2DLineJoin getLineJoin() const { return meLineJoin; }
+ // data read access
+ const basegfx::BColor& getColor() const;
+ double getWidth() const;
+ basegfx::B2DLineJoin getLineJoin() const;
};
} // end of namespace attribute
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx
index acd6f5ec4f64..9f681afc7d51 100644
--- a/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx
@@ -28,12 +28,19 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX
-#include <basegfx/polygon/b2dpolypolygon.hxx>
-#include <basegfx/numeric/ftools.hxx>
+#include <sal/types.h>
//////////////////////////////////////////////////////////////////////////////
// predefines
+namespace basegfx {
+ class B2DPolyPolygon;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpLineStartEndAttribute;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -43,35 +50,29 @@ namespace drawinglayer
class LineStartEndAttribute
{
private:
- double mfWidth; // absolute line StartEndGeometry base width
- basegfx::B2DPolyPolygon maPolyPolygon; // the StartEndGeometry PolyPolygon
-
- // bitfield
- unsigned mbCentered : 1; // use centered to ineStart/End point?
+ ImpLineStartEndAttribute* mpLineStartEndAttribute;
public:
+ /// constructors/assignmentoperator/destructor
LineStartEndAttribute(
double fWidth,
const basegfx::B2DPolyPolygon& rPolyPolygon,
- bool bCentered)
- : mfWidth(fWidth),
- maPolyPolygon(rPolyPolygon),
- mbCentered(bCentered)
- {
- }
+ bool bCentered);
+ LineStartEndAttribute();
+ LineStartEndAttribute(const LineStartEndAttribute& rCandidate);
+ LineStartEndAttribute& operator=(const LineStartEndAttribute& rCandidate);
+ ~LineStartEndAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
// compare operator
- bool operator==(const LineStartEndAttribute& rCandidate) const
- {
- return (basegfx::fTools::equal(mfWidth, rCandidate.mfWidth)
- && maPolyPolygon == rCandidate.maPolyPolygon
- && mbCentered == rCandidate.mbCentered);
- }
+ bool operator==(const LineStartEndAttribute& rCandidate) const;
- // data access
- double getWidth() const { return mfWidth; }
- const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
- bool isCentered() const { return mbCentered; }
+ // data read access
+ double getWidth() const;
+ const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const;
+ bool isCentered() const;
bool isActive() const;
};
} // end of namespace attribute
diff --git a/drawinglayer/inc/drawinglayer/attribute/materialattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/materialattribute3d.hxx
index 1d9adf2a5c9f..2bb2256ee559 100644
--- a/drawinglayer/inc/drawinglayer/attribute/materialattribute3d.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/materialattribute3d.hxx
@@ -54,7 +54,11 @@ namespace drawinglayer
public:
// constructors/destructor
- MaterialAttribute3D(const basegfx::BColor& rColor, const basegfx::BColor& rSpecular, const basegfx::BColor& rEmission, sal_uInt16 nSpecularIntensity);
+ MaterialAttribute3D(
+ const basegfx::BColor& rColor,
+ const basegfx::BColor& rSpecular,
+ const basegfx::BColor& rEmission,
+ sal_uInt16 nSpecularIntensity);
MaterialAttribute3D(const basegfx::BColor& rColor);
MaterialAttribute3D();
MaterialAttribute3D(const MaterialAttribute3D& rCandidate);
@@ -63,11 +67,13 @@ namespace drawinglayer
// assignment operator
MaterialAttribute3D& operator=(const MaterialAttribute3D& rCandidate);
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
// compare operator
bool operator==(const MaterialAttribute3D& rCandidate) const;
- bool operator!=(const MaterialAttribute3D& rCandidate) const { return !operator==(rCandidate); }
- // data access
+ // data read access
const basegfx::BColor& getColor() const;
const basegfx::BColor& getSpecular() const;
const basegfx::BColor& getEmission() const;
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrallattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrallattribute3d.hxx
index 6c23c7ca63a6..583a01915662 100644
--- a/drawinglayer/inc/drawinglayer/attribute/sdrallattribute3d.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrallattribute3d.hxx
@@ -28,57 +28,53 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRALLATTRIBUTE3D_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRALLATTRIBUTE3D_HXX
+#include <sal/types.h>
+#include <drawinglayer/attribute/sdrlineattribute.hxx>
+#include <drawinglayer/attribute/sdrfillattribute.hxx>
+#include <drawinglayer/attribute/sdrlinestartendattribute.hxx>
+#include <drawinglayer/attribute/sdrshadowattribute.hxx>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
+
//////////////////////////////////////////////////////////////////////////////
// predefines
-namespace drawinglayer { namespace attribute {
- class SdrLineAttribute;
- class SdrFillAttribute;
- class SdrLineStartEndAttribute;
- class SdrShadowAttribute;
- class FillGradientAttribute;
-}}
-
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
{
namespace attribute
{
- class SdrLineFillShadowAttribute
+ class SdrLineFillShadowAttribute3D
{
- // shadow, line, lineStartEnd, fill, transGradient and compound3D attributes
- SdrShadowAttribute* mpShadow; // shadow attributes (if used)
- SdrLineAttribute* mpLine; // line attributes (if used)
- SdrLineStartEndAttribute* mpLineStartEnd; // line start end (if used)
- SdrFillAttribute* mpFill; // fill attributes (if used)
- FillGradientAttribute* mpFillFloatTransGradient; // fill float transparence gradient (if used)
+ private:
+ const SdrLineAttribute maLine;
+ const SdrFillAttribute maFill;
+ const SdrLineStartEndAttribute maLineStartEnd;
+ const SdrShadowAttribute maShadow;
+ const FillGradientAttribute maFillFloatTransGradient;
public:
- SdrLineFillShadowAttribute(
- SdrLineAttribute* pLine = 0,
- SdrFillAttribute* pFill = 0,
- SdrLineStartEndAttribute* pLineStartEnd = 0,
- SdrShadowAttribute* pShadow = 0,
- FillGradientAttribute* pFillFloatTransGradient = 0);
- ~SdrLineFillShadowAttribute();
+ /// constructors/assignmentoperator/destructor
+ SdrLineFillShadowAttribute3D(
+ const SdrLineAttribute& rLine,
+ const SdrFillAttribute& rFill,
+ const SdrLineStartEndAttribute& rLineStartEnd,
+ const SdrShadowAttribute& rShadow,
+ const FillGradientAttribute& rFillFloatTransGradient);
+ SdrLineFillShadowAttribute3D();
- // copy constructor and assigment operator
- SdrLineFillShadowAttribute(const SdrLineFillShadowAttribute& rCandidate);
- SdrLineFillShadowAttribute& operator=(const SdrLineFillShadowAttribute& rCandidate);
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
// compare operator
- bool operator==(const SdrLineFillShadowAttribute& rCandidate) const;
-
- // bool access
- bool isVisible() const { return (mpFill || mpLine); }
+ bool operator==(const SdrLineFillShadowAttribute3D& rCandidate) const;
- // data access
- const SdrShadowAttribute* getShadow() const { return mpShadow; }
- const SdrLineAttribute* getLine() const { return mpLine; }
- const SdrLineStartEndAttribute* getLineStartEnd() const { return mpLineStartEnd; }
- const SdrFillAttribute* getFill() const { return mpFill; }
- const FillGradientAttribute* getFillFloatTransGradient() const { return mpFillFloatTransGradient; }
+ // data read access
+ const SdrLineAttribute& getLine() const { return maLine; }
+ const SdrFillAttribute& getFill() const { return maFill; }
+ const SdrLineStartEndAttribute& getLineStartEnd() const { return maLineStartEnd; }
+ const SdrShadowAttribute& getShadow() const { return maShadow; }
+ const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; }
};
} // end of namespace overlay
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx
deleted file mode 100644
index 28421e3477b1..000000000000
--- a/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx
+++ /dev/null
@@ -1,215 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE_HXX
-
-#include <basegfx/polygon/b2dlinegeometry.hxx>
-#include <basegfx/color/bcolor.hxx>
-#include <vector>
-#include <basegfx/vector/b2dvector.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-// predefines
-class SdrTextObj;
-
-namespace drawinglayer { namespace attribute {
- class SdrFillBitmapAttribute;
- class FillHatchAttribute;
- class FillGradientAttribute;
-}}
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrLineAttribute
- {
- // line definitions
- basegfx::B2DLineJoin meJoin; // B2DLINEJOIN_* defines
- double mfWidth; // 1/100th mm, 0.0==hair
- double mfTransparence; // [0.0 .. 1.0], 0.0==no transp.
- basegfx::BColor maColor; // color of line
- ::std::vector< double > maDotDashArray; // array of double which defines the dot-dash pattern
- double mfFullDotDashLen; // sum of maDotDashArray (for convenience)
-
- public:
- SdrLineAttribute(
- basegfx::B2DLineJoin eJoin, double fWidth, double fTransparence, const basegfx::BColor& rColor,
- const ::std::vector< double >& rDotDashArray, double fFullDotDashLen);
- ~SdrLineAttribute();
-
- // constructor to create a line attribute for a colored hairline
- SdrLineAttribute(const basegfx::BColor& rColor);
-
- // compare operator
- bool operator==(const SdrLineAttribute& rCandidate) const;
-
- // bool access
- bool isVisible() const { return (1.0 != mfTransparence); }
- bool isDashed() const { return (0L != maDotDashArray.size()); }
-
- // data access
- basegfx::B2DLineJoin getJoin() const { return meJoin; }
- double getWidth() const { return mfWidth; }
- double getTransparence() const { return mfTransparence; }
- const basegfx::BColor& getColor() const { return maColor; }
- const ::std::vector< double >& getDotDashArray() const { return maDotDashArray; }
- double getFullDotDashLen() const { return mfFullDotDashLen; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrLineStartEndAttribute
- {
- // line arrow definitions
- basegfx::B2DPolyPolygon maStartPolyPolygon; // start Line PolyPolygon
- basegfx::B2DPolyPolygon maEndPolyPolygon; // end Line PolyPolygon
- double mfStartWidth; // 1/100th mm
- double mfEndWidth; // 1/100th mm
-
- // bitfield
- unsigned mbStartActive : 1L; // start of Line is active
- unsigned mbEndActive : 1L; // end of Line is active
- unsigned mbStartCentered : 1L; // Line is centered on line start point
- unsigned mbEndCentered : 1L; // Line is centered on line end point
-
- public:
- SdrLineStartEndAttribute(
- const basegfx::B2DPolyPolygon& rStartPolyPolygon, const basegfx::B2DPolyPolygon& rEndPolyPolygon,
- double fStartWidth, double fEndWidth, bool bStartActive, bool bEndActive, bool bStartCentered, bool bEndCentered);
- ~SdrLineStartEndAttribute();
-
- // compare operator
- bool operator==(const SdrLineStartEndAttribute& rCandidate) const;
-
- // bool access
- bool isStartActive() const { return mbStartActive; }
- bool isEndActive() const { return mbEndActive; }
- bool isStartCentered() const { return mbStartCentered; }
- bool isEndCentered() const { return mbEndCentered; }
- bool isVisible() const { return (isStartActive() || isEndActive()); }
-
- // data access
- const basegfx::B2DPolyPolygon& getStartPolyPolygon() const { return maStartPolyPolygon; }
- const basegfx::B2DPolyPolygon& getEndPolyPolygon() const { return maEndPolyPolygon; }
- double getStartWidth() const { return mfStartWidth; }
- double getEndWidth() const { return mfEndWidth; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrShadowAttribute
- {
- // shadow definitions
- basegfx::B2DVector maOffset; // shadow offset 1/100th mm
- double mfTransparence; // [0.0 .. 1.0], 0.0==no transp.
- basegfx::BColor maColor; // color of shadow
-
- public:
- SdrShadowAttribute(
- const basegfx::B2DVector& rOffset, double fTransparence, const basegfx::BColor& rColor);
- ~SdrShadowAttribute();
-
- // compare operator
- bool operator==(const SdrShadowAttribute& rCandidate) const;
-
- // bool access
- bool isVisible() const { return (1.0 != mfTransparence); }
-
- // data access
- const basegfx::B2DVector& getOffset() const { return maOffset; }
- double getTransparence() const { return mfTransparence; }
- const basegfx::BColor& getColor() const { return maColor; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrFillAttribute
- {
- // fill definitions
- double mfTransparence; // [0.0 .. 1.0], 0.0==no transp.
- basegfx::BColor maColor; // fill color
- FillGradientAttribute* mpGradient; // fill gradient (if used)
- FillHatchAttribute* mpHatch; // fill hatch (if used)
- SdrFillBitmapAttribute* mpBitmap; // fill bitmap (if used)
-
- public:
- SdrFillAttribute(
- double fTransparence, const basegfx::BColor& rColor, FillGradientAttribute* pGradient = 0L,
- FillHatchAttribute* pHatch = 0L, SdrFillBitmapAttribute* pBitmap = 0L);
- ~SdrFillAttribute();
-
- // copy constructor and assigment operator
- SdrFillAttribute(const SdrFillAttribute& rCandidate);
- SdrFillAttribute& operator=(const SdrFillAttribute& rCandidate);
-
- // compare operator
- bool operator==(const SdrFillAttribute& rCandidate) const;
-
- // bool access
- bool isGradient() const { return (0L != mpGradient); }
- bool isHatch() const { return (0L != mpHatch); }
- bool isBitmap() const { return (0L != mpBitmap); }
- bool isColor() const { return (!mpGradient && !mpHatch && !mpBitmap); }
- bool isVisible() const { return (1.0 != mfTransparence); }
-
- // data access
- double getTransparence() const { return mfTransparence; }
- const basegfx::BColor& getColor() const { return maColor; }
- const FillGradientAttribute* getGradient() const { return mpGradient; }
- const FillHatchAttribute* getHatch() const { return mpHatch; }
- const SdrFillBitmapAttribute* getBitmap() const { return mpBitmap; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE_HXX
-
-// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrattribute3d.hxx
deleted file mode 100644
index 3d88fe52d5c1..000000000000
--- a/drawinglayer/inc/drawinglayer/attribute/sdrattribute3d.hxx
+++ /dev/null
@@ -1,209 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE3D_HXX
-#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE3D_HXX
-
-#include <basegfx/vector/b2dvector.hxx>
-#include <com/sun/star/drawing/NormalsKind.hpp>
-#include <com/sun/star/drawing/TextureProjectionMode.hpp>
-#include <com/sun/star/drawing/ProjectionMode.hpp>
-#include <com/sun/star/drawing/TextureKind2.hpp>
-#include <com/sun/star/drawing/TextureMode.hpp>
-#include <basegfx/vector/b3dvector.hxx>
-#include <com/sun/star/drawing/ShadeMode.hpp>
-#include <basegfx/color/bcolor.hxx>
-#include <drawinglayer/attribute/materialattribute3d.hxx>
-#include <vector>
-
-//////////////////////////////////////////////////////////////////////////////
-// predefines
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class Sdr3DObjectAttribute
- {
- // 3D object attribute definitions
- ::com::sun::star::drawing::NormalsKind maNormalsKind; // normals type (0..2)
- ::com::sun::star::drawing::TextureProjectionMode maTextureProjectionX; // texture projection type X (0..2)
- ::com::sun::star::drawing::TextureProjectionMode maTextureProjectionY; // texture projection type Y (0..2)
- ::com::sun::star::drawing::TextureKind2 maTextureKind; // texture kind (see uno API)
- ::com::sun::star::drawing::TextureMode maTextureMode; // texture kind (see uno API)
- MaterialAttribute3D maMaterial; // object, specular and emissive colors, SpecularIntensity
-
- // bitfield
- unsigned mbNormalsInvert : 1; // invert normals
- unsigned mbDoubleSided : 1; // surfaces are double sided
- unsigned mbShadow3D : 1; // display shadow in 3D (if on), params for that are at scene
- unsigned mbTextureFilter : 1; // filter texture to make more smooth
- unsigned mbReducedLineGeometry : 1; // use reduced line geometry (object specific)
-
- public:
- Sdr3DObjectAttribute(
- ::com::sun::star::drawing::NormalsKind aNormalsKind,
- ::com::sun::star::drawing::TextureProjectionMode aTextureProjectionX,
- ::com::sun::star::drawing::TextureProjectionMode aTextureProjectionY,
- ::com::sun::star::drawing::TextureKind2 aTextureKind,
- ::com::sun::star::drawing::TextureMode aTextureMode,
- const MaterialAttribute3D& rMaterial,
- bool bNormalsInvert,
- bool bDoubleSided,
- bool bShadow3D,
- bool bTextureFilter,
- bool bReducedLineGeometry);
-
- // compare operator
- bool operator==(const Sdr3DObjectAttribute& rCandidate) const;
-
- // data access
- ::com::sun::star::drawing::NormalsKind getNormalsKind() const { return maNormalsKind; }
- ::com::sun::star::drawing::TextureProjectionMode getTextureProjectionX() const { return maTextureProjectionX; }
- ::com::sun::star::drawing::TextureProjectionMode getTextureProjectionY() const { return maTextureProjectionY; }
- ::com::sun::star::drawing::TextureKind2 getTextureKind() const { return maTextureKind; }
- ::com::sun::star::drawing::TextureMode getTextureMode() const { return maTextureMode; }
- const MaterialAttribute3D& getMaterial() const { return maMaterial; }
- bool getNormalsInvert() const { return mbNormalsInvert; }
- bool getDoubleSided() const { return mbDoubleSided; }
- bool getShadow3D() const { return mbShadow3D; }
- bool getTextureFilter() const { return mbTextureFilter; }
- bool getReducedLineGeometry() const { return mbReducedLineGeometry; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class Sdr3DLightAttribute
- {
- // 3D light attribute definitions
- basegfx::BColor maColor;
- basegfx::B3DVector maDirection;
-
- // bitfield
- unsigned mbSpecular : 1;
-
- public:
- Sdr3DLightAttribute(
- const basegfx::BColor& rColor,
- const basegfx::B3DVector& rDirection,
- bool bSpecular);
-
- // compare operator
- bool operator==(const Sdr3DLightAttribute& rCandidate) const;
-
- // data access
- const basegfx::BColor& getColor() const { return maColor; }
- const basegfx::B3DVector& getDirection() const { return maDirection; }
- bool getSpecular() const { return mbSpecular; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrLightingAttribute
- {
- // 3D light attribute definitions
- basegfx::BColor maAmbientLight;
- ::std::vector< Sdr3DLightAttribute > maLightVector;
-
- public:
- SdrLightingAttribute(
- const basegfx::BColor& rAmbientLight,
- const ::std::vector< Sdr3DLightAttribute >& rLightVector);
-
- // compare operator
- bool operator==(const SdrLightingAttribute& rCandidate) const;
-
- // data access
- const basegfx::BColor& getAmbientLight() const { return maAmbientLight; }
- const ::std::vector< Sdr3DLightAttribute >& getLightVector() const { return maLightVector; }
-
- // color model solver
- basegfx::BColor solveColorModel(
- const basegfx::B3DVector& rNormalInEyeCoordinates,
- const basegfx::BColor& rColor, const basegfx::BColor& rSpecular,
- const basegfx::BColor& rEmission, sal_uInt16 nSpecularIntensity) const;
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace attribute
- {
- class SdrSceneAttribute
- {
- // 3D scene attribute definitions
- double mfDistance;
- double mfShadowSlant;
- ::com::sun::star::drawing::ProjectionMode maProjectionMode;
- ::com::sun::star::drawing::ShadeMode maShadeMode;
-
- // bitfield
- unsigned mbTwoSidedLighting : 1;
-
- public:
- SdrSceneAttribute(
- double fDistance,
- double fShadowSlant,
- ::com::sun::star::drawing::ProjectionMode aProjectionMode,
- ::com::sun::star::drawing::ShadeMode aShadeMode,
- bool bTwoSidedLighting);
-
- // compare operator
- bool operator==(const SdrSceneAttribute& rCandidate) const;
-
- // data access
- double getDistance() const { return mfDistance; }
- double getShadowSlant() const { return mfShadowSlant; }
- ::com::sun::star::drawing::ProjectionMode getProjectionMode() const { return maProjectionMode; }
- ::com::sun::star::drawing::ShadeMode getShadeMode() const { return maShadeMode; }
- bool getTwoSidedLighting() const { return mbTwoSidedLighting; }
- };
- } // end of namespace attribute
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRATTRIBUTE3D_HXX
-
-// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
new file mode 100644
index 000000000000..6ae2084d1d30
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrfillattribute.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrFillAttribute;
+ class FillGradientAttribute;
+ class FillHatchAttribute;
+ class SdrFillBitmapAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrFillAttribute
+ {
+ private:
+ ImpSdrFillAttribute* mpSdrFillAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrFillAttribute(
+ double fTransparence,
+ const basegfx::BColor& rColor,
+ const FillGradientAttribute& rGradient,
+ const FillHatchAttribute& rHatch,
+ const SdrFillBitmapAttribute& rBitmap);
+ SdrFillAttribute();
+ SdrFillAttribute(const SdrFillAttribute& rCandidate);
+ SdrFillAttribute& operator=(const SdrFillAttribute& rCandidate);
+ ~SdrFillAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrFillAttribute& rCandidate) const;
+
+ // data read access
+ double getTransparence() const;
+ const basegfx::BColor& getColor() const;
+ const FillGradientAttribute& getGradient() const;
+ const FillHatchAttribute& getHatch() const;
+ const SdrFillBitmapAttribute& getBitmap() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
index e18ba2a51091..10408b477317 100644
--- a/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrfillbitmapattribute.hxx
@@ -28,21 +28,23 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLBITMAPATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLBITMAPATTRIBUTE_HXX
-#include <vcl/bitmap.hxx>
-#include <basegfx/vector/b2dvector.hxx>
+#include <sal/types.h>
//////////////////////////////////////////////////////////////////////////////
// predefines
-class SfxItemSet;
-namespace drawinglayer { namespace attribute {
- class FillBitmapAttribute;
-}}
+class Bitmap;
namespace basegfx {
class B2DRange;
+ class B2DVector;
}
+namespace drawinglayer { namespace attribute {
+ class FillBitmapAttribute;
+ class ImpSdrFillBitmapAttribute;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -51,27 +53,42 @@ namespace drawinglayer
{
class SdrFillBitmapAttribute
{
- Bitmap maBitmap;
- basegfx::B2DVector maSize;
- basegfx::B2DVector maOffset;
- basegfx::B2DVector maOffsetPosition;
- basegfx::B2DVector maRectPoint;
-
- // bitfield
- unsigned mbTiling : 1;
- unsigned mbStretch : 1;
- unsigned mbLogSize : 1;
+ private:
+ ImpSdrFillBitmapAttribute* mpSdrFillBitmapAttribute;
public:
+ /// constructors/assignmentoperator/destructor
SdrFillBitmapAttribute(
- const Bitmap& rBitmap, const basegfx::B2DVector& rSize, const basegfx::B2DVector& rOffset,
- const basegfx::B2DVector& rOffsetPosition, const basegfx::B2DVector& rRectPoint,
- bool bTiling, bool bStretch, bool bLogSize);
+ const Bitmap& rBitmap,
+ const basegfx::B2DVector& rSize,
+ const basegfx::B2DVector& rOffset,
+ const basegfx::B2DVector& rOffsetPosition,
+ const basegfx::B2DVector& rRectPoint,
+ bool bTiling,
+ bool bStretch,
+ bool bLogSize);
+ SdrFillBitmapAttribute();
+ SdrFillBitmapAttribute(const SdrFillBitmapAttribute& rCandidate);
+ SdrFillBitmapAttribute& operator=(const SdrFillBitmapAttribute& rCandidate);
+ ~SdrFillBitmapAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
bool operator==(const SdrFillBitmapAttribute& rCandidate) const;
- // data access
- const Bitmap& getBitmap() const { return maBitmap; }
- bool getTiling() const { return mbTiling; }
+ // data read access
+ const Bitmap& getBitmap() const;
+ const basegfx::B2DVector& getSize() const;
+ const basegfx::B2DVector& getOffset() const;
+ const basegfx::B2DVector& getOffsetPosition() const;
+ const basegfx::B2DVector& getRectPoint() const;
+ bool getTiling() const;
+ bool getStretch() const;
+ bool getLogSize() const;
+
+ // FillBitmapAttribute generator
FillBitmapAttribute getFillBitmapAttribute(const basegfx::B2DRange& rRange) const;
};
} // end of namespace attribute
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrlightattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrlightattribute3d.hxx
new file mode 100644
index 000000000000..aad8c6ff62ec
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrlightattribute3d.hxx
@@ -0,0 +1,96 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute3d.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTATTRIBUTE3D_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTATTRIBUTE3D_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+ class B3DVector;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdr3DLightAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class Sdr3DLightAttribute
+ {
+ private:
+ ImpSdr3DLightAttribute* mpSdr3DLightAttribute;
+
+ public:
+ // constructors/destructor
+ Sdr3DLightAttribute(
+ const basegfx::BColor& rColor,
+ const basegfx::B3DVector& rDirection,
+ bool bSpecular);
+ Sdr3DLightAttribute(const basegfx::BColor& rColor);
+ Sdr3DLightAttribute();
+ Sdr3DLightAttribute(const Sdr3DLightAttribute& rCandidate);
+ ~Sdr3DLightAttribute();
+
+ // assignment operator
+ Sdr3DLightAttribute& operator=(const Sdr3DLightAttribute& rCandidate);
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const Sdr3DLightAttribute& rCandidate) const;
+
+ // data read access
+ const basegfx::BColor& getColor() const;
+ const basegfx::B3DVector& getDirection() const;
+ bool getSpecular() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTATTRIBUTE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrlightingattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrlightingattribute3d.hxx
new file mode 100644
index 000000000000..b4c84d7cc1b0
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrlightingattribute3d.hxx
@@ -0,0 +1,99 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute3d.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTINGATTRIBUTE3D_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTINGATTRIBUTE3D_HXX
+
+#include <sal/types.h>
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+ class B3DVector;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrLightingAttribute;
+ class Sdr3DLightAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrLightingAttribute
+ {
+ private:
+ ImpSdrLightingAttribute* mpSdrLightingAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrLightingAttribute(
+ const basegfx::BColor& rAmbientLight,
+ const ::std::vector< Sdr3DLightAttribute >& rLightVector);
+ SdrLightingAttribute();
+ SdrLightingAttribute(const SdrLightingAttribute& rCandidate);
+ SdrLightingAttribute& operator=(const SdrLightingAttribute& rCandidate);
+ ~SdrLightingAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrLightingAttribute& rCandidate) const;
+
+ // data read access
+ const basegfx::BColor& getAmbientLight() const;
+ const ::std::vector< Sdr3DLightAttribute >& getLightVector() const;
+
+ // color model solver
+ basegfx::BColor solveColorModel(
+ const basegfx::B3DVector& rNormalInEyeCoordinates,
+ const basegfx::BColor& rColor, const basegfx::BColor& rSpecular,
+ const basegfx::BColor& rEmission, sal_uInt16 nSpecularIntensity) const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTINGATTRIBUTE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrlineattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrlineattribute.hxx
new file mode 100644
index 000000000000..5df511995e9f
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrlineattribute.hxx
@@ -0,0 +1,104 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX
+
+#include <sal/types.h>
+#include <basegfx/vector/b2enums.hxx>
+#include <vector>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrLineAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrLineAttribute
+ {
+ private:
+ ImpSdrLineAttribute* mpSdrLineAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrLineAttribute(
+ basegfx::B2DLineJoin eJoin,
+ double fWidth,
+ double fTransparence,
+ const basegfx::BColor& rColor,
+ const ::std::vector< double >& rDotDashArray,
+ double fFullDotDashLen);
+ SdrLineAttribute(const basegfx::BColor& rColor);
+ SdrLineAttribute();
+ SdrLineAttribute(const SdrLineAttribute& rCandidate);
+ SdrLineAttribute& operator=(const SdrLineAttribute& rCandidate);
+ ~SdrLineAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrLineAttribute& rCandidate) const;
+
+ // data access
+ basegfx::B2DLineJoin getJoin() const;
+ double getWidth() const;
+ double getTransparence() const;
+ const basegfx::BColor& getColor() const;
+ const ::std::vector< double >& getDotDashArray() const;
+ double getFullDotDashLen() const;
+
+ // bool access
+ bool isDashed() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrlinestartendattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrlinestartendattribute.hxx
new file mode 100644
index 000000000000..76bd836ac770
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrlinestartendattribute.hxx
@@ -0,0 +1,102 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINESTARTENDATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINESTARTENDATTRIBUTE_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class B2DPolyPolygon;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrLineStartEndAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrLineStartEndAttribute
+ {
+ private:
+ ImpSdrLineStartEndAttribute* mpSdrLineStartEndAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrLineStartEndAttribute(
+ const basegfx::B2DPolyPolygon& rStartPolyPolygon,
+ const basegfx::B2DPolyPolygon& rEndPolyPolygon,
+ double fStartWidth,
+ double fEndWidth,
+ bool bStartActive,
+ bool bEndActive,
+ bool bStartCentered,
+ bool bEndCentered);
+ SdrLineStartEndAttribute();
+ SdrLineStartEndAttribute(const SdrLineStartEndAttribute& rCandidate);
+ SdrLineStartEndAttribute& operator=(const SdrLineStartEndAttribute& rCandidate);
+ ~SdrLineStartEndAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrLineStartEndAttribute& rCandidate) const;
+
+ // data read access
+ const basegfx::B2DPolyPolygon& getStartPolyPolygon() const;
+ const basegfx::B2DPolyPolygon& getEndPolyPolygon() const;
+ double getStartWidth() const;
+ double getEndWidth() const;
+ bool isStartActive() const;
+ bool isEndActive() const;
+ bool isStartCentered() const;
+ bool isEndCentered() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINESTARTENDATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrobjectattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrobjectattribute3d.hxx
new file mode 100644
index 000000000000..d5ee84e8cfec
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrobjectattribute3d.hxx
@@ -0,0 +1,111 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute3d.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDROBJECTATTRIBUTE3D_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDROBJECTATTRIBUTE3D_HXX
+
+#include <sal/types.h>
+#include <com/sun/star/drawing/NormalsKind.hpp>
+#include <com/sun/star/drawing/TextureProjectionMode.hpp>
+#include <com/sun/star/drawing/TextureKind2.hpp>
+#include <com/sun/star/drawing/TextureMode.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdr3DObjectAttribute;
+ class MaterialAttribute3D;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class Sdr3DObjectAttribute
+ {
+ private:
+ ImpSdr3DObjectAttribute* mpSdr3DObjectAttribute;
+
+ public:
+ // constructors/destructor
+ Sdr3DObjectAttribute(
+ ::com::sun::star::drawing::NormalsKind aNormalsKind,
+ ::com::sun::star::drawing::TextureProjectionMode aTextureProjectionX,
+ ::com::sun::star::drawing::TextureProjectionMode aTextureProjectionY,
+ ::com::sun::star::drawing::TextureKind2 aTextureKind,
+ ::com::sun::star::drawing::TextureMode aTextureMode,
+ const MaterialAttribute3D& rMaterial,
+ bool bNormalsInvert,
+ bool bDoubleSided,
+ bool bShadow3D,
+ bool bTextureFilter,
+ bool bReducedLineGeometry);
+ Sdr3DObjectAttribute();
+ Sdr3DObjectAttribute(const Sdr3DObjectAttribute& rCandidate);
+ ~Sdr3DObjectAttribute();
+
+ // assignment operator
+ Sdr3DObjectAttribute& operator=(const Sdr3DObjectAttribute& rCandidate);
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const Sdr3DObjectAttribute& rCandidate) const;
+
+ // data read access
+ ::com::sun::star::drawing::NormalsKind getNormalsKind() const;
+ ::com::sun::star::drawing::TextureProjectionMode getTextureProjectionX() const;
+ ::com::sun::star::drawing::TextureProjectionMode getTextureProjectionY() const;
+ ::com::sun::star::drawing::TextureKind2 getTextureKind() const;
+ ::com::sun::star::drawing::TextureMode getTextureMode() const;
+ const MaterialAttribute3D& getMaterial() const;
+ bool getNormalsInvert() const;
+ bool getDoubleSided() const;
+ bool getShadow3D() const;
+ bool getTextureFilter() const;
+ bool getReducedLineGeometry() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDROBJECTATTRIBUTE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrsceneattribute3d.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrsceneattribute3d.hxx
new file mode 100644
index 000000000000..7b25b6c48666
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrsceneattribute3d.hxx
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute3d.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX
+
+#include <sal/types.h>
+#include <com/sun/star/drawing/ProjectionMode.hpp>
+#include <com/sun/star/drawing/ShadeMode.hpp>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrSceneAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrSceneAttribute
+ {
+ private:
+ ImpSdrSceneAttribute* mpSdrSceneAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrSceneAttribute(
+ double fDistance,
+ double fShadowSlant,
+ ::com::sun::star::drawing::ProjectionMode aProjectionMode,
+ ::com::sun::star::drawing::ShadeMode aShadeMode,
+ bool bTwoSidedLighting);
+ SdrSceneAttribute();
+ SdrSceneAttribute(const SdrSceneAttribute& rCandidate);
+ SdrSceneAttribute& operator=(const SdrSceneAttribute& rCandidate);
+ ~SdrSceneAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrSceneAttribute& rCandidate) const;
+
+ // data read access
+ double getDistance() const;
+ double getShadowSlant() const;
+ ::com::sun::star::drawing::ProjectionMode getProjectionMode() const;
+ ::com::sun::star::drawing::ShadeMode getShadeMode() const;
+ bool getTwoSidedLighting() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrshadowattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrshadowattribute.hxx
new file mode 100644
index 000000000000..72bdcd2af2c2
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/attribute/sdrshadowattribute.hxx
@@ -0,0 +1,93 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrattribute.hxx,v $
+ *
+ * $Revision: 1.4 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX
+#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX
+
+#include <sal/types.h>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class BColor;
+ class B2DVector;
+}
+
+namespace drawinglayer { namespace attribute {
+ class ImpSdrShadowAttribute;
+}}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace attribute
+ {
+ class SdrShadowAttribute
+ {
+ private:
+ ImpSdrShadowAttribute* mpSdrShadowAttribute;
+
+ public:
+ /// constructors/assignmentoperator/destructor
+ SdrShadowAttribute(
+ const basegfx::B2DVector& rOffset,
+ double fTransparence,
+ const basegfx::BColor& rColor);
+ SdrShadowAttribute();
+ SdrShadowAttribute(const SdrShadowAttribute& rCandidate);
+ SdrShadowAttribute& operator=(const SdrShadowAttribute& rCandidate);
+ ~SdrShadowAttribute();
+
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
+ // compare operator
+ bool operator==(const SdrShadowAttribute& rCandidate) const;
+
+ // data access
+ const basegfx::B2DVector& getOffset() const;
+ double getTransparence() const;
+ const basegfx::BColor& getColor() const;
+ };
+ } // end of namespace attribute
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx
index 5b38e57a2432..0a8213c9bcf2 100644
--- a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx
+++ b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx
@@ -28,13 +28,16 @@
#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX
-#include <basegfx/polygon/b2dlinegeometry.hxx>
-#include <basegfx/color/bcolor.hxx>
+#include <sal/types.h>
#include <vector>
//////////////////////////////////////////////////////////////////////////////
// predefines
+namespace drawinglayer { namespace attribute {
+ class ImpStrokeAttribute;
+}}
+
//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
@@ -44,49 +47,26 @@ namespace drawinglayer
class StrokeAttribute
{
private:
- ::std::vector< double > maDotDashArray; // array of double which defines the dot-dash pattern
- double mfFullDotDashLen; // sum of maDotDashArray (for convenience)
+ ImpStrokeAttribute* mpStrokeAttribute;
public:
+ /// constructors/assignmentoperator/destructor
StrokeAttribute(
const ::std::vector< double >& rDotDashArray,
- double fFullDotDashLen = 0.0)
- : maDotDashArray(rDotDashArray),
- mfFullDotDashLen(fFullDotDashLen)
- {
- }
-
- StrokeAttribute()
- : maDotDashArray(),
- mfFullDotDashLen(0.0)
- {
- }
-
- StrokeAttribute(const StrokeAttribute& rCandidate)
- {
- *this = rCandidate;
- }
-
- StrokeAttribute& operator=(const StrokeAttribute& rCandidate)
- {
- maDotDashArray = rCandidate.maDotDashArray;
- mfFullDotDashLen = rCandidate.mfFullDotDashLen;
- return *this;
- }
+ double fFullDotDashLen = 0.0);
+ StrokeAttribute();
+ StrokeAttribute(const StrokeAttribute& rCandidate);
+ StrokeAttribute& operator=(const StrokeAttribute& rCandidate);
+ ~StrokeAttribute();
- ~StrokeAttribute()
- {
- }
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
// compare operator
- bool operator==(const StrokeAttribute& rCandidate) const
- {
- return (mfFullDotDashLen == rCandidate.mfFullDotDashLen
- && maDotDashArray == rCandidate.maDotDashArray);
- }
+ bool operator==(const StrokeAttribute& rCandidate) const;
- // data access
- const ::std::vector< double >& getDotDashArray() const { return maDotDashArray; }
+ // data read access
+ const ::std::vector< double >& getDotDashArray() const;
double getFullDotDashLen() const;
};
} // end of namespace attribute
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
index 45df570a108c..dd3bce88f25f 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation2d.hxx
@@ -114,12 +114,18 @@ namespace drawinglayer
*/
ViewInformation2D(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
+ /// default (empty) constructor
+ ViewInformation2D();
+
/// copy constructor
ViewInformation2D(const ViewInformation2D& rCandidate);
/// destructor
~ViewInformation2D();
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
/// assignment operator
ViewInformation2D& operator=(const ViewInformation2D& rCandidate);
diff --git a/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx b/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
index c09e89997761..5b37c5a2fe50 100644
--- a/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
+++ b/drawinglayer/inc/drawinglayer/geometry/viewinformation3d.hxx
@@ -119,12 +119,18 @@ namespace drawinglayer
*/
ViewInformation3D(const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rViewParameters);
+ /// default (empty) constructor
+ ViewInformation3D();
+
/// copy constructor
ViewInformation3D(const ViewInformation3D& rCandidate);
/// destructor
~ViewInformation3D();
+ // checks if the incarnation is default constructed
+ bool isDefault() const;
+
/// assignment operator
ViewInformation3D& operator=(const ViewInformation3D& rCandidate);
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx
deleted file mode 100644
index ca2be3acfd66..000000000000
--- a/drawinglayer/inc/drawinglayer/primitive2d/alphaprimitive2d.hxx
+++ /dev/null
@@ -1,95 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_ALPHAPRIMITIVE2D_HXX
-#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_ALPHAPRIMITIVE2D_HXX
-
-#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace primitive2d
- {
- /** AlphaPrimitive2D class
-
- This is the basic primitive for applying freely defined transparence
- to freely defined content. The basic idea is to associate a content
- which is defined as a sequence of primitives and hold as child content
- in the GroupPrimitive2D with an alpha channel also defined as a sequence
- of primitives and hold in the Alpha member.
-
- 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.
-
- 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
- {
- private:
- /// The Alpha-Mask who's RGB-Values are interpreted as Luminance
- Primitive2DSequence maAlpha;
-
- public:
- /** 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);
-
- /// data read access
- const Primitive2DSequence& getAlpha() const { return maAlpha; }
-
- /// compare operator
- virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
- /// provide unique ID
- DeclPrimitrive2DIDBlock()
- };
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_ALPHAPRIMITIVE2D_HXX
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
index 6b10badae989..8ef63d012780 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -102,14 +102,16 @@ namespace drawinglayer
Current Basic 2D Primitives are:
- - BitmapPrimitive2D (bitmap data, evtl. with alpha)
- - MetafilePrimitive2D (VCL Metafile, currently no decomposition, but planned, so may vanish)
+ - BitmapPrimitive2D (bitmap data, evtl. with transparence)
- PointArrayPrimitive2D (single points)
- PolygonHairlinePrimitive2D (hairline curves/polygons)
- PolyPolygonColorPrimitive2D (colored polygons)
+ UPDATE: MetafilePrimitive2D (VCL Metafile) is taken off this list since
+ it is implemented with the integration of CWS aw078 into DV300m69.
+
All other implemented primitives have a defined decomposition and can thus be
- decomposed downt to this small set.
+ decomposed down to this small set.
A renderer implementing support for this minimal set of primitives can completely
render primitive-based visualisations. Of course, he also has to take states into account
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index fb4463977a01..7872ad825496 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -40,7 +40,7 @@
//////////////////////////////////////////////////////////////////////////////
// local primitives
-#define PRIMITIVE2D_ID_ALPHAPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 0)
+#define PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 0)
#define PRIMITIVE2D_ID_ANIMATEDSWITCHPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 1)
#define PRIMITIVE2D_ID_ANIMATEDBLINKPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 2)
#define PRIMITIVE2D_ID_ANIMATEDINTERPOLATEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 3)
@@ -75,7 +75,7 @@
#define PRIMITIVE2D_ID_TEXTSIMPLEPORTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 32)
#define PRIMITIVE2D_ID_TEXTDECORATEDPORTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 33)
#define PRIMITIVE2D_ID_TRANSFORMPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 34)
-#define PRIMITIVE2D_ID_UNIFIEDALPHAPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 35)
+#define PRIMITIVE2D_ID_UNIFIEDTRANSPARENCEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 35)
#define PRIMITIVE2D_ID_POINTARRAYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 36)
#define PRIMITIVE2D_ID_TEXTHIERARCHYFIELDPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 37)
#define PRIMITIVE2D_ID_TEXTHIERARCHYLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 38)
@@ -93,14 +93,14 @@
#define PRIMITIVE2D_ID_STRUCTURETAGRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 50)
#define PRIMITIVE2D_ID_BORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 51)
#define PRIMITIVE2D_ID_POLYPOLYGONMARKERPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 52)
-#define PRIMITIVE2D_ID_HITTESTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 53)
-#define PRIMITIVE2D_ID_INVERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 54)
-#define PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 55)
-#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 56)
-#define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57)
-#define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58)
-#define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59)
-#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60)
+#define PRIMITIVE2D_ID_INVERTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 53)
+#define PRIMITIVE2D_ID_DISCRETEBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 54)
+#define PRIMITIVE2D_ID_WALLPAPERBITMAPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 55)
+#define PRIMITIVE2D_ID_TEXTLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 56)
+#define PRIMITIVE2D_ID_TEXTCHARACTERSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 57)
+#define PRIMITIVE2D_ID_TEXTGEOMETRYSTRIKEOUTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 58)
+#define PRIMITIVE2D_ID_EPSPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 59)
+#define PRIMITIVE2D_ID_HIDDENGEOMETRYPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 60)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
index a75f9861823c..868c5014cfde 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillgradientprimitive2d.hxx
@@ -29,7 +29,7 @@
#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_FILLGRADIENTPRIMITIVE2D_HXX
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <drawinglayer/attribute/fillattribute.hxx>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
// predefines
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
index 18d7995c9263..8b09540933ed 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/fillhatchprimitive2d.hxx
@@ -29,7 +29,8 @@
#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_FILLHATCHPRIMITIVE2D_HXX
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <drawinglayer/attribute/fillattribute.hxx>
+#include <drawinglayer/attribute/fillhatchattribute.hxx>
+#include <basegfx/color/bcolor.hxx>
//////////////////////////////////////////////////////////////////////////////
// FillHatchPrimitive2D class
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
index 90fed88725cc..f8deb0903deb 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/gridprimitive2d.hxx
@@ -66,7 +66,7 @@ namespace drawinglayer
/// Grid color for single-pixel grid points
basegfx::BColor maBColor;
- /// The Bitmap (with alpha) for grid cross points
+ /// The Bitmap (with transparence) for grid cross points
BitmapEx maCrossMarker;
/** the last used object to view transformtion and the last Viewport,
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
index d529b363c9fa..0e95e7d15f2f 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/groupprimitive2d.hxx
@@ -63,7 +63,7 @@ namespace drawinglayer
Current Basic 2D StatePrimitives are:
- - AlphaPrimitive2D (objects with freely defined transparence)
+ - TransparencePrimitive2D (objects with freely defined transparence)
- InvertPrimitive2D (for XOR)
- MaskPrimitive2D (for masking)
- ModifiedColorPrimitive2D (for a stack of color modifications)
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
new file mode 100644
index 000000000000..08ddd8237688
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/hiddengeometryprimitive2d.hxx
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hittestprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1.2.1 $
+ *
+ * last change: $Author: aw $ $Date: 2008/09/24 14:27:39 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+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.
+ class HiddenGeometryPrimitive2D : public GroupPrimitive2D
+ {
+ public:
+ HiddenGeometryPrimitive2D(const Primitive2DSequence& rChildren);
+
+ // despite returning an empty decomposition since it's no visualisation data,
+ // range calculation is intended to use hidden 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
+ virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ // provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HIDDENGEOMETRYPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx
deleted file mode 100644
index 6561457b2ff8..000000000000
--- a/drawinglayer/inc/drawinglayer/primitive2d/hittestprimitive2d.hxx
+++ /dev/null
@@ -1,78 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HITTESTPRIMITIVE2D_HXX
-#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HITTESTPRIMITIVE2D_HXX
-
-#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace primitive2d
- {
- /** 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
- */
- virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
-
- /** local decomposition. Implementation will return empty Primitive2DSequence
- since this is no visualisation data
- */
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
-
- /// provide unique ID
- DeclPrimitrive2DIDBlock()
- };
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_HITTESTPRIMITIVE2D_HXX
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
index ef8d86ad1b09..b531d5a66f3d 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/markerarrayprimitive2d.hxx
@@ -47,7 +47,7 @@ namespace drawinglayer
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
+ (with transparence) 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.
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
index 21f634fd0f5a..07ba73fd51f1 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/metafileprimitive2d.hxx
@@ -39,7 +39,7 @@ namespace drawinglayer
{
namespace primitive2d
{
- /** MediaPrimitive2D class
+ /** MetafilePrimitive2D class
This is the MetaFile representing primitive. It's geometry is defined
by MetaFileTransform. The content (defined by MetaFile) will be scaled
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
index a761eaa09d49..80e281ede05c 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx
@@ -33,6 +33,8 @@
#include <drawinglayer/attribute/strokeattribute.hxx>
#include <drawinglayer/attribute/linestartendattribute.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/polygon/b2dpolygon.hxx>
+#include <basegfx/color/bcolor.hxx>
//////////////////////////////////////////////////////////////////////////////
// PolygonHairlinePrimitive2D class
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index eaa2e37fea92..18743937b6bc 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -29,12 +29,14 @@
#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_POLYPOLYGONPRIMITIVE2D_HXX
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
-#include <drawinglayer/attribute/fillattribute.hxx>
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
#include <drawinglayer/attribute/lineattribute.hxx>
#include <drawinglayer/attribute/strokeattribute.hxx>
#include <drawinglayer/attribute/linestartendattribute.hxx>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
+#include <drawinglayer/attribute/fillhatchattribute.hxx>
+#include <basegfx/color/bcolor.hxx>
//////////////////////////////////////////////////////////////////////////////
// PolyPolygonHairlinePrimitive2D class
@@ -401,7 +403,7 @@ namespace drawinglayer
/** PolyPolygonBitmapPrimitive2D class
This primitive defines a PolyPolygon filled with bitmap data
- (including alpha). The decomosition will create a MaskPrimitive2D
+ (including transparence). The decomosition will create a MaskPrimitive2D
containing a FillBitmapPrimitive2D.
*/
class PolyPolygonBitmapPrimitive2D : public BufferedDecompositionPrimitive2D
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
index 2f836aaf52cf..4c95972ca67d 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sceneprimitive2d.hxx
@@ -30,10 +30,12 @@
#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
#include <drawinglayer/primitive3d/baseprimitive3d.hxx>
-#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <drawinglayer/geometry/viewinformation3d.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
#include <vcl/bitmapex.hxx>
+#include <drawinglayer/attribute/sdrsceneattribute3d.hxx>
+#include <drawinglayer/attribute/sdrlightingattribute3d.hxx>
+#include <drawinglayer/attribute/sdrlightattribute3d.hxx>
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/sdrdecompositiontools2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/sdrdecompositiontools2d.hxx
new file mode 100644
index 000000000000..e27a3b2b7725
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/sdrdecompositiontools2d.hxx
@@ -0,0 +1,85 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: sdrdecompositiontools3d.hxx,v $
+ *
+ * $Revision: 1.5 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:18 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS2D_HXX
+
+#include <drawinglayer/primitive2d/baseprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+// predefines
+
+namespace basegfx {
+ class B2DPolyPolygon;
+ class B2DHomMatrix;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ // helpers to create HitTestPrimitives Line
+ Primitive2DReference createHiddenGeometryPrimitives2D(
+ bool bFilled,
+ const basegfx::B2DHomMatrix& rMatrix);
+
+ Primitive2DReference createHiddenGeometryPrimitives2D(
+ bool bFilled,
+ const basegfx::B2DPolyPolygon& rPolygon);
+
+ Primitive2DReference createHiddenGeometryPrimitives2D(
+ bool bFilled,
+ const basegfx::B2DRange& rRange);
+
+ Primitive2DReference createHiddenGeometryPrimitives2D(
+ bool bFilled,
+ const basegfx::B2DRange& rRange,
+ const basegfx::B2DHomMatrix& rMatrix);
+
+ Primitive2DReference createHiddenGeometryPrimitives2D(
+ bool bFilled,
+ const basegfx::B2DPolyPolygon& rPolygon,
+ const basegfx::B2DHomMatrix& rMatrix);
+
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_SDRDECOMPOSITIONTOOLS2D_HXX
+
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
index 86093e74abcb..3325e25dc913 100644
--- a/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive2d/textlayoutdevice.hxx
@@ -93,20 +93,20 @@ namespace drawinglayer
double getTextWidth(
const String& rText,
- xub_StrLen nIndex,
- xub_StrLen nLength) const;
+ sal_uInt32 nIndex,
+ sal_uInt32 nLength) const;
bool getTextOutlines(
basegfx::B2DPolyPolygonVector&,
const String& rText,
- xub_StrLen nIndex,
- xub_StrLen nLength,
- const ::std::vector< double >& rDXArray);
+ sal_uInt32 nIndex,
+ sal_uInt32 nLength,
+ const ::std::vector< double >& rDXArray) const;
basegfx::B2DRange getTextBoundRect(
const String& rText,
- xub_StrLen nIndex,
- xub_StrLen nLength) const;
+ sal_uInt32 nIndex,
+ sal_uInt32 nLength) const;
double getFontAscent() const;
double getFontDescent() const;
@@ -115,7 +115,12 @@ namespace drawinglayer
const Rectangle& rRectangle,
const String& rText,
sal_uInt16 nStyle,
- GDIMetaFile& rGDIMetaFile);
+ GDIMetaFile& rGDIMetaFile) const;
+
+ ::std::vector< double > getTextArray(
+ const String& rText,
+ sal_uInt32 nIndex,
+ sal_uInt32 nLength) const;
};
} // end of namespace primitive2d
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/transparenceprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/transparenceprimitive2d.hxx
new file mode 100644
index 000000000000..85032d0bd202
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/transparenceprimitive2d.hxx
@@ -0,0 +1,103 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: alphaprimitive2d.hxx,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:16 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSPARENCEPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSPARENCEPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ /** TransparencePrimitive2D class
+
+ This is the basic primitive for applying freely defined transparence
+ to freely defined content. The basic idea is to associate a content
+ which is defined as a sequence of primitives and hold as child content
+ in the GroupPrimitive2D with a transparence channel also defined as a sequence
+ of primitives and hold in the transparence member.
+
+ The basic definition is to use the transparence content as transparence-Mask by
+ interpreting the transparence-content not as RGB, but as Luminance transparence mask
+ 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 transparent one. The transparent one should/will be clipped
+ accordingly.
+ */
+ class TransparencePrimitive2D : public GroupPrimitive2D
+ {
+ private:
+ /// The transparence-Mask who's RGB-Values are interpreted as Luminance
+ Primitive2DSequence maTransparence;
+
+ public:
+ /** constructor
+
+ @param rChildren
+ The content which is defined to have a transparency. The
+ range of this primitive is defined by this content
+
+ @param rTransparence
+ The definition of the Transparence-channel for this primitive. It
+ will be interpreted as mask by interpreting as gray values
+ using the common RGB_to_luminance definitions
+ */
+ TransparencePrimitive2D(
+ const Primitive2DSequence& rChildren,
+ const Primitive2DSequence& rTransparence);
+
+ /// data read access
+ const Primitive2DSequence& getTransparence() const { return maTransparence; }
+
+ /// compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ /// provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_TRANSPARENCEPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx
deleted file mode 100644
index 7b1daf1e0bc1..000000000000
--- a/drawinglayer/inc/drawinglayer/primitive2d/unifiedalphaprimitive2d.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDALPHAPRIMITIVE2D_HXX
-#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDALPHAPRIMITIVE2D_HXX
-
-#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-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:
- /// the unified alpha transparence
- double mfAlpha;
-
- public:
- /// constructor
- UnifiedAlphaPrimitive2D(
- const Primitive2DSequence& rChildren,
- double fAlpha);
-
- /// data read access
- double getAlpha() const { return mfAlpha; }
-
- /// compare operator
- virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
-
- /// create decomposition
- virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
-
- /// provide unique ID
- DeclPrimitrive2DIDBlock()
- };
- } // end of namespace primitive2d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDALPHAPRIMITIVE2D_HXX
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
new file mode 100644
index 000000000000..52f3747ddba2
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive2d/unifiedtransparenceprimitive2d.hxx
@@ -0,0 +1,91 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: UnifiedTransparencePrimitive2D.hxx,v $
+ *
+ * $Revision: 1.3 $
+ *
+ * last change: $Author: aw $ $Date: 2008-05-27 14:11:17 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
+
+#include <drawinglayer/primitive2d/groupprimitive2d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ /** UnifiedTransparencePrimitive2D 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 UnifiedTransparencePrimitive2D : public GroupPrimitive2D
+ {
+ private:
+ /// the unified transparence
+ double mfTransparence;
+
+ public:
+ /// constructor
+ UnifiedTransparencePrimitive2D(
+ const Primitive2DSequence& rChildren,
+ double fTransparence);
+
+ /// data read access
+ double getTransparence() const { return mfTransparence; }
+
+ /// compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ /// own getB2DRange implementation to include transparent geometries to BoundRect calculations
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+ /// create decomposition
+ virtual Primitive2DSequence get2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ /// provide unique ID
+ DeclPrimitrive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_UNIFIEDTRANSPARENCEPRIMITIVE2D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
index 151f2d5ac7ca..71db55657b3b 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/drawinglayer_primitivetypes3d.hxx
@@ -37,25 +37,25 @@
//////////////////////////////////////////////////////////////////////////////
// local primitives
-#define PRIMITIVE3D_ID_GROUPPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 0)
-#define PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 1)
-#define PRIMITIVE3D_ID_MODIFIEDCOLORPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 2)
-#define PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 3)
-#define PRIMITIVE3D_ID_POLYGONSTROKEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 4)
-#define PRIMITIVE3D_ID_POLYGONTUBEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 5)
-#define PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 6)
-#define PRIMITIVE3D_ID_SDRCUBEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 7)
-#define PRIMITIVE3D_ID_SDREXTRUDEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 8)
-#define PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 9)
-#define PRIMITIVE3D_ID_SDRPOLYPOLYGONPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 10)
-#define PRIMITIVE3D_ID_SDRSPHEREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 11)
-#define PRIMITIVE3D_ID_SHADOWPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 12)
-#define PRIMITIVE3D_ID_UNIFIEDALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 13)
-#define PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 14)
-#define PRIMITIVE3D_ID_BITMAPTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 15)
-#define PRIMITIVE3D_ID_ALPHATEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 16)
-#define PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 17)
-#define PRIMITIVE3D_ID_HITTESTPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 18)
+#define PRIMITIVE3D_ID_GROUPPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 0)
+#define PRIMITIVE3D_ID_HATCHTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 1)
+#define PRIMITIVE3D_ID_MODIFIEDCOLORPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 2)
+#define PRIMITIVE3D_ID_POLYGONHAIRLINEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 3)
+#define PRIMITIVE3D_ID_POLYGONSTROKEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 4)
+#define PRIMITIVE3D_ID_POLYGONTUBEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 5)
+#define PRIMITIVE3D_ID_POLYPOLYGONMATERIALPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 6)
+#define PRIMITIVE3D_ID_SDRCUBEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 7)
+#define PRIMITIVE3D_ID_SDREXTRUDEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 8)
+#define PRIMITIVE3D_ID_SDRLATHEPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 9)
+#define PRIMITIVE3D_ID_SDRPOLYPOLYGONPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 10)
+#define PRIMITIVE3D_ID_SDRSPHEREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 11)
+#define PRIMITIVE3D_ID_SHADOWPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 12)
+#define PRIMITIVE3D_ID_UNIFIEDTRANSPARENCETEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 13)
+#define PRIMITIVE3D_ID_GRADIENTTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 14)
+#define PRIMITIVE3D_ID_BITMAPTEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 15)
+#define PRIMITIVE3D_ID_TRANSPARENCETEXTUREPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 16)
+#define PRIMITIVE3D_ID_TRANSFORMPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 17)
+#define PRIMITIVE3D_ID_HIDDENGEOMETRYPRIMITIVE3D (PRIMITIVE3D_ID_RANGE_DRAWINGLAYER| 18)
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
index 98790dfdefa3..a61c36b8bd8a 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/groupprimitive3d.hxx
@@ -51,7 +51,7 @@ namespace drawinglayer
- TexturePrimitive3D (with the following variations)
- GradientTexturePrimitive3D (for 3D gradient fill)
- BitmapTexturePrimitive3D (for 3D Bitmap fill)
- - AlphaTexturePrimitive3D (for 3D transparence)
+ - TransparenceTexturePrimitive3D (for 3D transparence)
- HatchTexturePrimitive3D (for 3D hatch fill)
- TransformPrimitive3D (for a transformation stack)
*/
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
index 6a38888b20ce..b986c12adad3 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/hatchtextureprimitive3d.hxx
@@ -29,6 +29,7 @@
#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HATCHTEXTUREPRIMITIVE3D_HXX
#include <drawinglayer/primitive3d/textureprimitive3d.hxx>
+#include <drawinglayer/attribute/fillhatchattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hiddengeometryprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hiddengeometryprimitive3d.hxx
new file mode 100644
index 000000000000..287bfcc689e4
--- /dev/null
+++ b/drawinglayer/inc/drawinglayer/primitive3d/hiddengeometryprimitive3d.hxx
@@ -0,0 +1,81 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: hittestprimitive3d.hxx,v $
+ *
+ * $Revision: 1.1.2.1 $
+ *
+ * last change: $Author: aw $ $Date: 2008/09/24 14:27:39 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+
+#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX
+#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX
+
+#include <drawinglayer/primitive3d/groupprimitive3d.hxx>
+
+//////////////////////////////////////////////////////////////////////////////
+
+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.
+ class HiddenGeometryPrimitive3D : public GroupPrimitive3D
+ {
+ public:
+ HiddenGeometryPrimitive3D(const Primitive3DSequence& rChildren);
+
+ // despite returning an empty decomposition since it's no visualisation data,
+ // range calculation is intended to use hidden geometry, so
+ // the local implementation will return the children's range
+ virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
+
+ /// The default implementation returns an empty sequence
+ virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
+
+ // provide unique ID
+ DeclPrimitrive3DIDBlock()
+ };
+ } // end of namespace primitive3d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
+#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HIDDENGEOMETRYPRIMITIVE3D_HXX
+
+//////////////////////////////////////////////////////////////////////////////
+// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx
deleted file mode 100644
index 8b8776b2ff84..000000000000
--- a/drawinglayer/inc/drawinglayer/primitive3d/hittestprimitive3d.hxx
+++ /dev/null
@@ -1,80 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HITTESTPRIMITIVE3D_HXX
-#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HITTESTPRIMITIVE3D_HXX
-
-#include <drawinglayer/primitive3d/groupprimitive3d.hxx>
-
-//////////////////////////////////////////////////////////////////////////////
-
-namespace drawinglayer
-{
- namespace primitive3d
- {
- /** 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
- */
- virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
-
- /** local decomposition. Implementation will return empty Primitive3DSequence
- since this is no visualisation data
- */
- virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
-
- /// provide unique ID
- DeclPrimitrive3DIDBlock()
- };
- } // end of namespace primitive3d
-} // end of namespace drawinglayer
-
-//////////////////////////////////////////////////////////////////////////////
-
-#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE3D_HITTESTPRIMITIVE3D_HXX
-
-//////////////////////////////////////////////////////////////////////////////
-// eof
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
index 843c805d9a5f..f1f680e11574 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrcubeprimitive3d.hxx
@@ -53,7 +53,7 @@ namespace drawinglayer
SdrCubePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
/// compare operator
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
index f04e4e28181d..4ccd863de69f 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrdecompositiontools3d.hxx
@@ -81,13 +81,20 @@ namespace drawinglayer
const basegfx::B2DVector& rTextureSize,
const attribute::Sdr3DObjectAttribute& aSdr3DObjectAttribute,
const attribute::SdrFillAttribute& rFill,
- const attribute::FillGradientAttribute* pFillGradient = 0L);
+ const attribute::FillGradientAttribute& rFillGradient);
Primitive3DSequence createShadowPrimitive3D(
const Primitive3DSequence& rSource,
const attribute::SdrShadowAttribute& rShadow,
bool bShadow3D);
- } // end of namespace overlay
+
+ Primitive3DSequence createHiddenGeometryPrimitives3D(
+ const ::std::vector< basegfx::B3DPolyPolygon >& r3DPolyPolygonVector,
+ const basegfx::B3DHomMatrix& rObjectTransform,
+ const basegfx::B2DVector& rTextureSize,
+ const attribute::Sdr3DObjectAttribute& aSdr3DObjectAttribute);
+
+ } // end of namespace primitive3d
} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
index e4d580aa1229..254254a0055c 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrextrudeprimitive3d.hxx
@@ -87,7 +87,7 @@ namespace drawinglayer
SdrExtrudePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute,
const basegfx::B2DPolyPolygon& rPolyPolygon,
double fDepth,
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
index fe342ba90896..28a483a5b5b2 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrlatheprimitive3d.hxx
@@ -101,7 +101,7 @@ namespace drawinglayer
SdrLathePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute,
const basegfx::B2DPolyPolygon& rPolyPolygon,
sal_uInt32 nHorizontalSegments,
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
index 29cf12edffc3..5c2a4e6b2575 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrpolypolygonprimitive3d.hxx
@@ -62,7 +62,7 @@ namespace drawinglayer
const basegfx::B3DPolyPolygon& rPolyPolygon3D,
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
/// data access
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
index 87c63142bd6e..fbef979d4b92 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrprimitive3d.hxx
@@ -32,8 +32,8 @@
#include <basegfx/matrix/b3dhommatrix.hxx>
#include <basegfx/vector/b2dvector.hxx>
#include <drawinglayer/attribute/sdrallattribute3d.hxx>
-#include <drawinglayer/attribute/sdrattribute3d.hxx>
#include <drawinglayer/primitive3d/sdrextrudelathetools3d.hxx>
+#include <drawinglayer/attribute/sdrobjectattribute3d.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -53,7 +53,7 @@ namespace drawinglayer
/// object surface attributes
basegfx::B3DHomMatrix maTransform;
basegfx::B2DVector maTextureSize;
- attribute::SdrLineFillShadowAttribute maSdrLFSAttribute;
+ attribute::SdrLineFillShadowAttribute3D maSdrLFSAttribute;
attribute::Sdr3DObjectAttribute maSdr3DObjectAttribute;
protected:
@@ -72,13 +72,13 @@ namespace drawinglayer
SdrPrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute);
/// 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::SdrLineFillShadowAttribute3D& getSdrLFSAttribute() const { return maSdrLFSAttribute; }
const attribute::Sdr3DObjectAttribute getSdr3DObjectAttribute() const { return maSdr3DObjectAttribute; }
/// compare operator
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
index 880bb56e1ec9..510c29b4de07 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/sdrsphereprimitive3d.hxx
@@ -58,7 +58,7 @@ namespace drawinglayer
SdrSpherePrimitive3D(
const basegfx::B3DHomMatrix& rTransform,
const basegfx::B2DVector& rTextureSize,
- const attribute::SdrLineFillShadowAttribute& rSdrLFSAttribute,
+ const attribute::SdrLineFillShadowAttribute3D& rSdrLFSAttribute,
const attribute::Sdr3DObjectAttribute& rSdr3DObjectAttribute,
sal_uInt32 nHorizontalSegments,
sal_uInt32 nVerticalSegments);
diff --git a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
index 715ac6610be1..a2e57da2cf1a 100644
--- a/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
+++ b/drawinglayer/inc/drawinglayer/primitive3d/textureprimitive3d.hxx
@@ -29,9 +29,10 @@
#define INCLUDED_DRAWINGLAYER_PRIMITIVE3D_TEXTUREPRIMITIVE3D_HXX
#include <drawinglayer/primitive3d/groupprimitive3d.hxx>
-#include <drawinglayer/attribute/fillattribute.hxx>
#include <drawinglayer/attribute/fillbitmapattribute.hxx>
#include <basegfx/matrix/b2dhommatrix.hxx>
+#include <basegfx/vector/b2dvector.hxx>
+#include <drawinglayer/attribute/fillgradientattribute.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -83,13 +84,13 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** UnifiedAlphaTexturePrimitive3D class
+ /** UnifiedTransparenceTexturePrimitive3D class
This 3D primitive expands TexturePrimitive3D to a unified
- alpha (transparence) texture definition. All 3D primitives
+ transparence texture definition. All 3D primitives
embedded here will be shown with the given transparency.
*/
- class UnifiedAlphaTexturePrimitive3D : public TexturePrimitive3D
+ class UnifiedTransparenceTexturePrimitive3D : public TexturePrimitive3D
{
private:
/// transparency definition
@@ -97,7 +98,7 @@ namespace drawinglayer
public:
/// constructor
- UnifiedAlphaTexturePrimitive3D(
+ UnifiedTransparenceTexturePrimitive3D(
double fTransparence,
const Primitive3DSequence& rChildren);
@@ -107,6 +108,9 @@ namespace drawinglayer
/// compare operator
virtual bool operator==(const BasePrimitive3D& rPrimitive) const;
+ /// own getB3DRange implementation to include transparent geometries to BoundRect calculations
+ virtual basegfx::B3DRange getB3DRange(const geometry::ViewInformation3D& rViewInformation) const;
+
/// local decomposition.
virtual Primitive3DSequence get3DDecomposition(const geometry::ViewInformation3D& rViewInformation) const;
@@ -200,18 +204,18 @@ namespace drawinglayer
{
namespace primitive3d
{
- /** AlphaTexturePrimitive3D class
+ /** TransparenceTexturePrimitive3D 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
+ This 3D primitive expands TexturePrimitive3D to a transparence texture
+ definition. For transparence definition, a gradient is used. The values in
+ that gradient will be interpreted as luminance Transparence-Values. All 3D
primitives embedded here will be shown with the defined transparence.
*/
- class AlphaTexturePrimitive3D : public GradientTexturePrimitive3D
+ class TransparenceTexturePrimitive3D : public GradientTexturePrimitive3D
{
public:
/// constructor
- AlphaTexturePrimitive3D(
+ TransparenceTexturePrimitive3D(
const attribute::FillGradientAttribute& rGradient,
const Primitive3DSequence& rChildren,
const basegfx::B2DVector& rTextureSize);
diff --git a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
index c3889463c1de..d93fb68c932c 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/baseprocessor2d.hxx
@@ -37,30 +37,159 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** BaseProcessor2D class
+
+ Baseclass for all C++ implementations of instances which process
+ primitives.
+
+ Instances which process primitives can be renderers, but also stuff
+ for HitTests, BoundRect calculations and/or animation processing. The
+ main usage are renderers, but they are supposed to handle any primitive
+ processing.
+
+ The base implementation is constructed with a ViewInformation2D which
+ is accessible throughout the processor implementations. The idea is
+ to construct any processor with a given ViewInformation2D. To be able
+ to handle primitives which need to change the current transformation
+ (as e.g. TransformPrimitive2D) it is allowed for the processor implementation
+ to change tis local value using updateViewInformation.
+
+ The basic processing method is process(..) which gets handed over the
+ sequence of primitives to process. For convenience of the C++ implementations,
+ the default implementation of process(..) maps all accesses to primitives to
+ single calls to processBasePrimitive2D(..) where the primitive in question is
+ already casted to the C++ implementation class.
+
+ The process(..) implementation makes a complete iteration over the given
+ sequence of primitives. If the Primitive is not derived from BasePrimitive2D
+ and thus not part of the C++ implementations, it converts ViewInformation2D
+ to the corresponding API implementation (an uno::Sequence< beans::PropertyValue >)
+ and recursively calls the method process(..) at the primitive with the decomposition
+ derived from that primitive. This is the preparation to handle unknown implementations
+ of the com::sun::star::graphic::XPrimitive2D interface in the future.
+
+ So, to implement a basic processor, it is necessary to overload and implement the
+ processBasePrimitive2D(..) method. A minimal renderer has to support the
+ Basic Primitives (see baseprimitive2d.hxx) and the Grouping Primitives (see
+ groupprimitive2d.hxx). These are (currently):
+
+ Basic Primitives:
+
+ - BitmapPrimitive2D (bitmap data, evtl. with transparence)
+ - PointArrayPrimitive2D (single points)
+ - PolygonHairlinePrimitive2D (hairline curves/polygons)
+ - PolyPolygonColorPrimitive2D (colored polygons)
+
+ Grouping Primitives:
+
+ - TransparencePrimitive2D (objects with freely defined transparence)
+ - InvertPrimitive2D (for XOR)
+ - MaskPrimitive2D (for masking)
+ - ModifiedColorPrimitive2D (for a stack of color modifications)
+ - TransformPrimitive2D (for a transformation stack)
+
+ A processor doing so is a minimal processor. Of course a processor may
+ handle any higher-level prmitive (that has a decomposition implementation)
+ for more direct data access or performance reasons, too.
+
+ The main part of a processBasePrimitive2D implementation is a switch..case
+ construct, looking like the following:
+
+ void foo::processBasePrimitive2D(const BasePrimitive2D& rCandidate)
+ {
+ switch(rCandidate.getPrimitive2DID())
+ {
+ case PRIMITIVE2D_ID_??? :
+ {
+ // process PRIMITIVE2D_ID_??? here...
+
+ ...
+
+ break;
+ }
+
+ ...
+
+ default :
+ {
+ // process recursively
+ process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ break;
+ }
+ }
+ }
+
+ The default case makes the processor work with all complex primitives
+ by recursively using their decomposition.
+
+ You can also add a case for ignoring primitives by using:
+
+ case PRIMITIVE2D_ID_...IGNORE.A.. :
+ case PRIMITIVE2D_ID_...IGNORE.B.. :
+ case PRIMITIVE2D_ID_...IGNORE.C.. :
+ {
+ // ignore these primitives by neither processing nor
+ // recursively processing their decomposition
+ break;
+ }
+
+ Another useful case is embedding the processing of a complex primitive by
+ bracketing it with some actions:
+
+ case PRIMITIVE2D_ID_SOME_TEXT :
+ {
+ // encapsulate e.g. with changing local varibles, e.g.
+ // sometimes it's good to know if a basic primitive is
+ // part of a text, especially when not handling the text
+ // self but by purpose want to handle the decomposed
+ // geometries in the processor
+ startText();
+ process(rCandidate.get2DDecomposition(getViewInformation2D()));
+ endText();
+ break;
+ }
+
+ As an example a processor collecting the outlines of a sequence of primitives
+ only needs to handle some Basic Primitives and create outline and collect
+ outline polygons e.g. for primitives with area like BitmapPrimitive2D (a
+ rectangle) and PolyPolygonColorPrimitive2D. When also handling the Grouping
+ Primitives MaskPrimitive2D (e.g. ignoring it's content, using the mask polyPolygon)
+ and TransformPrimitive2D (to have the correct local transformation), a processor
+ creating the outline can be written using just four (4) primitives. As a tipp, it can
+ be helpful to add many for the purpose not interesting higher level primitives
+ to not force their decomposition to be created and/or parsed.
+ */
class BaseProcessor2D
{
private:
+ /// The ViewInformation2D itself. It's private to isolate accesses to it
geometry::ViewInformation2D maViewInformation2D;
protected:
+ /* access method to allow the implementations to change the current
+ ViewInformation2D if needed. This allows isolating these accesses
+ later if needed
+ */
void updateViewInformation(const geometry::ViewInformation2D& rViewInformation2D)
{
maViewInformation2D = rViewInformation2D;
}
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive2D-based.
- // Default implementation does nothing
+ /* as tooling, the process() implementation takes over API handling and calls this
+ virtual render method when the primitive implementation is BasePrimitive2D-based.
+ Default implementation does nothing
+ */
virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
public:
+ /// constructor/destructor
BaseProcessor2D(const geometry::ViewInformation2D& rViewInformation);
virtual ~BaseProcessor2D();
- // the central processing method
+ /// the central processing method
virtual void process(const primitive2d::Primitive2DSequence& rSource);
- // data access
+ /// data read access
const geometry::ViewInformation2D& getViewInformation2D() const { return maViewInformation2D; }
};
} // end of namespace processor2d
@@ -68,6 +197,44 @@ namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
+namespace drawinglayer
+{
+ namespace processor2d
+ {
+ /** CollectingProcessor2D class
+
+ A processor which just collects all primitives given to it in
+ process(..) calls to maPrimitive2DSequence. This can e.g. be used to
+ hand around as instance over various methods where every called
+ method can add graphic content to it.
+ */
+ class CollectingProcessor2D : public BaseProcessor2D
+ {
+ private:
+ primitive2d::Primitive2DSequence maPrimitive2DSequence;
+
+ public:
+ CollectingProcessor2D(const geometry::ViewInformation2D& rViewInformation);
+ virtual ~CollectingProcessor2D();
+
+ /// the central processing method
+ virtual void process(const primitive2d::Primitive2DSequence& rSource);
+
+ /// helpers for adding to local sequence
+ void appendPrimitive2DReference(const primitive2d::Primitive2DReference& rSource)
+ {
+ primitive2d::appendPrimitive2DReferenceToPrimitive2DSequence(maPrimitive2DSequence, rSource);
+ }
+
+ /// data access and reset
+ const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
+ void reset() { maPrimitive2DSequence = primitive2d::Primitive2DSequence(); }
+ };
+ } // end of namespace processor2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
+
#endif //INCLUDED_DRAWINGLAYER_PROCESSOR2D_BASEPROCESSOR2D_HXX
// eof
diff --git a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
index e3a5bf0eb336..72ff97076a6c 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/canvasprocessor.hxx
@@ -56,10 +56,10 @@ namespace drawinglayer { namespace primitive2d {
class MetafilePrimitive2D;
class TextSimplePortionPrimitive2D;
class BitmapPrimitive2D;
- class AlphaPrimitive2D;
+ class TransparencePrimitive2D;
class PolygonStrokePrimitive2D;
class FillBitmapPrimitive2D;
- class UnifiedAlphaPrimitive2D;
+ class UnifiedTransparencePrimitive2D;
}}
//////////////////////////////////////////////////////////////////////////////
@@ -68,6 +68,11 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** canvasProcessor2D class
+
+ A basic implementation of a renderer for com::sun::star::rendering::XCanvas
+ as a target
+ */
class canvasProcessor2D : public BaseProcessor2D
{
private:
@@ -103,10 +108,10 @@ namespace drawinglayer
void impRenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rMetaCandidate);
void impRenderTextSimplePortionPrimitive2D(const primitive2d::TextSimplePortionPrimitive2D& rTextCandidate);
void impRenderBitmapPrimitive2D(const primitive2d::BitmapPrimitive2D& rBitmapCandidate);
- void impRenderAlphaPrimitive2D(const primitive2d::AlphaPrimitive2D& rAlphaCandidate);
+ void impRenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransparenceCandidate);
void impRenderPolygonStrokePrimitive2D(const primitive2d::PolygonStrokePrimitive2D& rPolygonStrokePrimitive);
void impRenderFillBitmapPrimitive2D(const primitive2d::FillBitmapPrimitive2D& rFillBitmapPrimitive2D);
- void impRenderUnifiedAlphaPrimitive2D(const primitive2d::UnifiedAlphaPrimitive2D& rUniAlphaCandidate);
+ void impRenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rUniTransparenceCandidate);
public:
canvasProcessor2D(
diff --git a/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
index b65f7c63b721..9ec44d324187 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/contourextractor2d.hxx
@@ -38,13 +38,18 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** ContourExtractor2D class
+
+ A processor who extracts the contour of the primtives feeded to it
+ in the single local PolyPolygon
+ */
class ContourExtractor2D : public BaseProcessor2D
{
private:
- // the extracted contour
+ /// the extracted contour
std::vector< basegfx::B2DPolyPolygon > maExtractedContour;
- // tooling methods
+ /// tooling methods
void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
public:
diff --git a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
index 9352b13c6cda..be0b40ff2139 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/hittestprocessor2d.hxx
@@ -43,29 +43,36 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** HitTestProcessor2D class
+
+ This processor implements a HitTest with the feeded primitives,
+ given tolerance and extras
+ */
class HitTestProcessor2D : public BaseProcessor2D
{
private:
- // discrete HitTest position
+ /// discrete HitTest position
basegfx::B2DPoint maDiscreteHitPosition;
- // discrete HitTolerance
+ /// discrete HitTolerance
double mfDiscreteHitTolerance;
- // bitfield
+ /// bitfield
unsigned mbHit : 1;
unsigned mbHitToleranceUsed : 1;
- // this flag decides if primitives of type HitTestPrimitive2D
- // will be taken into account for HitTesting or not. Those primitives
- // are created for objects which are else completely invisible and normally
- // their content exists of hairline primitives describing the object's contour
- unsigned mbUseHitTestPrimitiveContent : 1;
+ /* this flag decides if primitives which are embedded to an
+ UnifiedTransparencePrimitive2D and are invisible will be taken into account for
+ HitTesting or not. Those primitives are created for objects which are else
+ completely invisible and normally their content exists of hairline
+ primitives describing the object's contour
+ */
+ unsigned mbUseInvisiblePrimitiveContent : 1;
- // flag to concentraze on text hits only
+ /// flag to concentraze on text hits only
unsigned mbHitTextOnly : 1;
- // tooling methods
+ /// tooling methods
void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
bool checkHairlineHitWithTolerance(
const basegfx::B2DPolygon& rPolygon,
@@ -83,18 +90,18 @@ namespace drawinglayer
bool bHitTextOnly);
virtual ~HitTestProcessor2D();
- // data write access
- void setUseHitTestPrimitiveContent(bool bNew)
+ /// data write access
+ void setUseInvisiblePrimitiveContent(bool bNew)
{
- if((bool)mbUseHitTestPrimitiveContent != bNew) mbUseHitTestPrimitiveContent = bNew;
+ if((bool)mbUseInvisiblePrimitiveContent != bNew) mbUseInvisiblePrimitiveContent = bNew;
}
- // data read access
+ /// data read access
const basegfx::B2DPoint& getDiscreteHitPosition() const { return maDiscreteHitPosition; }
double getDiscreteHitTolerance() const { return mfDiscreteHitTolerance; }
bool getHit() const { return mbHit; }
bool getHitToleranceUsed() const { return mbHitToleranceUsed; }
- bool getUseHitTestPrimitiveContent() const { return mbUseHitTestPrimitiveContent;}
+ bool getUseInvisiblePrimitiveContent() const { return mbUseInvisiblePrimitiveContent;}
bool getHitTextOnly() const { return mbHitTextOnly; }
};
} // end of namespace processor2d
diff --git a/drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx
index 0749d241e640..9ea9313c8743 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx
@@ -37,16 +37,21 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** LineGeometryExtractor2D class
+
+ This processor can extract the line geometry from feeded primpitives. The
+ hairlines and the fille geometry from fat lines are separated.
+ */
class LineGeometryExtractor2D : public BaseProcessor2D
{
private:
std::vector< basegfx::B2DPolygon > maExtractedHairlines;
std::vector< basegfx::B2DPolyPolygon > maExtractedLineFills;
- // bitfield
+ /// bitfield
unsigned mbInLineGeometry : 1;
- // tooling methods
+ /// tooling methods
void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
public:
diff --git a/drawinglayer/inc/drawinglayer/processor2d/textaspolygonextractor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/textaspolygonextractor2d.hxx
index 9dac85fe8955..2fa0bc47862c 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/textaspolygonextractor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/textaspolygonextractor2d.hxx
@@ -40,7 +40,7 @@ namespace drawinglayer
{
namespace processor2d
{
- // helper data structure for returning the result
+ /// helper data structure for returning the result
struct TextAsPolygonDataNode
{
private:
@@ -65,9 +65,13 @@ namespace drawinglayer
bool getIsFilled() const { return mbIsFilled; }
};
- // typedef for a vector of that helper data
+ /// typedef for a vector of that helper data
typedef ::std::vector< TextAsPolygonDataNode > TextAsPolygonDataNodeVector;
+ /** TextAsPolygonExtractor2D class
+
+ This processor extracts text in the feeded primitives to filled polygons
+ */
class TextAsPolygonExtractor2D : public BaseProcessor2D
{
private:
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
index 21e8e2257d48..db5a70e9b4d7 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx
@@ -39,6 +39,7 @@
//////////////////////////////////////////////////////////////////////////////
// predefines
+
class GDIMetaFile;
class Rectangle;
class Gradient;
@@ -62,10 +63,22 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** VclMetafileProcessor2D class
+
+ This processor derived from VclProcessor2D is the base class for rendering
+ all feeded primitives to a classical VCL-Metafile, including all over the
+ time grown extra data in comments and PDF exception data creations. Also
+ printing needs some exception stuff.
+
+ All in all it is needed to emulate the old ::paint output from the old
+ Drawinglayer as long as exporters and/or filters still use the Metafile
+ and the extra-data added to it (which can be seen mostly as 'extensions'
+ or simply as 'hacks').
+ */
class VclMetafileProcessor2D : public VclProcessor2D
{
private:
- // local helper(s)
+ /// local helper(s)
Rectangle impDumpToMetaFile(
const primitive2d::Primitive2DSequence& rContent,
GDIMetaFile& o_rContentMetafile);
@@ -85,42 +98,47 @@ namespace drawinglayer
void impStartSvtGraphicStroke(SvtGraphicStroke* pSvtGraphicStroke);
void impEndSvtGraphicStroke(SvtGraphicStroke* pSvtGraphicStroke);
- // the current clipping PolyPolygon from MaskPrimitive2D
+ /// the current clipping PolyPolygon from MaskPrimitive2D
basegfx::B2DPolyPolygon maClipPolyPolygon;
- // the target MetaFile
+ /// the target MetaFile
GDIMetaFile* mpMetaFile;
- // do not allow embedding SvtGraphicFills into each other,
- // use a counter to prevent that
+ /* do not allow embedding SvtGraphicFills into each other,
+ use a counter to prevent that
+ */
sal_uInt32 mnSvtGraphicFillCount;
- // same for SvtGraphicStroke
+ /// same for SvtGraphicStroke
sal_uInt32 mnSvtGraphicStrokeCount;
- // hold the last unified transparence value to have it handy
- // on SvtGraphicStroke creation
+ /* hold the last unified transparence value to have it handy
+ on SvtGraphicStroke creation
+ */
double mfCurrentUnifiedTransparence;
- // break iterator support
- // made static so it only needs to be fetched once, even with many single
- // constructed VclMetafileProcessor2D. It's still incarnated on demand,
- // but exists for OOo runtime now by purpose.
+ /* break iterator support
+ made static so it only needs to be fetched once, even with many single
+ constructed VclMetafileProcessor2D. It's still incarnated on demand,
+ but exists for OOo runtime now by purpose.
+ */
static ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > mxBreakIterator;
- // vcl::PDFExtOutDevData support
- // For the first step, some extra actions at vcl::PDFExtOutDevData need to
- // be emulated with the VclMetafileProcessor2D. These are potentially temporarily
- // since PDF export may use PrimitiveSequences one day directly.
+ /* vcl::PDFExtOutDevData support
+ For the first step, some extra actions at vcl::PDFExtOutDevData need to
+ be emulated with the VclMetafileProcessor2D. These are potentially temporarily
+ since PDF export may use PrimitiveSequences one day directly.
+ */
vcl::PDFExtOutDevData* mpPDFExtOutDevData;
protected:
- // the local processor for BasePrinitive2D-Implementation based primitives,
- // called from the common process()-implementation
+ /* the local processor for BasePrinitive2D-Implementation based primitives,
+ called from the common process()-implementation
+ */
virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
public:
- // constructor/destructor
+ /// constructor/destructor
VclMetafileProcessor2D(
const geometry::ViewInformation2D& rViewInformation,
OutputDevice& rOutDev);
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx
index e9c052afad9e..a237f5d289d7 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclpixelprocessor2d.hxx
@@ -32,34 +32,39 @@
#include <vcl/outdev.hxx>
//////////////////////////////////////////////////////////////////////////////
-// predefines
-
-//////////////////////////////////////////////////////////////////////////////
namespace drawinglayer
{
namespace processor2d
{
+ /** VclPixelProcessor2D class
+
+ This processor derived from VclProcessor2D is the base class for rendering
+ all feeded primitives to a VCL Window. It is the currently used renderer
+ for all VCL editing output from the DrawingLayer.
+ */
class VclPixelProcessor2D : public VclProcessor2D
{
private:
- // The Pixel renderer resets the original MapMode from the OutputDevice.
- // For some situations it is necessary to get it again, so it is rescued here
+ /* The Pixel renderer resets the original MapMode from the OutputDevice.
+ For some situations it is necessary to get it again, so it is rescued here
+ */
MapMode maOriginalMapMode;
protected:
- // the local processor for BasePrinitive2D-Implementation based primitives,
- // called from the common process()-implementation
+ /* the local processor for BasePrinitive2D-Implementation based primitives,
+ called from the common process()-implementation
+ */
virtual void processBasePrimitive2D(const primitive2d::BasePrimitive2D& rCandidate);
public:
- // constructor/destructor
+ /// constructor/destructor
VclPixelProcessor2D(
const geometry::ViewInformation2D& rViewInformation,
OutputDevice& rOutDev);
virtual ~VclPixelProcessor2D();
- // data access
+ /// data read access
const MapMode& getOriginalMapMode() const { return maOriginalMapMode; }
};
} // end of namespace processor2d
diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
index 841ac2618756..9db84f3e7e0c 100644
--- a/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor2d/vclprocessor2d.hxx
@@ -47,8 +47,8 @@ namespace drawinglayer { namespace primitive2d {
class PolyPolygonColorPrimitive2D;
class MetafilePrimitive2D;
class MaskPrimitive2D;
- class UnifiedAlphaPrimitive2D;
- class AlphaPrimitive2D;
+ class UnifiedTransparencePrimitive2D;
+ class TransparencePrimitive2D;
class TransformPrimitive2D;
class MarkerArrayPrimitive2D;
class PointArrayPrimitive2D;
@@ -65,6 +65,11 @@ namespace drawinglayer
{
namespace processor2d
{
+ /** VclProcessor2D class
+
+ This processor is the base class for VCL-Based processors. It has no
+ processBasePrimitive2D implementation and thus is not usable directly.
+ */
class VclProcessor2D : public BaseProcessor2D
{
protected:
@@ -99,8 +104,8 @@ namespace drawinglayer
void RenderMetafilePrimitive2D(const primitive2d::MetafilePrimitive2D& rPolygonCandidate);
void RenderMaskPrimitive2DPixel(const primitive2d::MaskPrimitive2D& rMaskCandidate);
void RenderModifiedColorPrimitive2D(const primitive2d::ModifiedColorPrimitive2D& rModifiedCandidate);
- void RenderUnifiedAlphaPrimitive2D(const primitive2d::UnifiedAlphaPrimitive2D& rTransCandidate);
- void RenderAlphaPrimitive2D(const primitive2d::AlphaPrimitive2D& rTransCandidate);
+ void RenderUnifiedTransparencePrimitive2D(const primitive2d::UnifiedTransparencePrimitive2D& rTransCandidate);
+ void RenderTransparencePrimitive2D(const primitive2d::TransparencePrimitive2D& rTransCandidate);
void RenderTransformPrimitive2D(const primitive2d::TransformPrimitive2D& rTransformCandidate);
void RenderPagePreviewPrimitive2D(const primitive2d::PagePreviewPrimitive2D& rPagePreviewCandidate);
void RenderMarkerArrayPrimitive2D(const primitive2d::MarkerArrayPrimitive2D& rMarkerArrayCandidate);
diff --git a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
index cd2cc2e6113f..6ed00c337ef3 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/baseprocessor3d.hxx
@@ -37,6 +37,13 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** BaseProcessor3D class
+
+ Baseclass for all C++ implementations of instances which process
+ primitives.
+
+ Please have a look at baseprocessor2d.hxx for more comments.
+ */
class BaseProcessor3D
{
private:
@@ -48,9 +55,10 @@ namespace drawinglayer
maViewInformation3D = rViewInformation3D;
}
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive3D-based.
- // Default implementation does nothing
+ /* as tooling, the process() implementation takes over API handling and calls this
+ virtual render method when the primitive implementation is BasePrimitive3D-based.
+ Default implementation does nothing
+ */
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
public:
@@ -72,6 +80,13 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** CollectingProcessor3D class
+
+ A processor which just collects all primitives given to it in
+ process(..) calls to maPrimitive3DSequence. This can e.g. be used to
+ hand around as instance over various methods where every called
+ method can add graphic content to it.
+ */
class CollectingProcessor3D : public BaseProcessor3D
{
private:
@@ -81,16 +96,16 @@ namespace drawinglayer
CollectingProcessor3D(const geometry::ViewInformation3D& rViewInformation);
virtual ~CollectingProcessor3D();
- // the central processing method
+ /// the central processing method
virtual void process(const primitive3d::Primitive3DSequence& rSource);
- // helpers for adding to local sequence
+ /// helpers for adding to local sequence
void appendPrimitive3DReference(const primitive3d::Primitive3DReference& rSource)
{
primitive3d::appendPrimitive3DReferenceToPrimitive3DSequence(maPrimitive3DSequence, rSource);
}
- // data access and reset
+ /// data access and reset
const primitive3d::Primitive3DSequence& getPrimitive3DSequence() const { return maPrimitive3DSequence; }
void reset() { maPrimitive3DSequence = primitive3d::Primitive3DSequence(); }
};
diff --git a/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx
index 12ebf023be2a..918634af5e35 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/cutfindprocessor3d.hxx
@@ -36,26 +36,38 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** CutFindProcessor class
+
+ This processor extracts all cuts of 3D plane geometries in the feeded primitives
+ with the given cut vector, based on the ViewInformation3D given.
+ */
class CutFindProcessor : public BaseProcessor3D
{
private:
- // the start and stop point for the cut vector
+ /// the start and stop point for the cut vector
basegfx::B3DPoint maFront;
basegfx::B3DPoint maBack;
- // the found cut points
+ /// the found cut points
::std::vector< basegfx::B3DPoint > maResult;
- // #i102956# the transformation change from TransformPrimitive3D processings
- // needs to be remembered to be able to transform found cuts to the
- // basic coordinate system the processor starts with
+ /* #i102956# the transformation change from TransformPrimitive3D processings
+ needs to be remembered to be able to transform found cuts to the
+ basic coordinate system the processor starts with
+ */
basegfx::B3DHomMatrix maCombinedTransform;
- // bitfield
+ /// bitfield
bool mbAnyHit : 1;
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ /* this flag decides if primitives which are invisible will be taken into account for
+ HitTesting or not.
+ */
+ bool mbUseInvisiblePrimitiveContent : 1;
+
+ /* as tooling, the process() implementation takes over API handling and calls this
+ virtual render method when the primitive implementation is BasePrimitive3D-based.
+ */
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
public:
@@ -64,9 +76,16 @@ namespace drawinglayer
const basegfx::B3DPoint& rBack,
bool bAnyHit);
- // data access
+ /// data write access
+ void setUseInvisiblePrimitiveContent(bool bNew)
+ {
+ if((bool)mbUseInvisiblePrimitiveContent != bNew) mbUseInvisiblePrimitiveContent = bNew;
+ }
+
+ /// data read access
const ::std::vector< basegfx::B3DPoint >& getCutPoints() const { return maResult; }
bool getAnyHit() const { return mbAnyHit; }
+ bool getUseInvisiblePrimitiveContent() const { return mbUseInvisiblePrimitiveContent;}
};
} // end of namespace processor3d
} // end of namespace drawinglayer
diff --git a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
index 0b8c1bb413a9..af8de431f191 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/defaultprocessor3d.hxx
@@ -33,9 +33,11 @@
#include <basegfx/range/b2drange.hxx>
#include <basegfx/color/bcolormodifier.hxx>
#include <svtools/optionsdrawinglayer.hxx>
+#include <boost/shared_ptr.hpp>
//////////////////////////////////////////////////////////////////////////////
// predefines
+
namespace basegfx {
class BZPixelRaster;
class B3DPolygon;
@@ -68,35 +70,49 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** DefaultProcessor3D class
+
+ This processor renders all feeded primitives to a 2D raster where for all
+ primitives the two basic methods rasterconvertB3DPolygon for hairlines and
+ rasterconvertB3DPolyPolygon for filled geometry is called. It is a beseclass to
+ e.g. base a Z-Buffer supported renderer on the 3D primitive processing.
+ */
class DefaultProcessor3D : public BaseProcessor3D
{
protected:
- // render information
- const attribute::SdrSceneAttribute& mrSdrSceneAttribute; // read-only scene infos (normal handling, etc...)
- const attribute::SdrLightingAttribute& mrSdrLightingAttribute; // read-only light infos (lights, etc...)
+ /// read-only scene infos (normal handling, etc...)
+ const attribute::SdrSceneAttribute& mrSdrSceneAttribute;
+
+ /// read-only light infos (lights, etc...)
+ const attribute::SdrLightingAttribute& mrSdrLightingAttribute;
- // renderer range. Need to be correctly set by the derived implementations
- basegfx::B2DRange maRasterRange; // the (0, 0, W, H) range from mpBZPixelRaster
+ /// renderer range. Need to be correctly set by the derived implementations
+ /// normally the (0, 0, W, H) range from mpBZPixelRaster
+ basegfx::B2DRange maRasterRange;
- // the modifiedColorPrimitive stack
+ /// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
- // the current active texture
- texture::GeoTexSvx* mpGeoTexSvx;
+ /// the current active texture
+ boost::shared_ptr< texture::GeoTexSvx > mpGeoTexSvx;
- // the current active transparence texture
- texture::GeoTexSvx* mpTransparenceGeoTexSvx;
+ /// the current active transparence texture
+ boost::shared_ptr< texture::GeoTexSvx > mpTransparenceGeoTexSvx;
- // SvtOptionsDrawinglayer incarnation to react on diverse settings
+ /// SvtOptionsDrawinglayer incarnation to react on diverse settings
const SvtOptionsDrawinglayer maDrawinglayerOpt;
- // bitfield
+ /// counter for entered transparence textures
+ sal_uInt32 mnTransparenceCounter;
+
+ /// bitfield
unsigned mbModulate : 1;
unsigned mbFilter : 1;
unsigned mbSimpleTextureActive : 1;
//////////////////////////////////////////////////////////////////////////////
// rendering support
+
void impRenderGradientTexturePrimitive3D(const primitive3d::GradientTexturePrimitive3D& rPrimitive, bool bTransparence);
void impRenderHatchTexturePrimitive3D(const primitive3d::HatchTexturePrimitive3D& rPrimitive);
void impRenderBitmapTexturePrimitive3D(const primitive3d::BitmapTexturePrimitive3D& rPrimitive);
@@ -108,6 +124,7 @@ namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
// rasterconversions for filled and non-filled polygons. These NEED to be
// implemented from derivations
+
virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const = 0;
virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const = 0;
@@ -121,19 +138,20 @@ namespace drawinglayer
const attribute::SdrLightingAttribute& rSdrLightingAttribute);
virtual ~DefaultProcessor3D();
- // data read access
+ /// data read access
const attribute::SdrSceneAttribute& getSdrSceneAttribute() const { return mrSdrSceneAttribute; }
const attribute::SdrLightingAttribute& getSdrLightingAttribute() const { return mrSdrLightingAttribute; }
- // data read access renderer stuff
+ /// data read access renderer stuff
const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; }
- const texture::GeoTexSvx* getGeoTexSvx() const { return mpGeoTexSvx; }
- const texture::GeoTexSvx* getTransparenceGeoTexSvx() const { return mpTransparenceGeoTexSvx; }
+ const boost::shared_ptr< texture::GeoTexSvx >& getGeoTexSvx() const { return mpGeoTexSvx; }
+ const boost::shared_ptr< texture::GeoTexSvx >& getTransparenceGeoTexSvx() const { return mpTransparenceGeoTexSvx; }
+ sal_uInt32 getTransparenceCounter() const { return mnTransparenceCounter; }
bool getModulate() const { return mbModulate; }
bool getFilter() const { return mbFilter; }
bool getSimpleTextureActive() const { return mbSimpleTextureActive; }
- // access to Drawinglayer configuration options
+ /// access to Drawinglayer configuration options
const SvtOptionsDrawinglayer& getOptionsDrawinglayer() const { return maDrawinglayerOpt; }
};
} // end of namespace processor3d
diff --git a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
index 51cbbe15e68d..f07eaa5c245c 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/geometry2dextractor.hxx
@@ -40,20 +40,27 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** Geometry2DExtractingProcessor class
+
+ This processor extracts the 2D geometry (projected geometry) of all feeded primitives.
+ It is e.g. used as sub-processor for contour extraction where 3D geometry is only
+ useful as 2D projected geometry.
+ */
class Geometry2DExtractingProcessor : public BaseProcessor3D
{
private:
- // result holding vector (2D)
+ /// result holding vector (2D)
primitive2d::Primitive2DSequence maPrimitive2DSequence;
- // object transformation for scene for 2d definition
+ /// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
- // the modifiedColorPrimitive stack
+ /// the modifiedColorPrimitive stack
basegfx::BColorModifierStack maBColorModifierStack;
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ /* as tooling, the process() implementation takes over API handling and calls this
+ virtual render method when the primitive implementation is BasePrimitive3D-based.
+ */
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
public:
@@ -61,7 +68,7 @@ namespace drawinglayer
const geometry::ViewInformation3D& rViewInformation,
const basegfx::B2DHomMatrix& rObjectTransformation);
- // data access
+ // data read access
const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const basegfx::BColorModifierStack& getBColorModifierStack() const { return maBColorModifierStack; }
diff --git a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
index 5f5396f23baf..23d8e7edd913 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/shadow3dextractor.hxx
@@ -44,17 +44,24 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** Shadow3DExtractingProcessor class
+
+ This processor extracts the 2D shadow geometry (projected geometry) of all feeded primitives.
+ It is used to create the shadow of 3D objects which consists of 2D geometry. It needs quite
+ some data to do so since we do not only offer flat projected 2D shadow, but also projections
+ dependent on the light source
+ */
class Shadow3DExtractingProcessor : public BaseProcessor3D
{
private:
- // result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence)
+ /// result holding vector (2D) and target vector for stacking (inited to &maPrimitive2DSequence)
primitive2d::Primitive2DSequence maPrimitive2DSequence;
primitive2d::Primitive2DSequence* mpPrimitive2DSequence;
- // object transformation for scene for 2d definition
+ /// object transformation for scene for 2d definition
basegfx::B2DHomMatrix maObjectTransformation;
- // prepared data (transformations) for 2D/3D shadow calculations
+ /// prepared data (transformations) for 2D/3D shadow calculations
basegfx::B3DHomMatrix maWorldToEye;
basegfx::B3DHomMatrix maEyeToView;
basegfx::B3DVector maLightNormal;
@@ -62,26 +69,28 @@ namespace drawinglayer
basegfx::B3DPoint maPlanePoint;
double mfLightPlaneScalar;
- // the shadow color used for sub-primitives. Can stay at black since
- // the encapsulating 2d shadow primitive will contain the color
+ /* the shadow color used for sub-primitives. Can stay at black since
+ the encapsulating 2d shadow primitive will contain the color
+ */
basegfx::BColor maPrimitiveColor;
- // bitfield
- // flag if shadow plane projection preparation leaded to valid results
+ /// bitfield
+ /// flag if shadow plane projection preparation leaded to valid results
unsigned mbShadowProjectionIsValid : 1;
- // flag if conversion is switched on
+ /// flag if conversion is switched on
unsigned mbConvert : 1;
- // flag if conversion shall use projection
+ /// flag if conversion shall use projection
unsigned mbUseProjection : 1;
- // helpers
+ /// local helpers
basegfx::B2DPolygon impDoShadowProjection(const basegfx::B3DPolygon& rSource);
basegfx::B2DPolyPolygon impDoShadowProjection(const basegfx::B3DPolyPolygon& rSource);
- // as tooling, the process() implementation takes over API handling and calls this
- // virtual render method when the primitive implementation is BasePrimitive3D-based.
+ /* as tooling, the process() implementation takes over API handling and calls this
+ virtual render method when the primitive implementation is BasePrimitive3D-based.
+ */
virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rCandidate);
public:
@@ -92,7 +101,7 @@ namespace drawinglayer
double fShadowSlant,
const basegfx::B3DRange& rContained3DRange);
- // data access
+ /// data read access
const primitive2d::Primitive2DSequence& getPrimitive2DSequence() const { return maPrimitive2DSequence; }
const basegfx::B2DHomMatrix& getObjectTransformation() const { return maObjectTransformation; }
const basegfx::B3DHomMatrix& getWorldToEye() const { return maWorldToEye; }
diff --git a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
index c7d10bdfc690..aefeddbb38a9 100644
--- a/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
+++ b/drawinglayer/inc/drawinglayer/processor3d/zbufferprocessor3d.hxx
@@ -50,6 +50,7 @@ namespace drawinglayer {
}
class ZBufferRasterConverter3D;
+class RasterPrimitive3D;
//////////////////////////////////////////////////////////////////////////////
@@ -57,37 +58,40 @@ namespace drawinglayer
{
namespace processor3d
{
+ /** ZBufferProcessor3D class
+
+ This 3D renderer derived from DefaultProcessor3D renders all feeded primitives to a 2D
+ raster bitmap using a Z-Buffer based approach. It is able to supersample and to handle
+ transparent content.
+ */
class ZBufferProcessor3D : public DefaultProcessor3D
{
private:
- // the raster target, a Z-Buffer
+ /// the raster target, a Z-Buffer
basegfx::BZPixelRaster* mpBZPixelRaster;
- // inverse of EyeToView for rasterconversion with evtl. Phong shading
+ /// inverse of EyeToView for rasterconversion with evtl. Phong shading
basegfx::B3DHomMatrix maInvEyeToView;
- // The raster converter for Z-Buffer
+ /// The raster converter for Z-Buffer
ZBufferRasterConverter3D* mpZBufferRasterConverter3D;
- // AA value. Defines how many oversámples will be used in X and Y. Values 0, 1
- // will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create
+ /* AA value. Defines how many oversámples will be used in X and Y. Values 0, 1
+ will switch it off while e.g. 2 will use 2x2 pixels for each pixel to create
+ */
sal_uInt16 mnAntiAlialize;
- // bitfield
- // a combination of bools to allow two-pass rendering to render
- // the transparent parts in the 2nd run (if any) as needed for Z-Buffer
- unsigned mbProcessTransparent : 1;
- unsigned mbContainsTransparent : 1;
-
+ /* remembered RasterPrimitive3D's which need to be painted back to front
+ for transparent 3D parts
+ */
+ std::vector< RasterPrimitive3D >* mpRasterPrimitive3Ds;
//////////////////////////////////////////////////////////////////////////////
// rasterconversions for filled and non-filled polygons
+
virtual void rasterconvertB3DPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolygon& rHairline) const;
virtual void rasterconvertB3DPolyPolygon(const attribute::MaterialAttribute3D& rMaterial, const basegfx::B3DPolyPolygon& rFill) const;
- // the processing method for a single, known primitive
- virtual void processBasePrimitive3D(const primitive3d::BasePrimitive3D& rBasePrimitive);
-
public:
ZBufferProcessor3D(
const geometry::ViewInformation3D& rViewInformation3D,
@@ -100,14 +104,9 @@ namespace drawinglayer
sal_uInt16 nAntiAlialize);
virtual ~ZBufferProcessor3D();
- // helpers for drawing transparent parts in 2nd run. To use this
- // processor, call processNonTransparent and then processTransparent
- // with the same primitives. The 2nd call will only do something,
- // when transparent parts are contained
- void processNonTransparent(const primitive3d::Primitive3DSequence& rSource);
- void processTransparent(const primitive3d::Primitive3DSequence& rSource);
+ void finish();
- // get the result as bitmapEx
+ /// get the result as bitmapEx
BitmapEx getBitmapEx() const;
};
} // end of namespace processor3d