LibreOffice Module svx (master)
1
svx
source
sdr
overlay
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
20
#include <
sdr/overlay/overlaycrosshair.hxx
>
21
#include <
sdr/overlay/overlaytools.hxx
>
22
#include <
svx/sdr/overlay/overlaymanager.hxx
>
23
24
25
namespace
sdr::overlay
26
{
27
drawinglayer::primitive2d::Primitive2DContainer
OverlayCrosshairStriped::createOverlayObjectPrimitive2DSequence
()
28
{
29
drawinglayer::primitive2d::Primitive2DContainer
aRetval;
30
31
if
(
getOverlayManager
())
32
{
33
const
basegfx::BColor
aRGBColorA(
getOverlayManager
()->getStripeColorA().getBColor());
34
const
basegfx::BColor
aRGBColorB(
getOverlayManager
()->getStripeColorB().getBColor());
35
const
double
fStripeLengthPixel(
getOverlayManager
()->getStripeLengthPixel());
36
37
const
drawinglayer::primitive2d::Primitive2DReference
aReference(
38
new
drawinglayer::primitive2d::OverlayCrosshairPrimitive
(
39
getBasePosition
(),
40
aRGBColorA,
41
aRGBColorB,
42
fStripeLengthPixel));
43
44
aRetval =
drawinglayer::primitive2d::Primitive2DContainer
{ aReference };
45
}
46
47
return
aRetval;
48
}
49
50
void
OverlayCrosshairStriped::stripeDefinitionHasChanged
()
51
{
52
// react on OverlayManager's stripe definition change
53
objectChange
();
54
}
55
56
OverlayCrosshairStriped::OverlayCrosshairStriped
(
const
basegfx::B2DPoint
& rBasePos)
57
:
OverlayObjectWithBasePosition
(rBasePos,
COL_BLACK
)
58
{
59
}
60
61
OverlayCrosshairStriped::~OverlayCrosshairStriped
()
62
{
63
}
64
65
}
// end of namespace
66
67
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
basegfx::B2DPoint
basegfx::BColor
drawinglayer::primitive2d::OverlayCrosshairPrimitive
Definition:
overlaytools.hxx:117
drawinglayer::primitive2d::Primitive2DContainer
rtl::Reference
sdr::overlay::OverlayCrosshairStriped::stripeDefinitionHasChanged
virtual void stripeDefinitionHasChanged() override
Definition:
overlaycrosshair.cxx:50
sdr::overlay::OverlayCrosshairStriped::OverlayCrosshairStriped
OverlayCrosshairStriped(const basegfx::B2DPoint &rBasePos)
Definition:
overlaycrosshair.cxx:56
sdr::overlay::OverlayCrosshairStriped::~OverlayCrosshairStriped
virtual ~OverlayCrosshairStriped() override
Definition:
overlaycrosshair.cxx:61
sdr::overlay::OverlayCrosshairStriped::createOverlayObjectPrimitive2DSequence
virtual drawinglayer::primitive2d::Primitive2DContainer createOverlayObjectPrimitive2DSequence() override
Definition:
overlaycrosshair.cxx:27
sdr::overlay::OverlayObjectWithBasePosition
Definition:
overlayobject.hxx:188
sdr::overlay::OverlayObjectWithBasePosition::getBasePosition
const basegfx::B2DPoint & getBasePosition() const
Definition:
overlayobject.hxx:198
sdr::overlay::OverlayObject::objectChange
void objectChange()
Definition:
overlayobject.cxx:30
sdr::overlay::OverlayObject::getOverlayManager
OverlayManager * getOverlayManager() const
Definition:
overlayobject.hxx:133
COL_BLACK
constexpr ::Color COL_BLACK(0x00, 0x00, 0x00)
sdr::overlay
overlaycrosshair.hxx
overlaymanager.hxx
overlaytools.hxx
Generated on Sun Jul 30 2023 04:28:13 for LibreOffice Module svx (master) by
1.9.3