fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / svx / source / sdr / overlay / overlaypolypolygon.cxx
blobe1b06469d1be3a608642a7798a972fd0e6c34357
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/.
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 #include <svx/sdr/overlay/overlaypolypolygon.hxx>
21 #include <vcl/outdev.hxx>
22 #include <basegfx/matrix/b2dhommatrix.hxx>
23 #include <basegfx/polygon/b2dpolypolygontools.hxx>
24 #include <svx/sdr/overlay/overlaymanager.hxx>
25 #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
27 //////////////////////////////////////////////////////////////////////////////
29 namespace sdr
31 namespace overlay
33 drawinglayer::primitive2d::Primitive2DSequence OverlayPolyPolygonStriped::createOverlayObjectPrimitive2DSequence()
35 drawinglayer::primitive2d::Primitive2DSequence aRetval;
37 if(getOverlayManager())
39 const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
40 const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
41 const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
43 const drawinglayer::primitive2d::Primitive2DReference aReference(
44 new drawinglayer::primitive2d::PolyPolygonMarkerPrimitive2D(
45 getPolyPolygon(),
46 aRGBColorA,
47 aRGBColorB,
48 fStripeLengthPixel));
50 aRetval = drawinglayer::primitive2d::Primitive2DSequence(&aReference, 1);
53 return aRetval;
56 void OverlayPolyPolygonStriped::stripeDefinitionHasChanged()
58 // react on OverlayManager's stripe definition change
59 objectChange();
62 OverlayPolyPolygonStriped::OverlayPolyPolygonStriped(
63 const basegfx::B2DPolyPolygon& rPolyPolygon)
64 : OverlayObject(Color(COL_BLACK)),
65 maPolyPolygon(rPolyPolygon)
69 OverlayPolyPolygonStriped::~OverlayPolyPolygonStriped()
72 } // end of namespace overlay
73 } // end of namespace sdr
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */