Branch libreoffice-5-0-4
[LibreOffice.git] / include / drawinglayer / attribute / sdrfillgraphicattribute.hxx
bloba3ed6a81cc35e43c5db640f6dd8642970188e931
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
20 #define INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
22 #include <drawinglayer/drawinglayerdllapi.h>
23 #include <o3tl/cow_wrapper.hxx>
26 // predefines
28 class Graphic;
30 namespace basegfx {
31 class B2DRange;
32 class B2DVector;
35 namespace drawinglayer { namespace attribute {
36 class FillGraphicAttribute;
37 class ImpSdrFillGraphicAttribute;
42 namespace drawinglayer
44 namespace attribute
46 class DRAWINGLAYER_DLLPUBLIC SdrFillGraphicAttribute
48 public:
49 typedef o3tl::cow_wrapper< ImpSdrFillGraphicAttribute > ImplType;
51 private:
52 ImplType mpSdrFillGraphicAttribute;
54 public:
55 /// constructors/assignmentoperator/destructor
56 SdrFillGraphicAttribute(
57 const Graphic& rFillGraphic,
58 const basegfx::B2DVector& rGraphicLogicSize,
59 const basegfx::B2DVector& rSize,
60 const basegfx::B2DVector& rOffset,
61 const basegfx::B2DVector& rOffsetPosition,
62 const basegfx::B2DVector& rRectPoint,
63 bool bTiling,
64 bool bStretch,
65 bool bLogSize);
66 SdrFillGraphicAttribute();
67 SdrFillGraphicAttribute(const SdrFillGraphicAttribute& rCandidate);
68 SdrFillGraphicAttribute& operator=(const SdrFillGraphicAttribute& rCandidate);
69 ~SdrFillGraphicAttribute();
71 // checks if the incarnation is default constructed
72 bool isDefault() const;
74 // compare operator
75 bool operator==(const SdrFillGraphicAttribute& rCandidate) const;
77 // data read access
78 const Graphic& getFillGraphic() const;
79 const basegfx::B2DVector& getGraphicLogicSize() const;
80 const basegfx::B2DVector& getSize() const;
81 const basegfx::B2DVector& getOffset() const;
82 const basegfx::B2DVector& getOffsetPosition() const;
83 const basegfx::B2DVector& getRectPoint() const;
84 bool getTiling() const;
85 bool getStretch() const;
87 // FillGraphicAttribute generator
88 FillGraphicAttribute createFillGraphicAttribute(const basegfx::B2DRange& rRange) const;
90 } // end of namespace attribute
91 } // end of namespace drawinglayer
95 #endif //INCLUDED_DRAWINGLAYER_ATTRIBUTE_SDRFILLGRAPHICATTRIBUTE_HXX
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */