ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
drawer.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 #ifdef WIN32
10 #include <windows.h>
11 #endif
12 
13 #include <adtf_filtersdk.h>
14 #include <adtffiltersdk/filter.h>
15 #include <adtf_base.h>
16 
17 
22 
23 namespace adtf
24 {
25 
26 namespace disptb
27 {
28 
29 namespace drawerlib
30 {
31 
32 namespace dengar
33 {
34 
35 
50 class cDrawer : public ucom::catwo::object<filter::ant::cFilter, dengar::IDrawer>
51 {
52  A_UTILS_D(cDrawer)
53 
54 
55 public:
60 
64  virtual ~cDrawer() = default;
65 
70  tResult RegisterProperties();
71 
76  tInt GetZOrder() const;
77 
83  tBool IsVisible() const;
84 
91  virtual tResult Draw(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas);
92 
99  tResult OnDraw(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas);
100 
111  tVoid SetMatrix(tFloat32 fTransX, tFloat32 fTransY,
112  tFloat32 fScaleX, tFloat32 fScaleY,
113  tFloat32 fRotate);
114 
121  tVoid ApplyMatrix(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas);
122 
123 
124 protected:
125 
127  tResult Init(tInitStage eStage) override;
128 
129  tResult Shutdown(tInitStage eStage) override;
131 
132 };
133 
134 }
135 
136 namespace florrum
137 {
138 
153 class cDrawer : public ucom::catwo::object<filter::hollow::cFilter, florrum::IDrawer>
154 {
155  A_UTILS_D(cDrawer)
156 
157 public:
162 
166  virtual ~cDrawer() = default;
167 
172  tInt GetZOrder() const override;
173 
179  tBool IsVisible() const override;
180 
187  virtual tResult Draw(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas) override;
188 
195  tResult OnDraw(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas) override;
196 
207  tVoid SetMatrix(tFloat32 fTransX, tFloat32 fTransY,
208  tFloat32 fScaleX, tFloat32 fScaleY,
209  tFloat32 fRotate);
210 
217  tVoid ApplyMatrix(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas);
218 
225  virtual tResult ContextCreated(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas) override;
226 
234  tResult OnCreateContext(const ucom::ant::iobject_ptr<disptb::graphicslib::dengar::ICanvas>& pCanvas) final;
235 
241  virtual tResult ContextDestroyed() override;
242 
249  tResult OnDestroyContext() final;
250 
251 protected:
253  tResult Init(tInitStage eStage) override;
254 
255  tResult Shutdown(tInitStage eStage) override;
257 
258 };
259 
260 }
261 
262 
263 
264 using florrum::cDrawer;
265 
266 }
267 
268 }
269 
270 }
virtual ~cDrawer()=default
Destructor.
tResult RegisterProperties()
Registers all defined property variables.
virtual tResult Draw(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas)
This method is where the user code defines what is drawn on the canvas.
tBool IsVisible() const
IsVisible() is not the same as IsActive()! If a drawer is invisible all Handlers will be called excep...
tVoid ApplyMatrix(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas)
This method is called before Drawing.
tInt GetZOrder() const
The ZOrder defines the order of drawing the objects, if there are in the same coordinate space level.
tVoid SetMatrix(tFloat32 fTransX, tFloat32 fTransY, tFloat32 fScaleX, tFloat32 fScaleY, tFloat32 fRotate)
SetMatrix sets all parameter for the matrix to use in cDrawer::ApplyMatrix() Draw() don't need them b...
tResult OnDraw(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas)
This method is called from the drawer manager to draw on the give canvas.
tInt GetZOrder() const override
The ZOrder defines the order of drawing the objects, if there are in the same coordinate space level.
virtual ~cDrawer()=default
Destructor.
tResult OnCreateContext(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas) final
This oneshot method is called once when the transition from runlevel 4 to runlevel 5 occurs The use o...
virtual tResult Draw(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas) override
This method is where the user code defines what is drawn on the canvas.
virtual tResult ContextDestroyed() override
This method can be overwritten to define the desired behavior during the OnDestroyContext event.
tVoid ApplyMatrix(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas)
This method is called before Drawing.
tResult OnDraw(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas) override
This method is called from the drawer manager to draw on the give canvas.
tBool IsVisible() const override
IsVisible() is not the same as IsActive()! If a drawer is invisible all Handlers will be called excep...
tResult OnDestroyContext() final
This oneshot method is called once when the transition from runlevel 5 to runlevel 4 occurs The use o...
tVoid SetMatrix(tFloat32 fTransX, tFloat32 fTransY, tFloat32 fScaleX, tFloat32 fScaleY, tFloat32 fRotate)
SetMatrix sets all parameter for the matrix to use in cDrawer::ApplyMatrix() Draw() don't need them b...
virtual tResult ContextCreated(const ucom::ant::iobject_ptr< disptb::graphicslib::dengar::ICanvas > &pCanvas) override
This method can be overwritten to define the desired behavior during the OnCreateContext event.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Main namespace.