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/.
10 #include <drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx>
11 #include <drawinglayer/primitive2d/drawinglayer_primitivetypes2d.hxx>
13 namespace drawinglayer
17 basegfx::B2DPolyPolygon
ClippedBorderLinePrimitive2D::getClipPolygon(
18 SAL_UNUSED_PARAMETER
geometry::ViewInformation2D
const&) const
20 basegfx::B2DPolyPolygon aPolyPolygon
;
21 aPolyPolygon
.append( maIntersection
);
25 ClippedBorderLinePrimitive2D::ClippedBorderLinePrimitive2D(
26 const basegfx::B2DPoint
& rStart
,
27 const basegfx::B2DPoint
& rEnd
,
31 const basegfx::B2DPolygon
& rIntersection
,
32 const basegfx::BColor
& rRGBColorRight
,
33 const basegfx::BColor
& rRGBColorLeft
,
34 const basegfx::BColor
& rRGBColorGap
,
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
;
57 ImplPrimitive2DIDBlock(ClippedBorderLinePrimitive2D
, PRIMITIVE2D_ID_CLIPPEDBORDERLINEPRIMITIVE2D
)
60 } // namespace primitive2d
61 } // namespace drawinglayer
63 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */