ADTF Display Toolbox
Loading...
Searching...
No Matches
point.h
Go to the documentation of this file.
1
7#pragma once
8
9#include <adtf_base.h>
11
12namespace adtf
13{
14
15namespace disptb
16{
17
18namespace graphicslib
19{
20
21namespace dengar
22{
28class cPoint : public IPoint
29{
30public:
32 tInt x;
34 tInt y;
35
36public:
41 {
42 x = 0;
43 y = 0;
44 }
45
51 cPoint(const IPoint* pPoint)
52 {
53 x = pPoint->GetX();
54 y = pPoint->GetY();
55 }
56
63 cPoint(tInt arg_x, tInt arg_y)
64 {
65 x = arg_x;
66 y = arg_y;
67 }
68
73 tVoid Release()
74 {
75 delete this;
76 }
77
85 tVoid Set(tInt arg_x, tInt arg_y)
86 {
87 x = arg_x;
88 y = arg_y;
89 }
90
98 tVoid Offset(tInt offset_x, tInt offset_y)
99 {
100 x += offset_x;
101 y += offset_y;
102 }
103
109 tInt GetX() const
110 {
111 return x;
112 }
113
120 tVoid SetX(tInt xValue)
121 {
122 x = xValue;
123 }
124
130 tInt GetY() const
131 {
132 return y;
133 }
134
141 tVoid SetY(tInt yValue)
142 {
143 y = yValue;
144 }
145
151 explicit operator IPoint*()
152 {
153 return static_cast<IPoint*>(this);
154 }
155};
156
157} // namespace dengar
158
159using dengar::cPoint;
160} // namespace graphicslib
161
162} // namespace disptb
163
164} // namespace adtf
cPoint()
The Default Constructor, sets x = 0 and y = 0.
Definition point.h:40
virtual tInt GetY() const =0
Return the y value.
virtual tInt GetX() const =0
Returns the x value.
tVoid Release()
Releases this point.
Definition point.h:73
tVoid SetY(tInt yValue)
Sets the y value.
Definition point.h:141
tVoid SetX(tInt xValue)
Sets the x value.
Definition point.h:120
tInt x
the X Position of the Point
Definition point.h:32
cPoint(const IPoint *pPoint)
constructor from IPoint
Definition point.h:51
tVoid Offset(tInt offset_x, tInt offset_y)
Recalculate the given values with the internal coordinates.
Definition point.h:98
tInt y
the Y Position of the Point
Definition point.h:34
cPoint(tInt arg_x, tInt arg_y)
The Constructor, sets the coordinates to the given values.
Definition point.h:63
tInt GetX() const
Returns the x value.
Definition point.h:109
tVoid Set(tInt arg_x, tInt arg_y)
Sets the coordinates to the given values.
Definition point.h:85
cPoint()
The Default Constructor, sets x = 0 and y = 0.
Definition point.h:40
tInt GetY() const
Return the y value.
Definition point.h:130
Namespace for functionality provided by the Display Toolbox.
Main namespace.
Copyright © Audi Electronics Venture GmbH.