diff options
Diffstat (limited to 'include/drawinglayer/attribute')
19 files changed, 1607 insertions, 0 deletions
diff --git a/include/drawinglayer/attribute/fillgradientattribute.hxx b/include/drawinglayer/attribute/fillgradientattribute.hxx new file mode 100644 index 000000000..a994c826f --- /dev/null +++ b/include/drawinglayer/attribute/fillgradientattribute.hxx @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRADIENTATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class BColor; +} + +namespace drawinglayer::attribute { + class ImpFillGradientAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + enum class GradientStyle + { + Linear, + Axial, + Radial, + Elliptical, + Square, + Rect + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC FillGradientAttribute + { + public: + typedef o3tl::cow_wrapper< ImpFillGradientAttribute > ImplType; + + private: + ImplType 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&); + FillGradientAttribute(FillGradientAttribute&&); + FillGradientAttribute& operator=(const FillGradientAttribute&); + FillGradientAttribute& operator=(FillGradientAttribute&&); + ~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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/fillgraphicattribute.hxx b/include/drawinglayer/attribute/fillgraphicattribute.hxx new file mode 100644 index 000000000..2cec83c68 --- /dev/null +++ b/include/drawinglayer/attribute/fillgraphicattribute.hxx @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +class Graphic; + +namespace basegfx { + class B2DRange; +} + +namespace drawinglayer::attribute { + class ImpFillGraphicAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC FillGraphicAttribute + { + public: + typedef o3tl::cow_wrapper< ImpFillGraphicAttribute > ImplType; + + private: + ImplType mpFillGraphicAttribute; + + public: + /// constructors/assignmentoperator/destructor + FillGraphicAttribute( + const Graphic& rGraphic, + const basegfx::B2DRange& rGraphicRange, + bool bTiling, + double fOffsetX = 0.0, + double fOffsetY = 0.0); + FillGraphicAttribute(const FillGraphicAttribute&); + FillGraphicAttribute& operator=(const FillGraphicAttribute&); + ~FillGraphicAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const FillGraphicAttribute& rCandidate) const; + + // data read access + const Graphic& getGraphic() const; + const basegfx::B2DRange& getGraphicRange() const; + bool getTiling() const; + double getOffsetX() const; + double getOffsetY() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLGRAPHICATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/fillhatchattribute.hxx b/include/drawinglayer/attribute/fillhatchattribute.hxx new file mode 100644 index 000000000..7c2f819f0 --- /dev/null +++ b/include/drawinglayer/attribute/fillhatchattribute.hxx @@ -0,0 +1,112 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class BColor; +} + +namespace drawinglayer::attribute { + class ImpFillHatchAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + enum class HatchStyle + { + Single, + Double, + Triple + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC FillHatchAttribute + { + public: + typedef o3tl::cow_wrapper< ImpFillHatchAttribute > ImplType; + + private: + ImplType mpFillHatchAttribute; + + public: + /// constructors/assignmentoperator/destructor + FillHatchAttribute( + HatchStyle eStyle, + double fDistance, + double fAngle, + const basegfx::BColor& rColor, + sal_uInt32 nMinimalDiscreteDistance, + bool bFillBackground); + FillHatchAttribute(); + FillHatchAttribute(const FillHatchAttribute&); + FillHatchAttribute(FillHatchAttribute&&); + FillHatchAttribute& operator=(const FillHatchAttribute&); + FillHatchAttribute& operator=(FillHatchAttribute&&); + ~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; + + // #i120230# If a minimal discrete distance is wanted (VCL used 3, + // this is the default for the global instance, too), set this + // unequal to zero. Zero means not to use it. If set bigger zero + // (should be at least two, one leads to a full plane filled with + // lines when Distance in discrete views is smaller than one) this + // will be used when the discrete value is less than the given one. + // This is used to 'emulate' old VCL behaviour which makes hatches + // look better by not making distances as small as needed, but + // keeping them on a minimal discrete value for more appealing + // visualisation. + sal_uInt32 getMinimalDiscreteDistance() const; + + bool isFillBackground() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FILLHATCHATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/fontattribute.hxx b/include/drawinglayer/attribute/fontattribute.hxx new file mode 100644 index 000000000..a12ffb405 --- /dev/null +++ b/include/drawinglayer/attribute/fontattribute.hxx @@ -0,0 +1,97 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace rtl { + class OUString; +} + +namespace drawinglayer::attribute { + class ImpFontAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + /** FontAttribute class + + This attribute class is able to hold all parameters needed/used + to completely define the parametrisation of a text portion. + */ + class DRAWINGLAYER_DLLPUBLIC FontAttribute + { + public: + typedef o3tl::cow_wrapper< ImpFontAttribute > ImplType; + + private: + ImplType mpFontAttribute; + + public: + /// constructors/assignmentoperator/destructor + /// TODO: pair kerning and CJK kerning + FontAttribute( + const rtl::OUString& rFamilyName, + const rtl::OUString& rStyleName, + sal_uInt16 nWeight, + bool bSymbol = false, + bool bVertical = false, + bool bItalic = false, + bool bMonospaced = false, + bool bOutline = false, + bool bRTL = false, + bool bBiDiStrong = false); + FontAttribute(); + FontAttribute(const FontAttribute&); + FontAttribute(FontAttribute&&); + FontAttribute& operator=(const FontAttribute&); + FontAttribute& operator=(FontAttribute&&); + ~FontAttribute(); + + // compare operator + bool operator==(const FontAttribute& rCandidate) const; + + /// data read access + const rtl::OUString& getFamilyName() const; + const rtl::OUString& getStyleName() const; + sal_uInt16 getWeight() const; + bool getSymbol() const; + bool getVertical() const; + bool getItalic() const; + bool getOutline() const; + bool getRTL() const; + bool getBiDiStrong() const; + bool getMonospaced() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_FONTATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/lineattribute.hxx b/include/drawinglayer/attribute/lineattribute.hxx new file mode 100644 index 000000000..77828a15d --- /dev/null +++ b/include/drawinglayer/attribute/lineattribute.hxx @@ -0,0 +1,75 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <drawinglayer/drawinglayerdllapi.h> + +#include <basegfx/numeric/ftools.hxx> // for F_PI180 +#include <basegfx/vector/b2enums.hxx> +#include <com/sun/star/drawing/LineCap.hpp> +#include <o3tl/cow_wrapper.hxx> + +namespace basegfx +{ +class BColor; +} + +namespace drawinglayer::attribute +{ +class ImpLineAttribute; +} + +namespace drawinglayer::attribute +{ +class DRAWINGLAYER_DLLPUBLIC LineAttribute +{ +public: + typedef o3tl::cow_wrapper<ImpLineAttribute> ImplType; + +private: + ImplType mpLineAttribute; + +public: + /// constructors/assignmentoperator/destructor + explicit LineAttribute(const basegfx::BColor& rColor, double fWidth = 0.0, + basegfx::B2DLineJoin aB2DLineJoin = basegfx::B2DLineJoin::Round, + css::drawing::LineCap aLineCap = css::drawing::LineCap_BUTT, + double fMiterMinimumAngle = basegfx::deg2rad(15.0)); + LineAttribute(); + LineAttribute(const LineAttribute&); + LineAttribute& operator=(const LineAttribute&); + ~LineAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const LineAttribute& rCandidate) const; + + // data read access + const basegfx::BColor& getColor() const; + double getWidth() const; + basegfx::B2DLineJoin getLineJoin() const; + css::drawing::LineCap getLineCap() const; + double getMiterMinimumAngle() const; +}; +} // end of namespace drawinglayer + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/linestartendattribute.hxx b/include/drawinglayer/attribute/linestartendattribute.hxx new file mode 100644 index 000000000..9f87e6cb7 --- /dev/null +++ b/include/drawinglayer/attribute/linestartendattribute.hxx @@ -0,0 +1,79 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class B2DPolyPolygon; +} + +namespace drawinglayer::attribute { + class ImpLineStartEndAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC LineStartEndAttribute + { + public: + typedef o3tl::cow_wrapper< ImpLineStartEndAttribute > ImplType; + + private: + ImplType mpLineStartEndAttribute; + + public: + /// constructors/assignmentoperator/destructor + LineStartEndAttribute( + double fWidth, + const basegfx::B2DPolyPolygon& rPolyPolygon, + bool bCentered); + LineStartEndAttribute(); + LineStartEndAttribute(const LineStartEndAttribute&); + LineStartEndAttribute& operator=(const LineStartEndAttribute&); + ~LineStartEndAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const LineStartEndAttribute& rCandidate) const; + + // data read access + double getWidth() const; + const basegfx::B2DPolyPolygon& getB2DPolyPolygon() const; + bool isCentered() const; + bool isActive() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_LINESTARTENDATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/materialattribute3d.hxx b/include/drawinglayer/attribute/materialattribute3d.hxx new file mode 100644 index 000000000..4eddfea25 --- /dev/null +++ b/include/drawinglayer/attribute/materialattribute3d.hxx @@ -0,0 +1,80 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_MATERIALATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_MATERIALATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace drawinglayer::attribute { + class ImpMaterialAttribute3D; +} + +namespace basegfx { + class BColor; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC MaterialAttribute3D + { + public: + typedef o3tl::cow_wrapper<ImpMaterialAttribute3D, o3tl::ThreadSafeRefCountingPolicy> ImplType; + + private: + ImplType mpMaterialAttribute3D; + + public: + // constructors/destructor + 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&); + ~MaterialAttribute3D(); + + // assignment operator + MaterialAttribute3D& operator=(const MaterialAttribute3D&); + + // compare operator + bool operator==(const MaterialAttribute3D& rCandidate) const; + + // data read access + const basegfx::BColor& getColor() const; + const basegfx::BColor& getSpecular() const; + const basegfx::BColor& getEmission() const; + sal_uInt16 getSpecularIntensity() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_MATERIALATTRIBUTE3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrallattribute3d.hxx b/include/drawinglayer/attribute/sdrallattribute3d.hxx new file mode 100644 index 000000000..b75b006e1 --- /dev/null +++ b/include/drawinglayer/attribute/sdrallattribute3d.hxx @@ -0,0 +1,73 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRALLATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRALLATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.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 DRAWINGLAYER_DLLPUBLIC SdrLineFillShadowAttribute3D + { + private: + const SdrLineAttribute maLine; + const SdrFillAttribute maFill; + const SdrLineStartEndAttribute maLineStartEnd; + const SdrShadowAttribute maShadow; + const FillGradientAttribute maFillFloatTransGradient; + + public: + /// constructors/assignmentoperator/destructor + SdrLineFillShadowAttribute3D( + const SdrLineAttribute& rLine, + const SdrFillAttribute& rFill, + const SdrLineStartEndAttribute& rLineStartEnd, + const SdrShadowAttribute& rShadow, + const FillGradientAttribute& rFillFloatTransGradient); + SdrLineFillShadowAttribute3D(); + + // compare operator + bool operator==(const SdrLineFillShadowAttribute3D& rCandidate) const; + + // data read access + const SdrLineAttribute& getLine() const { return maLine; } + const SdrFillAttribute& getFill() const { return maFill; } + const SdrShadowAttribute& getShadow() const { return maShadow; } + const FillGradientAttribute& getFillFloatTransGradient() const { return maFillFloatTransGradient; } + }; + } // end of namespace overlay +} // end of namespace drawinglayer + + +#endif // INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRALLATTRIBUTE3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrfillattribute.hxx b/include/drawinglayer/attribute/sdrfillattribute.hxx new file mode 100644 index 000000000..7801f0412 --- /dev/null +++ b/include/drawinglayer/attribute/sdrfillattribute.hxx @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class BColor; +} + +namespace drawinglayer::attribute { + class ImpSdrFillAttribute; + class FillGradientAttribute; + class FillHatchAttribute; + class SdrFillGraphicAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrFillAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFillAttribute > ImplType; + + private: + ImplType mpSdrFillAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFillAttribute( + double fTransparence, + const basegfx::BColor& rColor, + const FillGradientAttribute& rGradient, + const FillHatchAttribute& rHatch, + const SdrFillGraphicAttribute& rFillGraphic); + SdrFillAttribute(); + SdrFillAttribute(const SdrFillAttribute&); + SdrFillAttribute(SdrFillAttribute&&); + SdrFillAttribute& operator=(const SdrFillAttribute&); + SdrFillAttribute& operator=(SdrFillAttribute&&); + ~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 SdrFillGraphicAttribute& getFillGraphic() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrfillgraphicattribute.hxx b/include/drawinglayer/attribute/sdrfillgraphicattribute.hxx new file mode 100644 index 000000000..281733132 --- /dev/null +++ b/include/drawinglayer/attribute/sdrfillgraphicattribute.hxx @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +class Graphic; + +namespace basegfx { + class B2DRange; + class B2DVector; +} + +namespace drawinglayer::attribute { + class FillGraphicAttribute; + class ImpSdrFillGraphicAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrFillGraphicAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrFillGraphicAttribute > ImplType; + + private: + ImplType mpSdrFillGraphicAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrFillGraphicAttribute( + const Graphic& rFillGraphic, + const basegfx::B2DVector& rGraphicLogicSize, + const basegfx::B2DVector& rSize, + const basegfx::B2DVector& rOffset, + const basegfx::B2DVector& rOffsetPosition, + const basegfx::B2DVector& rRectPoint, + bool bTiling, + bool bStretch, + bool bLogSize); + SdrFillGraphicAttribute(); + SdrFillGraphicAttribute(const SdrFillGraphicAttribute&); + SdrFillGraphicAttribute(SdrFillGraphicAttribute&&); + SdrFillGraphicAttribute& operator=(const SdrFillGraphicAttribute&); + SdrFillGraphicAttribute& operator=(SdrFillGraphicAttribute&&); + ~SdrFillGraphicAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrFillGraphicAttribute& rCandidate) const; + + // data read access + const Graphic& getFillGraphic() const; + const basegfx::B2DVector& getGraphicLogicSize() const; + const basegfx::B2DVector& getSize() const; + const basegfx::B2DVector& getOffset() const; + const basegfx::B2DVector& getOffsetPosition() const; + const basegfx::B2DVector& getRectPoint() const; + bool getTiling() const; + + // FillGraphicAttribute generator + FillGraphicAttribute createFillGraphicAttribute(const basegfx::B2DRange& rRange) const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrglowattribute.hxx b/include/drawinglayer/attribute/sdrglowattribute.hxx new file mode 100644 index 000000000..b17560bd7 --- /dev/null +++ b/include/drawinglayer/attribute/sdrglowattribute.hxx @@ -0,0 +1,51 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRGLOWATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRGLOWATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> +#include <basegfx/matrix/b2dhommatrix.hxx> +#include <basegfx/color/bcolor.hxx> +#include <basegfx/range/b2drange.hxx> +#include <tools/color.hxx> + +namespace drawinglayer +{ +namespace attribute +{ +class DRAWINGLAYER_DLLPUBLIC SdrGlowAttribute +{ +private: + sal_Int32 m_nRadius = 0; + Color m_color; // Includes alpha! + +public: + SdrGlowAttribute(sal_Int32 nRadius, const Color& rColor); + SdrGlowAttribute(); + SdrGlowAttribute(const SdrGlowAttribute&); + SdrGlowAttribute(SdrGlowAttribute&&); + ~SdrGlowAttribute(); + bool operator==(const SdrGlowAttribute& rCandidate) const; + + SdrGlowAttribute& operator=(const SdrGlowAttribute&); + SdrGlowAttribute& operator=(SdrGlowAttribute&&); + + // data access + const Color& getColor() const { return m_color; } + sal_Int32 getRadius() const { return m_nRadius; } + bool isDefault() const { return m_nRadius == 0; } +}; +} // end of namespace attribute +} // end of namespace drawinglayer + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRGLOWATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrlightattribute3d.hxx b/include/drawinglayer/attribute/sdrlightattribute3d.hxx new file mode 100644 index 000000000..06d024f5b --- /dev/null +++ b/include/drawinglayer/attribute/sdrlightattribute3d.hxx @@ -0,0 +1,77 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class BColor; + class B3DVector; +} + +namespace drawinglayer::attribute { + class ImpSdr3DLightAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC Sdr3DLightAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdr3DLightAttribute > ImplType; + + private: + ImplType mpSdr3DLightAttribute; + + public: + // constructors/destructor + Sdr3DLightAttribute( + const basegfx::BColor& rColor, + const basegfx::B3DVector& rDirection, + bool bSpecular); + Sdr3DLightAttribute(const Sdr3DLightAttribute&); + ~Sdr3DLightAttribute(); + + // assignment operator + Sdr3DLightAttribute& operator=(const Sdr3DLightAttribute&); + + // 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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrlightingattribute3d.hxx b/include/drawinglayer/attribute/sdrlightingattribute3d.hxx new file mode 100644 index 000000000..35a4da1c6 --- /dev/null +++ b/include/drawinglayer/attribute/sdrlightingattribute3d.hxx @@ -0,0 +1,87 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTINGATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLIGHTINGATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + +#include <vector> + + +// predefines + +namespace basegfx { + class BColor; + class B3DVector; +} + +namespace drawinglayer::attribute { + class ImpSdrLightingAttribute; + class Sdr3DLightAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrLightingAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrLightingAttribute > ImplType; + + private: + ImplType mpSdrLightingAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrLightingAttribute( + const basegfx::BColor& rAmbientLight, + const ::std::vector< Sdr3DLightAttribute >& rLightVector); + SdrLightingAttribute(); + SdrLightingAttribute(const SdrLightingAttribute& rCandidate); + SdrLightingAttribute(SdrLightingAttribute&& rCandidate); + SdrLightingAttribute& operator=(const SdrLightingAttribute& rCandidate); + SdrLightingAttribute& operator=(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 ::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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrlineattribute.hxx b/include/drawinglayer/attribute/sdrlineattribute.hxx new file mode 100644 index 000000000..f0ea867b6 --- /dev/null +++ b/include/drawinglayer/attribute/sdrlineattribute.hxx @@ -0,0 +1,91 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <basegfx/vector/b2enums.hxx> +#include <com/sun/star/drawing/LineCap.hpp> +#include <o3tl/cow_wrapper.hxx> +#include <vector> + + +// predefines + +namespace basegfx { + class BColor; +} + +namespace drawinglayer::attribute { + class ImpSdrLineAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrLineAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrLineAttribute > ImplType; + + private: + ImplType mpSdrLineAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrLineAttribute( + basegfx::B2DLineJoin eJoin, + double fWidth, + double fTransparence, + const basegfx::BColor& rColor, + css::drawing::LineCap eCap, + const ::std::vector< double >& rDotDashArray, + double fFullDotDashLen); + SdrLineAttribute(); + SdrLineAttribute(const SdrLineAttribute&); + SdrLineAttribute(SdrLineAttribute&&); + SdrLineAttribute& operator=(const SdrLineAttribute&); + SdrLineAttribute& operator=(SdrLineAttribute&&); + ~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; + css::drawing::LineCap getCap() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINEATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrlinestartendattribute.hxx b/include/drawinglayer/attribute/sdrlinestartendattribute.hxx new file mode 100644 index 000000000..e3a90ac6f --- /dev/null +++ b/include/drawinglayer/attribute/sdrlinestartendattribute.hxx @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINESTARTENDATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRLINESTARTENDATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class B2DPolyPolygon; +} + +namespace drawinglayer::attribute { + class ImpSdrLineStartEndAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrLineStartEndAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrLineStartEndAttribute > ImplType; + + private: + ImplType 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&); + SdrLineStartEndAttribute(SdrLineStartEndAttribute&&); + SdrLineStartEndAttribute& operator=(const SdrLineStartEndAttribute&); + SdrLineStartEndAttribute& operator=(SdrLineStartEndAttribute&&); + ~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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrobjectattribute3d.hxx b/include/drawinglayer/attribute/sdrobjectattribute3d.hxx new file mode 100644 index 000000000..2e8013dd6 --- /dev/null +++ b/include/drawinglayer/attribute/sdrobjectattribute3d.hxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDROBJECTATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDROBJECTATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.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> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace drawinglayer::attribute { + class ImpSdr3DObjectAttribute; + class MaterialAttribute3D; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC Sdr3DObjectAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdr3DObjectAttribute > ImplType; + + private: + ImplType mpSdr3DObjectAttribute; + + public: + // constructors/destructor + Sdr3DObjectAttribute( + css::drawing::NormalsKind aNormalsKind, + css::drawing::TextureProjectionMode aTextureProjectionX, + css::drawing::TextureProjectionMode aTextureProjectionY, + css::drawing::TextureKind2 aTextureKind, + css::drawing::TextureMode aTextureMode, + const MaterialAttribute3D& rMaterial, + bool bNormalsInvert, + bool bDoubleSided, + bool bShadow3D, + bool bTextureFilter, + bool bReducedLineGeometry); + Sdr3DObjectAttribute(const Sdr3DObjectAttribute&); + ~Sdr3DObjectAttribute(); + + // assignment operator + Sdr3DObjectAttribute& operator=(const Sdr3DObjectAttribute&); + + // compare operator + bool operator==(const Sdr3DObjectAttribute& rCandidate) const; + + // data read access + css::drawing::NormalsKind getNormalsKind() const; + css::drawing::TextureProjectionMode getTextureProjectionX() const; + css::drawing::TextureProjectionMode getTextureProjectionY() const; + css::drawing::TextureKind2 getTextureKind() const; + css::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 + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrsceneattribute3d.hxx b/include/drawinglayer/attribute/sdrsceneattribute3d.hxx new file mode 100644 index 000000000..2fca2acb4 --- /dev/null +++ b/include/drawinglayer/attribute/sdrsceneattribute3d.hxx @@ -0,0 +1,82 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX + +#include <drawinglayer/drawinglayerdllapi.h> + +#include <com/sun/star/drawing/ProjectionMode.hpp> +#include <com/sun/star/drawing/ShadeMode.hpp> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace drawinglayer::attribute { + class ImpSdrSceneAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrSceneAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrSceneAttribute > ImplType; + + private: + ImplType mpSdrSceneAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrSceneAttribute( + double fDistance, + double fShadowSlant, + css::drawing::ProjectionMode aProjectionMode, + css::drawing::ShadeMode aShadeMode, + bool bTwoSidedLighting); + SdrSceneAttribute(); + SdrSceneAttribute(const SdrSceneAttribute&); + SdrSceneAttribute(SdrSceneAttribute&&); + SdrSceneAttribute& operator=(const SdrSceneAttribute&); + SdrSceneAttribute& operator=(SdrSceneAttribute&&); + ~SdrSceneAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const SdrSceneAttribute& rCandidate) const; + + // data read access + double getShadowSlant() const; + css::drawing::ProjectionMode getProjectionMode() const; + css::drawing::ShadeMode getShadeMode() const; + bool getTwoSidedLighting() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSCENEATTRIBUTE3D_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/sdrshadowattribute.hxx b/include/drawinglayer/attribute/sdrshadowattribute.hxx new file mode 100644 index 000000000..fc797dc9d --- /dev/null +++ b/include/drawinglayer/attribute/sdrshadowattribute.hxx @@ -0,0 +1,83 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX +#define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> + + +// predefines + +namespace basegfx { + class BColor; + class B2DVector; +} + +namespace drawinglayer::attribute { + class ImpSdrShadowAttribute; +} + + +namespace drawinglayer +{ + namespace attribute + { + class DRAWINGLAYER_DLLPUBLIC SdrShadowAttribute + { + public: + typedef o3tl::cow_wrapper< ImpSdrShadowAttribute > ImplType; + + private: + ImplType mpSdrShadowAttribute; + + public: + /// constructors/assignmentoperator/destructor + SdrShadowAttribute( + const basegfx::B2DVector& rOffset, + const basegfx::B2DVector& rSize, + double fTransparence, + const basegfx::BColor& rColor); + SdrShadowAttribute(); + SdrShadowAttribute(const SdrShadowAttribute&); + SdrShadowAttribute(SdrShadowAttribute&&); + SdrShadowAttribute& operator=(const SdrShadowAttribute&); + SdrShadowAttribute& operator=(SdrShadowAttribute&&); + ~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; + const basegfx::B2DVector& getSize() const; + double getTransparence() const; + const basegfx::BColor& getColor() const; + }; + } // end of namespace attribute +} // end of namespace drawinglayer + + +#endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRSHADOWATTRIBUTE_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/drawinglayer/attribute/strokeattribute.hxx b/include/drawinglayer/attribute/strokeattribute.hxx new file mode 100644 index 000000000..d5d825c54 --- /dev/null +++ b/include/drawinglayer/attribute/strokeattribute.hxx @@ -0,0 +1,64 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + +#pragma once + +#include <drawinglayer/drawinglayerdllapi.h> +#include <o3tl/cow_wrapper.hxx> +#include <vector> + +namespace drawinglayer::attribute +{ +class ImpStrokeAttribute; +} + +namespace drawinglayer::attribute +{ +class DRAWINGLAYER_DLLPUBLIC StrokeAttribute +{ +public: + typedef o3tl::cow_wrapper<ImpStrokeAttribute> ImplType; + +private: + ImplType mpStrokeAttribute; + +public: + /// constructors/assignmentoperator/destructor + explicit StrokeAttribute(const ::std::vector<double>& rDotDashArray, + double fFullDotDashLen = 0.0); + StrokeAttribute(); + StrokeAttribute(const StrokeAttribute&); + StrokeAttribute(StrokeAttribute&&); + StrokeAttribute& operator=(const StrokeAttribute&); + StrokeAttribute& operator=(StrokeAttribute&&); + ~StrokeAttribute(); + + // checks if the incarnation is default constructed + bool isDefault() const; + + // compare operator + bool operator==(const StrokeAttribute& rCandidate) const; + + // data read access + const ::std::vector<double>& getDotDashArray() const; + double getFullDotDashLen() const; +}; +} // end of namespace drawinglayer::attribute + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |