Version 5.4.3.2, tag libreoffice-5.4.3.2
[LibreOffice.git] / include / drawinglayer / primitive2d / clippedborderlineprimitive2d.hxx
blob3fe2813be9a93aac83dc2cdff4011d65de0b0a8e
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_DRAWINGLAYER_PRIMITIVE2D_CLIPPEDBORDERLINEPRIMITIVE2D_HXX
11 #define INCLUDED_DRAWINGLAYER_PRIMITIVE2D_CLIPPEDBORDERLINEPRIMITIVE2D_HXX
13 #include <drawinglayer/drawinglayerdllapi.h>
15 #include <drawinglayer/primitive2d/borderlineprimitive2d.hxx>
16 #include <basegfx/polygon/b2dpolypolygon.hxx>
17 #include <basegfx/polygon/b2dpolygon.hxx>
20 namespace drawinglayer
22 namespace primitive2d
24 /** BorderLinePrimitive2D clipped by the intersection with a provided
25 polygon.
27 class DRAWINGLAYER_DLLPUBLIC ClippedBorderLinePrimitive2D : public BorderLinePrimitive2D
29 private:
30 const basegfx::B2DPolygon maIntersection;
32 protected:
33 virtual basegfx::B2DPolyPolygon getClipPolygon(
34 const geometry::ViewInformation2D& rViewInformation) const override;
36 public:
37 /// constructor
38 ClippedBorderLinePrimitive2D(
39 const basegfx::B2DPoint& rStart,
40 const basegfx::B2DPoint& rEnd,
41 double fLeftWidth,
42 double fDistance,
43 double fRightWidth,
44 const basegfx::B2DPolygon& rIntersection,
45 const basegfx::BColor& rRGBColorRight,
46 const basegfx::BColor& rRGBColorLeft,
47 const basegfx::BColor& rRGBColorGap,
48 bool bHasGapColor,
49 SvxBorderLineStyle nStyle,
50 double fPatternScale );
52 /// compare operator
53 virtual bool operator==(const BasePrimitive2D& rPrimitive) const override;
55 /// provide unique ID
56 DeclPrimitive2DIDBlock()
58 } // end of namespace primitive2d
59 } // end of namespace drawinglayer
62 #endif //INCLUDED_DRAWINGLAYER_PRIMITIVE2D_CLIPPEDBORDERLINEPRIMITIVE2D_HXX
65 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */