bump product version to 6.3.0.0.beta1
[LibreOffice.git] / include / basegfx / DrawCommands.hxx
blob92747c5af4d21fcbd56b67a390b1822294031763
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/.
8 */
10 #ifndef INCLUDED_BASEGFX_DRAWCOMMANDS_H
11 #define INCLUDED_BASEGFX_DRAWCOMMANDS_H
13 #include <memory>
15 namespace gfx
17 class DrawBase;
19 class DrawCommand
21 public:
22 std::vector<std::shared_ptr<DrawBase>> maChildren;
25 enum class DrawCommandType
27 Root,
28 Rectangle,
29 Path
32 class DrawBase : public DrawCommand
34 private:
35 DrawCommandType meType;
37 public:
38 DrawBase(DrawCommandType eType)
39 : meType(eType)
43 DrawCommandType getType() { return meType; }
46 class DrawRoot : public DrawBase
48 public:
49 basegfx::B2DRange maRectangle;
51 DrawRoot()
52 : DrawBase(DrawCommandType::Root)
57 class DrawRectangle : public DrawBase
59 public:
60 basegfx::B2DRange maRectangle;
61 double mnRx;
62 double mnRy;
64 double mnStrokeWidth;
65 double mnOpacity;
66 std::shared_ptr<basegfx::BColor> mpFillColor;
67 std::shared_ptr<basegfx::BColor> mpStrokeColor;
69 DrawRectangle(basegfx::B2DRange const& rRectangle)
70 : DrawBase(DrawCommandType::Rectangle)
71 , maRectangle(rRectangle)
72 , mnRx(1.0)
73 , mnRy(1.0)
74 , mnStrokeWidth(1.0)
75 , mnOpacity(1.0)
80 class DrawPath : public DrawBase
82 public:
83 basegfx::B2DPolyPolygon maPolyPolygon;
85 double mnStrokeWidth;
86 double mnOpacity;
87 std::shared_ptr<basegfx::BColor> mpFillColor;
88 std::shared_ptr<basegfx::BColor> mpStrokeColor;
90 DrawPath(basegfx::B2DPolyPolygon const& rPolyPolygon)
91 : DrawBase(DrawCommandType::Path)
92 , maPolyPolygon(rPolyPolygon)
93 , mnStrokeWidth(1.0)
94 , mnOpacity(1.0)
99 } // end namespace gfx
101 #endif // INCLUDED_BASEGFX_DRAWCOMMANDS_H
103 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */