diff options
author | Armin Weiss <aw@openoffice.org> | 2007-11-07 13:31:19 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2007-11-07 13:31:19 +0000 |
commit | e30ad6028be5eea3bad01bc1b813eb83746bfdd9 (patch) | |
tree | 304a33fac525514d04a9dab33d8ab8a868c144d8 /drawinglayer/inc/drawinglayer | |
parent | 1c80385e37a1a662dabf780c5da8731940ed562c (diff) |
#i39532# committing to have a base for HDU
Diffstat (limited to 'drawinglayer/inc/drawinglayer')
10 files changed, 354 insertions, 79 deletions
diff --git a/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx new file mode 100644 index 000000000000..72e3c93daa20 --- /dev/null +++ b/drawinglayer/inc/drawinglayer/attribute/lineattribute.hxx @@ -0,0 +1,113 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: lineattribute.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: aw $ $Date: 2007-11-07 14:27: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_LINEATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX + +#ifndef _BGFX_POLYGON_B2DLINEGEOMETRY_HXX +#include <basegfx/polygon/b2dlinegeometry.hxx> +#endif + +#ifndef _BGFX_COLOR_BCOLOR_HXX +#include <basegfx/color/bcolor.hxx> +#endif + +#include <vector> + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + class LineAttribute + { + private: + basegfx::BColor maColor; // color + double mfWidth; // absolute line width + basegfx::B2DLineJoin meLineJoin; // type of LineJoin + + public: + 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; + } + + ~LineAttribute() + { + } + + // compare operator + bool operator==(const LineAttribute& rCandidate) const + { + return (maColor == rCandidate.maColor + && mfWidth == rCandidate.mfWidth + && meLineJoin == rCandidate.meLineJoin); + } + + // data access + const basegfx::BColor& getColor() const { return maColor; } + double getWidth() const { return mfWidth; } + basegfx::B2DLineJoin getLineJoin() const { return meLineJoin; } + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX + +// eof diff --git a/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx new file mode 100644 index 000000000000..7f5d87f8745b --- /dev/null +++ b/drawinglayer/inc/drawinglayer/attribute/linestartendattribute.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * OpenOffice.org - a multi-platform office productivity suite + * + * $RCSfile: linestartendattribute.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: aw $ $Date: 2007-11-07 14:27: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_LINESTARTENDATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX + +#ifndef _BGFX_POLYGON_B2DPOLYPOLYGON_HXX +#include <basegfx/polygon/b2dpolypolygon.hxx> +#endif + +#ifndef _BGFX_NUMERIC_FTOOLS_HXX +#include <basegfx/numeric/ftools.hxx> +#endif + +////////////////////////////////////////////////////////////////////////////// +// predefines + +////////////////////////////////////////////////////////////////////////////// + +namespace drawinglayer +{ + namespace attribute + { + 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? + + public: + LineStartEndAttribute( + double fWidth, + const basegfx::B2DPolyPolygon& rPolyPolygon, + bool bCentered) + : mfWidth(fWidth), + maPolyPolygon(rPolyPolygon), + mbCentered(bCentered) + { + } + + // compare operator + bool operator==(const LineStartEndAttribute& rCandidate) const + { + return (basegfx::fTools::equal(mfWidth, rCandidate.mfWidth) + && maPolyPolygon == rCandidate.maPolyPolygon + && mbCentered == rCandidate.mbCentered); + } + + // data access + double getWidth() const { return mfWidth; } + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const { return maPolyPolygon; } + bool isCentered() const { return mbCentered; } + bool isActive() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX + +// eof diff --git a/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx index 3c3229d5e3a9..b18a9b1a1574 100644 --- a/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/sdrattribute.hxx @@ -4,9 +4,9 @@ * * $RCSfile: sdrattribute.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: aw $ $Date: 2006-10-19 10:30:35 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -69,7 +69,7 @@ namespace drawinglayer class SdrLineAttribute { // line definitions - basegfx::tools::B2DLineJoin meJoin; // B2DLINEJOIN_* defines + 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 @@ -78,7 +78,7 @@ namespace drawinglayer public: SdrLineAttribute( - basegfx::tools::B2DLineJoin eJoin, double fWidth, double fTransparence, const basegfx::BColor& rColor, + basegfx::B2DLineJoin eJoin, double fWidth, double fTransparence, const basegfx::BColor& rColor, const ::std::vector< double >& rDotDashArray, double fFullDotDashLen); ~SdrLineAttribute(); @@ -90,7 +90,7 @@ namespace drawinglayer bool isDashed() const { return (0L != maDotDashArray.size()); } // data access - basegfx::tools::B2DLineJoin getJoin() const { return meJoin; } + basegfx::B2DLineJoin getJoin() const { return meJoin; } double getWidth() const { return mfWidth; } double getTransparence() const { return mfTransparence; } const basegfx::BColor& getColor() const { return maColor; } diff --git a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx index f0099cfe7d47..0211306f6fae 100644 --- a/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx +++ b/drawinglayer/inc/drawinglayer/attribute/strokeattribute.hxx @@ -4,9 +4,9 @@ * * $RCSfile: strokeattribute.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: aw $ $Date: 2006-11-28 11:03:55 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -57,35 +57,21 @@ namespace drawinglayer { class StrokeAttribute { - basegfx::BColor maColor; // color - double mfWidth; // absolute line width - basegfx::tools::B2DLineJoin meLineJoin; // type of LineJoin + private: ::std::vector< double > maDotDashArray; // array of double which defines the dot-dash pattern double mfFullDotDashLen; // sum of maDotDashArray (for convenience) public: StrokeAttribute( - const basegfx::BColor& rColor, - double fWidth, - basegfx::tools::B2DLineJoin aB2DLineJoin, const ::std::vector< double >& rDotDashArray, - double fFullDotDashLen) - : maColor(rColor), - mfWidth(fWidth), - meLineJoin(aB2DLineJoin), - maDotDashArray(rDotDashArray), + double fFullDotDashLen = 0.0) + : maDotDashArray(rDotDashArray), mfFullDotDashLen(fFullDotDashLen) { } - StrokeAttribute( - const basegfx::BColor& rColor, - double fWidth, - basegfx::tools::B2DLineJoin aB2DLineJoin = basegfx::tools::B2DLINEJOIN_ROUND) - : maColor(rColor), - mfWidth(fWidth), - meLineJoin(aB2DLineJoin), - maDotDashArray(), + StrokeAttribute() + : maDotDashArray(), mfFullDotDashLen(0.0) { } @@ -97,12 +83,8 @@ namespace drawinglayer StrokeAttribute& operator=(const StrokeAttribute& rCandidate) { - maColor = rCandidate.maColor; - mfWidth = rCandidate.mfWidth; - meLineJoin = rCandidate.meLineJoin; maDotDashArray = rCandidate.maDotDashArray; mfFullDotDashLen = rCandidate.mfFullDotDashLen; - return *this; } @@ -113,19 +95,13 @@ namespace drawinglayer // compare operator bool operator==(const StrokeAttribute& rCandidate) const { - return (maColor == rCandidate.maColor - && mfWidth == rCandidate.mfWidth - && meLineJoin == rCandidate.meLineJoin - && mfFullDotDashLen == rCandidate.mfFullDotDashLen + return (mfFullDotDashLen == rCandidate.mfFullDotDashLen && maDotDashArray == rCandidate.maDotDashArray); } // data access - const basegfx::BColor& getColor() const { return maColor; } - double getWidth() const { return mfWidth; } - basegfx::tools::B2DLineJoin getLineJoin() const { return meLineJoin; } const ::std::vector< double >& getDotDashArray() const { return maDotDashArray; } - double getFullDotDashLen() const { return mfFullDotDashLen; } + double getFullDotDashLen() const; }; } // end of namespace attribute } // end of namespace drawinglayer diff --git a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx index 1bbbafa2cfa3..36bb7fa849a6 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: drawinglayer_primitivetypes2d.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: aw $ $Date: 2007-09-27 15:59:32 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -92,6 +92,7 @@ #define PRIMITIVE2D_ID_WRONGSPELLPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 43) #define PRIMITIVE2D_ID_TEXTEFFECTPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 44) #define PRIMITIVE2D_ID_TEXTHIERARCHYBULLETPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 45) +#define PRIMITIVE2D_ID_POLYPOLYGONHAIRLINEPRIMITIVE2D (PRIMITIVE2D_ID_RANGE_DRAWINGLAYER| 46) ////////////////////////////////////////////////////////////////////////////// diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx index 12b4306dc6a0..1dda509d111e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polygonprimitive2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polygonprimitive2d.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: aw $ $Date: 2007-09-26 11:36:28 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -40,12 +40,16 @@ #include <drawinglayer/primitive2d/baseprimitive2d.hxx> #endif +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX +#include <drawinglayer/attribute/lineattribute.hxx> +#endif + #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX #include <drawinglayer/attribute/strokeattribute.hxx> #endif -#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEARROWATTRIBUTE_HXX -#include <drawinglayer/attribute/strokearrowattribute.hxx> +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX +#include <drawinglayer/attribute/linestartendattribute.hxx> #endif ////////////////////////////////////////////////////////////////////////////// @@ -135,6 +139,7 @@ namespace drawinglayer { private: basegfx::B2DPolygon maPolygon; + attribute::LineAttribute maLineAttribute; attribute::StrokeAttribute maStrokeAttribute; protected: @@ -144,10 +149,16 @@ namespace drawinglayer public: PolygonStrokePrimitive2D( const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + PolygonStrokePrimitive2D( + const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute); + // get data basegfx::B2DPolygon getB2DPolygon() const { return maPolygon; } + const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } // compare operator @@ -169,11 +180,9 @@ namespace drawinglayer { namespace primitive2d { - class PolygonWavePrimitive2D : public BasePrimitive2D + class PolygonWavePrimitive2D : public PolygonStrokePrimitive2D { private: - basegfx::B2DPolygon maPolygon; - attribute::StrokeAttribute maStrokeAttribute; double mfWaveWidth; double mfWaveHeight; @@ -184,13 +193,18 @@ namespace drawinglayer public: PolygonWavePrimitive2D( const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute, double fWaveWidth, double fWaveHeight); + PolygonWavePrimitive2D( + const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, + double fWaveWidth, + double fWaveHeight); + // get data - basegfx::B2DPolygon getB2DPolygon() const { return maPolygon; } - const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } double getWaveWidth() const { return mfWaveWidth; } double getWaveHeight() const { return mfWaveHeight; } @@ -216,8 +230,8 @@ namespace drawinglayer class PolygonStrokeArrowPrimitive2D : public PolygonStrokePrimitive2D { private: - attribute::StrokeArrowAttribute maStart; - attribute::StrokeArrowAttribute maEnd; + attribute::LineStartEndAttribute maStart; + attribute::LineStartEndAttribute maEnd; protected: // local decomposition. @@ -226,13 +240,20 @@ namespace drawinglayer public: PolygonStrokeArrowPrimitive2D( const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute, - const attribute::StrokeArrowAttribute& rStart, - const attribute::StrokeArrowAttribute& rEnd); + const attribute::LineStartEndAttribute& rStart, + const attribute::LineStartEndAttribute& rEnd); + + PolygonStrokeArrowPrimitive2D( + const basegfx::B2DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, + const attribute::LineStartEndAttribute& rStart, + const attribute::LineStartEndAttribute& rEnd); // get data - const attribute::StrokeArrowAttribute& getStart() const { return maStart; } - const attribute::StrokeArrowAttribute& getEnd() const { return maEnd; } + const attribute::LineStartEndAttribute& getStart() const { return maStart; } + const attribute::LineStartEndAttribute& getEnd() const { return maEnd; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx index 960385b4b485..198ae69c044e 100644 --- a/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive2d/polypolygonprimitive2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polypolygonprimitive2d.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: aw $ $Date: 2007-02-22 12:10:56 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:16 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -52,12 +52,16 @@ #include <basegfx/polygon/b2dpolypolygon.hxx> #endif +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX +#include <drawinglayer/attribute/lineattribute.hxx> +#endif + #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX #include <drawinglayer/attribute/strokeattribute.hxx> #endif -#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEARROWATTRIBUTE_HXX -#include <drawinglayer/attribute/strokearrowattribute.hxx> +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX +#include <drawinglayer/attribute/linestartendattribute.hxx> #endif ////////////////////////////////////////////////////////////////////////////// @@ -67,11 +71,48 @@ namespace drawinglayer { namespace primitive2d { + class PolyPolygonHairlinePrimitive2D : public BasePrimitive2D + { + private: + basegfx::B2DPolyPolygon maPolyPolygon; + basegfx::BColor maBColor; + + protected: + // local decomposition. + virtual Primitive2DSequence createLocalDecomposition(const geometry::ViewInformation2D& rViewInformation) const; + + public: + PolyPolygonHairlinePrimitive2D(const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::BColor& rBColor); + + // get data + basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; } + const basegfx::BColor& getBColor() const { return maBColor; } + + // compare operator + virtual bool operator==(const BasePrimitive2D& rPrimitive) const; + + // get range + virtual basegfx::B2DRange getB2DRange(const geometry::ViewInformation2D& rViewInformation) const; + + // provide unique ID + DeclPrimitrive2DIDBlock() + }; + } // end of namespace primitive2d +} // end of namespace drawinglayer + +////////////////////////////////////////////////////////////////////////////// +// PolyPolygonStrokePrimitive2D class + +namespace drawinglayer +{ + namespace primitive2d + { class PolyPolygonStrokePrimitive2D : public BasePrimitive2D { private: - basegfx::B2DPolyPolygon maPolyPolygon; - attribute::StrokeAttribute maStrokeAttribute; + basegfx::B2DPolyPolygon maPolyPolygon; + attribute::LineAttribute maLineAttribute; + attribute::StrokeAttribute maStrokeAttribute; protected: // local decomposition. @@ -80,10 +121,16 @@ namespace drawinglayer public: PolyPolygonStrokePrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + PolyPolygonStrokePrimitive2D( + const basegfx::B2DPolyPolygon& rPolyPolygon, + const attribute::LineAttribute& rLineAttribute); + // get data basegfx::B2DPolyPolygon getB2DPolyPolygon() const { return maPolyPolygon; } + const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } // compare operator @@ -108,8 +155,8 @@ namespace drawinglayer class PolyPolygonStrokeArrowPrimitive2D : public PolyPolygonStrokePrimitive2D { private: - attribute::StrokeArrowAttribute maStart; - attribute::StrokeArrowAttribute maEnd; + attribute::LineStartEndAttribute maStart; + attribute::LineStartEndAttribute maEnd; protected: // local decomposition. @@ -118,13 +165,20 @@ namespace drawinglayer public: PolyPolygonStrokeArrowPrimitive2D( const basegfx::B2DPolyPolygon& rPolyPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute, - const attribute::StrokeArrowAttribute& rStart, - const attribute::StrokeArrowAttribute& rEnd); + const attribute::LineStartEndAttribute& rStart, + const attribute::LineStartEndAttribute& rEnd); + + PolyPolygonStrokeArrowPrimitive2D( + const basegfx::B2DPolyPolygon& rPolyPolygon, + const attribute::LineAttribute& rLineAttribute, + const attribute::LineStartEndAttribute& rStart, + const attribute::LineStartEndAttribute& rEnd); // get data - const attribute::StrokeArrowAttribute& getStart() const { return maStart; } - const attribute::StrokeArrowAttribute& getEnd() const { return maEnd; } + const attribute::LineStartEndAttribute& getStart() const { return maStart; } + const attribute::LineStartEndAttribute& getEnd() const { return maEnd; } // compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx index 30d49b9ecc12..cc58f3692346 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygonprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polygonprimitive3d.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: aw $ $Date: 2006-11-07 15:49:06 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -48,6 +48,10 @@ #include <basegfx/polygon/b3dpolygon.hxx> #endif +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINEATTRIBUTE_HXX +#include <drawinglayer/attribute/lineattribute.hxx> +#endif + #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_STROKEATTRIBUTE_HXX #include <drawinglayer/attribute/strokeattribute.hxx> #endif @@ -95,6 +99,7 @@ namespace drawinglayer { private: basegfx::B3DPolygon maPolygon; + attribute::LineAttribute maLineAttribute; attribute::StrokeAttribute maStrokeAttribute; protected: @@ -104,10 +109,16 @@ namespace drawinglayer public: PolygonStrokePrimitive3D( const basegfx::B3DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute, const attribute::StrokeAttribute& rStrokeAttribute); + PolygonStrokePrimitive3D( + const basegfx::B3DPolygon& rPolygon, + const attribute::LineAttribute& rLineAttribute); + // get data basegfx::B3DPolygon getB3DPolygon() const { return maPolygon; } + const attribute::LineAttribute& getLineAttribute() const { return maLineAttribute; } const attribute::StrokeAttribute& getStrokeAttribute() const { return maStrokeAttribute; } // compare operator diff --git a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx index fcebbcf41657..53149fdf5c3f 100644 --- a/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx +++ b/drawinglayer/inc/drawinglayer/primitive3d/polygontubeprimitive3d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: polygontubeprimitive3d.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: aw $ $Date: 2006-11-07 15:49:06 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -60,7 +60,7 @@ namespace drawinglayer double mfRadius; double mfDegreeStepWidth; double mfMiterMinimumAngle; - basegfx::tools::B2DLineJoin maLineJoin; + basegfx::B2DLineJoin maLineJoin; protected: // local decomposition. @@ -70,7 +70,7 @@ namespace drawinglayer PolygonTubePrimitive3D( const basegfx::B3DPolygon& rPolygon, const basegfx::BColor& rBColor, - double fRadius, basegfx::tools::B2DLineJoin aLineJoin, + double fRadius, basegfx::B2DLineJoin aLineJoin, double fDegreeStepWidth = 10.0 * F_PI180, double fMiterMinimumAngle = 15.0 * F_PI180); @@ -78,7 +78,7 @@ namespace drawinglayer double getRadius() const { return mfRadius; } double getDegreeStepWidth() const { return mfDegreeStepWidth; } double getMiterMinimumAngle() const { return mfMiterMinimumAngle; } - basegfx::tools::B2DLineJoin getLineJoin() const { return maLineJoin; } + basegfx::B2DLineJoin getLineJoin() const { return maLineJoin; } // compare operator virtual bool operator==(const BasePrimitive3D& rPrimitive) const; diff --git a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx index df0128b1928b..4c9df575c58e 100644 --- a/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx +++ b/drawinglayer/inc/drawinglayer/processor2d/vclmetafileprocessor2d.hxx @@ -4,9 +4,9 @@ * * $RCSfile: vclmetafileprocessor2d.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: aw $ $Date: 2007-10-02 16:54:53 $ + * last change: $Author: aw $ $Date: 2007-11-07 14:27:17 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -61,8 +61,9 @@ class SvtGraphicStroke; namespace drawinglayer { namespace attribute { class FillGradientAttribute; + class LineAttribute; class StrokeAttribute; - class StrokeArrowAttribute; + class LineStartEndAttribute; }} namespace basegfx { @@ -91,9 +92,10 @@ namespace drawinglayer SvtGraphicStroke* impTryToCreateSvtGraphicStroke( const basegfx::B2DPolygon& rB2DPolygon, const basegfx::BColor* pColor, + const attribute::LineAttribute* pLineAttribute, const attribute::StrokeAttribute* pStrokeAttribute, - const attribute::StrokeArrowAttribute* pStart, - const attribute::StrokeArrowAttribute* pEnd); + const attribute::LineStartEndAttribute* pStart, + const attribute::LineStartEndAttribute* pEnd); void impStartSvtGraphicStroke(SvtGraphicStroke* pSvtGraphicStroke); void impEndSvtGraphicStroke(SvtGraphicStroke* pSvtGraphicStroke); |