summaryrefslogtreecommitdiff
path: root/drawinglayer/inc/drawinglayer/primitive2d
diff options
context:
space:
mode:
Diffstat (limited to 'drawinglayer/inc/drawinglayer/primitive2d')
-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
19 files changed, 402 insertions, 283 deletions
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