diff options
Diffstat (limited to 'drawinglayer/inc/drawinglayer/attribute')
21 files changed, 1230 insertions, 779 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 |