summaryrefslogtreecommitdiff
path: root/include/drawinglayer
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-01-29 12:32:36 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-06-16 20:01:56 +0100
commit5aee0c13cc62a81a38d4132db7972dc301c21b3d (patch)
tree00c7837aa82296623f38305ce0f47bc6e6f5586a /include/drawinglayer
parent9618c7627061b9eb82ad6107de78a12c764744cf (diff)
Resolves: #i121532# enhanced visualisation of text edit&selection
D&D overhauled (cherry picked from commit c6e63b6bbb6b4a63fe1302de57fc32cd28432378) Conflicts: drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx drawinglayer/inc/drawinglayer/processor2d/linegeometryextractor2d.hxx drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx svx/Package_inc.mk svx/inc/svx/sdr/overlay/overlayanimatedbitmapex.hxx svx/inc/svx/sdr/overlay/overlayobject.hxx svx/inc/svx/sdr/overlay/overlaypolypolygon.hxx svx/inc/svx/sdr/overlay/overlayrectangle.hxx svx/inc/svx/sdr/overlay/overlaytools.hxx svx/inc/svx/sdr/primitive2d/svx_primitivetypes2d.hxx svx/inc/svx/svdview.hxx svx/source/engine3d/view3d.cxx svx/source/sdr/overlay/overlayanimatedbitmapex.cxx svx/source/sdr/overlay/overlayhatchrect.cxx svx/source/sdr/overlay/overlaypolypolygon.cxx svx/source/sdr/overlay/overlaytools.cxx svx/source/svdraw/svdcrtv.cxx svx/source/svdraw/svdedxv.cxx svx/source/svdraw/svdhdl.cxx svx/source/svdraw/svdobj.cxx svx/source/svdraw/svdview.cxx sw/source/ui/dochdl/swdtflvr.cxx Unname unused arguments to prevent WaE issues. (cherry picked from commit 0735a61e631b8d4bb3d4e889bee436fb9e7c5734) Change-Id: I3b1cf4754063985dc1b4adac44b33e52e200607f e4288936cadd1f6e06bdf79611536d7114236b56
Diffstat (limited to 'include/drawinglayer')
-rw-r--r--include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx3
-rw-r--r--include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx65
-rw-r--r--include/drawinglayer/processor2d/linegeometryextractor2d.hxx2
3 files changed, 68 insertions, 2 deletions
diff --git a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
index c6467f482c70..2899b37244e1 100644
--- a/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
+++ b/include/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx
@@ -101,7 +101,8 @@
#define PRIMITIVE2D_ID_CROPPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 66)
#define PRIMITIVE2D_ID_PATTERNFILLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 67)
#define PRIMITIVE2D_ID_OBJECTINFOPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 68)
-#define PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 69)
+#define PRIMITIVE2D_ID_POLYPOLYGONSELECTIONPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 69)
+#define PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 70)
//////////////////////////////////////////////////////////////////////////////
diff --git a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
index 0679ce4deb8c..4afb5edf501d 100644
--- a/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/polypolygonprimitive2d.hxx
@@ -30,6 +30,7 @@
#include <drawinglayer/attribute/linestartendattribute.hxx>
#include <drawinglayer/attribute/fillgradientattribute.hxx>
#include <drawinglayer/attribute/fillhatchattribute.hxx>
+#include <drawinglayer/primitive2d/primitivetools2d.hxx>
#include <basegfx/color/bcolor.hxx>
//////////////////////////////////////////////////////////////////////////////
@@ -376,6 +377,70 @@ namespace drawinglayer
} // end of namespace drawinglayer
//////////////////////////////////////////////////////////////////////////////
+// PolyPolygonSelectionPrimitive2D class
+
+namespace drawinglayer
+{
+ namespace primitive2d
+ {
+ /** PolyPolygonSelectionPrimitive2D class
+
+ This primitive defines a PolyPolygon which gets filled with a defined color
+ and a defined transparence, but also gets extended ('grown') by the given
+ discrete size (thus being a view-dependent primitive)
+ */
+ class DRAWINGLAYER_DLLPUBLIC PolyPolygonSelectionPrimitive2D : public DiscreteMetricDependentPrimitive2D
+ {
+ private:
+ /// the PolyPolygon geometry
+ basegfx::B2DPolyPolygon maPolyPolygon;
+
+ /// the color
+ basegfx::BColor maColor;
+
+ /// the transparence [0.0 .. 1.0]
+ double mfTransparence;
+
+ /// the discrete grow size ('pixels'), only posivive values allowed
+ double mfDiscreteGrow;
+
+ /// bitfield
+ /// draw polygons filled when fill is set
+ bool mbFill : 1;
+
+ protected:
+ /// local decomposition.
+ virtual Primitive2DSequence create2DDecomposition(const geometry::ViewInformation2D& rViewInformation) const;
+
+ public:
+ /// constructor
+ PolyPolygonSelectionPrimitive2D(
+ const basegfx::B2DPolyPolygon& rPolyPolygon,
+ const basegfx::BColor& rColor,
+ double fTransparence,
+ double fDiscreteGrow,
+ bool bFill);
+
+ /// data read access
+ const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; }
+ const basegfx::BColor& getColor() const { return maColor; }
+ double getTransparence() const { return mfTransparence; }
+ double getDiscreteGrow() const { return mfDiscreteGrow; }
+ bool getFill() const { return mbFill; }
+
+ /// compare operator
+ virtual bool operator==(const BasePrimitive2D& rPrimitive) const;
+
+ /// get range
+ virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const;
+
+ /// provide unique ID
+ DeclPrimitive2DIDBlock()
+ };
+ } // end of namespace primitive2d
+} // end of namespace drawinglayer
+
+//////////////////////////////////////////////////////////////////////////////
#endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_POLYPOLYGONPRIMITIVE2D_HXX
diff --git a/include/drawinglayer/processor2d/linegeometryextractor2d.hxx b/include/drawinglayer/processor2d/linegeometryextractor2d.hxx
index 4905f4062c5f..906dd9e11ec2 100644
--- a/include/drawinglayer/processor2d/linegeometryextractor2d.hxx
+++ b/include/drawinglayer/processor2d/linegeometryextractor2d.hxx
@@ -35,7 +35,7 @@ namespace drawinglayer
/** LineGeometryExtractor2D class
This processor can extract the line geometry from feeded primpitives. The
- hairlines and the fille geometry from fat lines are separated.
+ hairlines and the fill geometry from fat lines are separated.
*/
class DRAWINGLAYER_DLLPUBLIC LineGeometryExtractor2D : public BaseProcessor2D
{