ACF $AcfVersion:0$
CLine2dComp.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// ACF includes
7#include <i2d/CLine2d.h>
8
9
10namespace i2d
11{
12
13
18class CLine2dComp: public TObject2dCompWrap<CLine2d>
19{
20public:
22
23 I_BEGIN_COMPONENT(CLine2dComp);
24 I_REGISTER_INTERFACE(CLine2d);
25 I_ASSIGN(m_x1AttrPtr, "X1", "X-Position of start line point", true, 0);
26 I_ASSIGN(m_y1AttrPtr, "Y1", "Y-Position of start line point", true, 0);
27 I_ASSIGN(m_x2AttrPtr, "X2", "X-Position of end line point", true, 0);
28 I_ASSIGN(m_y2AttrPtr, "Y2", "Y-Position of end line point", true, 0);
29 I_END_COMPONENT;
30
31protected:
32 // reimplemented (icomp::CComponentBase)
33 virtual void OnComponentCreated() override;
34
35private:
36 I_ATTR(double, m_x1AttrPtr);
37 I_ATTR(double, m_y1AttrPtr);
38 I_ATTR(double, m_x2AttrPtr);
39 I_ATTR(double, m_y2AttrPtr);
40};
41
42
43} // namespace i2d
44
45
46
47
Implementation of a 2D-line as a component.
Definition CLine2dComp.h:19
TObject2dCompWrap< CLine2d > BaseClass
Definition CLine2dComp.h:21
virtual void OnComponentCreated() override
Definition of a line in 2D-space.
Definition CLine2d.h:25
Base class for all components implementing 2D objects.
Contains the 2D objects.
Definition CAffine2d.h:11