fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / drawinglayer / source / primitive2d / clippedborderlineprimitive2d.cxx
blob2bfcd8c121a830d9903438acd64f1ec94ec0b8a4
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 #include <drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx>
11 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
13 namespace drawinglayer
15 namespace primitive2d
17 basegfx::B2DPolyPolygon ClippedBorderLinePrimitive2D::getClipPolygon(
18 SAL_UNUSED_PARAMETER geometry::ViewInformation2D const&) const
20 basegfx::B2DPolyPolygon aPolyPolygon;
21 aPolyPolygon.append( maIntersection );
22 return aPolyPolygon;
25 ClippedBorderLinePrimitive2D::ClippedBorderLinePrimitive2D(
26 const basegfx::B2DPoint& rStart,
27 const basegfx::B2DPoint& rEnd,
28 double fLeftWidth,
29 double fDistance,
30 double fRightWidth,
31 const basegfx::B2DPolygon& rIntersection,
32 const basegfx::BColor& rRGBColorRight,
33 const basegfx::BColor& rRGBColorLeft,
34 const basegfx::BColor& rRGBColorGap,
35 bool bHasGapColor,
36 const short nStyle)
37 : BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth,
38 0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft,
39 rRGBColorGap, bHasGapColor, nStyle),
40 maIntersection( rIntersection )
44 bool ClippedBorderLinePrimitive2D::operator==(const BasePrimitive2D& rPrimitive) const
46 if(BorderLinePrimitive2D::operator==(rPrimitive))
48 const ClippedBorderLinePrimitive2D& rCompare = (ClippedBorderLinePrimitive2D&)rPrimitive;
50 return maIntersection == rCompare.maIntersection;
53 return false;
56 // provide unique ID
57 ImplPrimitive2DIDBlock(ClippedBorderLinePrimitive2D, PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D)
60 } // namespace primitive2d
61 } // namespace drawinglayer
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */