LibreOffice Module svx (master)  1
overlaycrosshair.cxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
21 #include <vcl/outdev.hxx>
24 
25 
26 namespace sdr
27 {
28  namespace overlay
29  {
31  {
33 
34  if(getOverlayManager())
35  {
36  const basegfx::BColor aRGBColorA(getOverlayManager()->getStripeColorA().getBColor());
37  const basegfx::BColor aRGBColorB(getOverlayManager()->getStripeColorB().getBColor());
38  const double fStripeLengthPixel(getOverlayManager()->getStripeLengthPixel());
39 
43  aRGBColorA,
44  aRGBColorB,
45  fStripeLengthPixel));
46 
47  aRetval = drawinglayer::primitive2d::Primitive2DContainer { aReference };
48  }
49 
50  return aRetval;
51  }
52 
54  {
55  // react on OverlayManager's stripe definition change
56  objectChange();
57  }
58 
61  {
62  }
63 
65  {
66  }
67  } // end of namespace overlay
68 } // end of namespace sdr
69 
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
OverlayCrosshairStriped(const basegfx::B2DPoint &rBasePos)
constexpr::Color COL_BLACK(0x00, 0x00, 0x00)
OverlayManager * getOverlayManager() const
virtual void stripeDefinitionHasChanged() override
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override
const basegfx::B2DPoint & getBasePosition() const
css::uno::Reference< css::graphic::XPrimitive2D > Primitive2DReference