1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
21 #define INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
23 #include <drawinglayer/primitive2d/baseprimitive2d.hxx>
24 #include <basegfx/matrix/b2dhommatrix.hxx>
25 #include <svx/sdr/attribute/sdrshadowtextattribute.hxx>
31 namespace drawinglayer
35 class SdrCustomShapePrimitive2D
: public BufferedDecompositionPrimitive2D
38 attribute::SdrShadowTextAttribute
const maSdrSTAttribute
;
39 Primitive2DContainer
const maSubPrimitives
;
40 basegfx::B2DHomMatrix
const maTextBox
;
42 // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
43 // that the text needs to be block formatted
44 bool const mbWordWrap
: 1;
46 // defines that the object contains/is a 3D AutoShape. Needed for
47 // making exceptions with shadow generation
48 bool const mb3DShape
: 1;
51 // local decomposition.
52 virtual void create2DDecomposition(Primitive2DContainer
& rContainer
, const geometry::ViewInformation2D
& aViewInformation
) const override
;
55 SdrCustomShapePrimitive2D(
56 const attribute::SdrShadowTextAttribute
& rSdrSTAttribute
,
57 const Primitive2DContainer
& rSubPrimitives
,
58 const basegfx::B2DHomMatrix
& rTextBox
,
63 const attribute::SdrShadowTextAttribute
& getSdrSTAttribute() const { return maSdrSTAttribute
; }
64 const Primitive2DContainer
& getSubPrimitives() const { return maSubPrimitives
; }
65 const basegfx::B2DHomMatrix
& getTextBox() const { return maTextBox
; }
66 bool getWordWrap() const { return mbWordWrap
; }
67 bool get3DShape() const { return mb3DShape
; }
70 virtual bool operator==(const BasePrimitive2D
& rPrimitive
) const override
;
73 DeclPrimitive2DIDBlock()
75 } // end of namespace primitive2d
76 } // end of namespace drawinglayer
79 #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */