ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
gcl.h
Go to the documentation of this file.
1 
7 #pragma once
8 #include <adtf_base.h>
12 
13 
14 namespace adtf
15 {
16 
17 namespace disptb
18 {
19 
20 namespace graphicslib
21 {
22 
23 namespace dengar
24 {
25 
26 
31 {
32 public:
37  {
40  GCLPE_Clear = 0
41  };
42 
47  {
49  tUInt32 nEventId;
51  tInt32 i32Param1;
53  tInt32 i32Param2;
55  tVoid* pvData;
57  tSize szDataLength;
58  };
59 };
60 
61 //*************************************************************************************************
63 class cGCLProcessor : public ucom::catwo::object<ucom::IEventSource, ucom::cEventSource>
64 {
69 
70 protected:
72  tHandle m_hCanvas;
74 
75  tInt m_nCurrentX;
76  tInt m_nCurrentY;
78 
79  tFloat32 m_fScaleX;
80  tFloat32 m_fScaleY;
81 
82  tBool m_bFlipRGB;
83 
87 
88 public:
95 
101  virtual ~cGCLProcessor();
102 
109  tResult Create();
110 
117  tResult Release();
118 
132  tResult Process(ICanvas* pCanvas, tVoid* pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight,
133  cRect sTargetRect, tBool bFlipRGB = tFalse);
134 
148  tResult Process(tHandle hCanvas, tVoid* pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight,
149  cRect sTargetRect, tBool bFlipRGB = tFalse);
150 
159  tResult SetFonts(IFont* pSmallFont,
160  IFont* pNormalFont,
161  IFont* pHugeFont);
162 
163 protected:
175  tResult ProcessBlock(tVoid* pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect);
176 
187  tResult ProcessCommand(tGCLCommandDescriptor* pCmd, tUInt32* pParams, tInt& nJump, cRect sTargetRect);
188 
199  tResult CalcScale(tUInt nOrigWidth, tUInt nOrigHeight, const cRect& sTargetRect);
200 
212  tResult GetCoords(const tUInt32* pParam, const cRect& sTargetRect, tInt& x, tInt& y) const;
213 };
214 
215 }
216 
219 }
220 
221 }
222 
223 }
224 
225 //*************************************************************************************************
Default Font handling interface for basic font support.
Class for events of Graphics Command Language.
Definition: gcl.h:31
tGCLProcessorEventIds
Event Id enumeration for the tGCLProcessEvent::nEventId.
Definition: gcl.h:37
@ GCLPE_Clear
emited when a clear command was processed.
Definition: gcl.h:40
Graphics command language processing class.
Definition: gcl.h:64
tResult SetFonts(IFont *pSmallFont, IFont *pNormalFont, IFont *pHugeFont)
Sets small, normal and huge font for the GCL_CMD_Text Command.
tResult CalcScale(tUInt nOrigWidth, tUInt nOrigHeight, const cRect &sTargetRect)
Calculate the current scaling factor and sets the members m_fScaleX and m_fScaleY.
tBool m_bFormatFloat
Use integer (false) or floating-point (true) coordinates.
Definition: gcl.h:77
tResult ProcessBlock(tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect)
Process command block.
tResult Process(tHandle hCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse)
Process command block on canvas.
tResult Process(ICanvas *pCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse)
Process command block on canvas.
tBool m_bInitialized
Is GCLProcessor initialized?
Definition: gcl.h:73
tFloat32 m_fScaleX
Current scaling factor.
Definition: gcl.h:79
tInt m_nCurrentX
Current x coordinate (integer)
Definition: gcl.h:75
IFont * m_pSmallFont
Small font for GCL_CMD_Text Command.
Definition: gcl.h:84
tFloat32 m_fScaleY
Current scaling factor.
Definition: gcl.h:80
tResult GetCoords(const tUInt32 *pParam, const cRect &sTargetRect, tInt &x, tInt &y) const
Takes the first two parameters from the array (pParam) converts them depending on the m_bFormatFloat ...
tInt m_nCurrentY
Current y coordinate (integer)
Definition: gcl.h:76
tResult Release()
Release GCLProcessor.
tHandle m_hCanvas
Windows canvas handle for output.
Definition: gcl.h:72
IFont * m_pHugeFont
Huge font for GCL_CMD_Text Command.
Definition: gcl.h:86
tResult ProcessCommand(tGCLCommandDescriptor *pCmd, tUInt32 *pParams, tInt &nJump, cRect sTargetRect)
Process command.
tBool m_bFlipRGB
Flag for legacy issues.
Definition: gcl.h:82
IFont * m_pNormalFont
Normal font for GCL_CMD_Text Command.
Definition: gcl.h:85
ICanvas * m_pCanvas
Canvas for output.
Definition: gcl.h:71
A_UTILS_D(cGCLProcessor)
D-Pointer implementation.
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
Main namespace.
Copyright © Audi Electronics Venture GmbH.
Event structure for signal registry events through the ucom::IEventSource interface.
Definition: gcl.h:47
tUInt32 nEventId
EventId shown in IGCLProcessorEvents::tGCLProcessorEventIds.
Definition: gcl.h:49
tInt32 i32Param2
A event content specific parameter.
Definition: gcl.h:53
tVoid * pvData
Pointer to additional event data.
Definition: gcl.h:55
tSize szDataLength
size of the additional event data.
Definition: gcl.h:57
tInt32 i32Param1
A event content specific parameter.
Definition: gcl.h:51