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 <sdr/attribute/sdreffectstextattribute.hxx>
31 namespace drawinglayer::primitive2d
33 class SdrCustomShapePrimitive2D
: public BufferedDecompositionPrimitive2D
36 attribute::SdrEffectsTextAttribute maSdrSTAttribute
;
37 Primitive2DContainer maSubPrimitives
;
38 basegfx::B2DHomMatrix maTextBox
;
40 // defines if SdrTextWordWrapItem was set at SdrObjCustomShape which means
41 // that the text needs to be block formatted
44 // defines that the object contains/is a 3D AutoShape. Needed for
45 // making exceptions with shadow generation
48 basegfx::B2DHomMatrix maTransform
;
51 // local decomposition.
52 virtual void create2DDecomposition(Primitive2DContainer
& rContainer
, const geometry::ViewInformation2D
& aViewInformation
) const override
;
55 SdrCustomShapePrimitive2D(
56 const attribute::SdrEffectsTextAttribute
& rSdrSTAttribute
,
57 const Primitive2DContainer
& rSubPrimitives
,
58 const basegfx::B2DHomMatrix
& rTextBox
,
61 const basegfx::B2DHomMatrix
& rObjectMatrix
);
64 const attribute::SdrEffectsTextAttribute
& getSdrSTAttribute() const { return maSdrSTAttribute
; }
65 const Primitive2DContainer
& getSubPrimitives() const { return maSubPrimitives
; }
66 const basegfx::B2DHomMatrix
& getTextBox() const { return maTextBox
; }
67 bool getWordWrap() const { return mbWordWrap
; }
68 bool get3DShape() const { return mb3DShape
; }
71 virtual bool operator==(const BasePrimitive2D
& rPrimitive
) const override
;
74 virtual sal_uInt32
getPrimitive2DID() const override
;
76 } // end of namespace drawinglayer::primitive2d
79 #endif // INCLUDED_SVX_INC_SDR_PRIMITIVE2D_SDRCUSTOMSHAPEPRIMITIVE2D_HXX
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */