ADTF Display Toolbox
Loading...
Searching...
No Matches
gcl.h
Go to the documentation of this file.
1
7#pragma once
8#include <adtf_base.h>
12
13namespace adtf
14{
15
16namespace disptb
17{
18
19namespace graphicslib
20{
21
22namespace dengar
23{
24
29{
30public:
40
45 {
47 tUInt32 nEventId;
49 tInt32 i32Param1;
51 tInt32 i32Param2;
53 tVoid* pvData;
56 };
57};
58
59//*************************************************************************************************
60
61namespace detail
62{
63//*************************************************************************************************
64constexpr tInt g_nGCL_ItemSize = sizeof(tUInt32);
65constexpr tInt g_nGCL_CommandSize = g_nGCL_ItemSize;
66constexpr tInt g_nGCL_ParamSize = g_nGCL_ItemSize;
67constexpr tInt g_nGCL_ExtraSize = g_nGCL_ItemSize;
68
69#define GCL_SIZE(nParams, nExtra) (1 + (nParams) + (nExtra))
70#define GCL_SIZE_DYNAMIC() (0)
71
72//*************************************************************************************************
73constexpr tGCLCommandDescriptor g_aGCLCommandTable[] = {
74 {GCL_CMD_END, GCL_SIZE(0, 0), "end"},
75 {GCL_CMD_INT, GCL_SIZE(0, 0), "int"},
76 {GCL_CMD_FLOAT, GCL_SIZE(0, 0), "float"},
77 {GCL_CMD_CLEAR, GCL_SIZE(0, 0), "clear"},
78 {GCL_CMD_FGCOL, GCL_SIZE(1, 0), "fgcol"},
79 {GCL_CMD_BGCOL, GCL_SIZE(1, 0), "bgcol"},
80 {GCL_CMD_MOVETO, GCL_SIZE(2, 0), "moveto"},
81 {GCL_CMD_DRAWPIXEL, GCL_SIZE(2, 0), "drawpixel"},
82 {GCL_CMD_DRAWLINE, GCL_SIZE(4, 0), "drawline"},
83 {GCL_CMD_LINETO, GCL_SIZE(2, 0), "lineto"},
84 {GCL_CMD_DRAWRECT, GCL_SIZE(4, 0), "drawrect"},
85 {GCL_CMD_FILLRECT, GCL_SIZE(4, 0), "fillrect"},
86 {GCL_CMD_TEXT, GCL_SIZE_DYNAMIC(), "text"},
87 {GCL_CMD_LINEWIDTH, GCL_SIZE(1, 0), "linewidth"},
88 {GCL_CMD_DRAWCIRCLE, GCL_SIZE(3, 0), "drawcircle"},
89 {GCL_CMD_FILLCIRCLE, GCL_SIZE(3, 0), "fillcircle"},
90 {GCL_CMD_LINEPATTERN, GCL_SIZE(2, 0), "linepattern"},
91 {GCL_CMD_ALPHA, GCL_SIZE(1, 0), "alpha"},
92 {GCL_CMD_DRAWPOLYGON, GCL_SIZE_DYNAMIC(), "drawpolygon"},
93 {GCL_CMD_FILLPOLYGON, GCL_SIZE_DYNAMIC(), "fillpolygon"},
94 {GCL_CMD_TEXT_SIZE_SMALL, GCL_SIZE(0, 0), "textsizesmall"},
95 {GCL_CMD_TEXT_SIZE_NORMAL, GCL_SIZE(0, 0), "textsizenormal"},
96 {GCL_CMD_TEXT_SIZE_HUGE, GCL_SIZE(0, 0), "textsizehuge"},
97};
98} // namespace detail
99
101class cGCLProcessor : public ucom::catwo::object<ucom::IEventSource, ucom::cEventSource>
102{
106 A_UTILS_D(cGCLProcessor)
107
108protected:
110 tHandle m_hCanvas;
112
116
117 tFloat32 m_fScaleX;
118 tFloat32 m_fScaleY;
119
121
125
126public:
133 {
134 m_pCanvas = NULL;
135 m_hCanvas = NULL;
136 m_bInitialized = tFalse;
137 m_nCurrentX = 0;
138 m_nCurrentY = 0;
139 m_bFormatFloat = tFalse;
140 m_fScaleX = 1.0f;
141 m_fScaleY = 1.0f;
142 m_bFlipRGB = tFalse;
143 m_pSmallFont = NULL;
144 m_pNormalFont = NULL;
145 m_pHugeFont = NULL;
146 }
147
154 {
155 }
156
163 tResult Create()
164 {
165 RETURN_NOERROR;
166 }
167
174 tResult Release()
175 {
176 m_bInitialized = tFalse;
177 RETURN_NOERROR;
178 }
179
193 tResult Process(ICanvas* pCanvas,
194 tVoid* pCommandBlock,
195 tInt nBlockSize,
196 tUInt nOrigWidth,
197 tUInt nOrigHeight,
198 cRect sTargetRect,
199 tBool bFlipRGB = tFalse)
200 {
201 RETURN_IF_POINTER_NULL(pCanvas);
202 RETURN_IF_POINTER_NULL(pCommandBlock);
203
204 m_pCanvas = pCanvas;
205 m_bFlipRGB = bFlipRGB;
206 return ProcessBlock(pCommandBlock, nBlockSize, nOrigWidth, nOrigHeight, sTargetRect);
207 }
208
222 tResult Process(tHandle hCanvas,
223 tVoid* pCommandBlock,
224 tInt nBlockSize,
225 tUInt nOrigWidth,
226 tUInt nOrigHeight,
227 cRect sTargetRect,
228 tBool bFlipRGB = tFalse)
229 {
230 RETURN_IF_POINTER_NULL(hCanvas);
231 RETURN_IF_POINTER_NULL(pCommandBlock);
232
233 m_hCanvas = hCanvas;
234 m_bFlipRGB = bFlipRGB;
235
236#ifdef WIN32
237 static HPEN hPen = NULL;
238
239 if (!m_bInitialized)
240 {
241 m_bInitialized = tTrue;
242
243 hPen = CreatePen(PS_SOLID, 0, RGB(255, 0, 0));
244 }
245
246 HPEN hOldPen = nullptr;
247 if (hPen)
248 {
249 hOldPen = (HPEN) SelectObject((HDC) m_hCanvas, hPen);
250 }
251#endif // WIN32
252
253 tResult nResult = ProcessBlock(pCommandBlock, nBlockSize, nOrigWidth, nOrigHeight, sTargetRect);
254
255#ifdef WIN32
256 if (hOldPen)
257 {
258 SelectObject((HDC) m_hCanvas, hOldPen);
259 }
260#endif // WIN32
261
262 return nResult;
263 }
264
273 tResult SetFonts(IFont* pSmallFont, IFont* pNormalFont, IFont* pHugeFont)
274 {
275 RETURN_IF_POINTER_NULL(pSmallFont);
276 RETURN_IF_POINTER_NULL(pNormalFont);
277 RETURN_IF_POINTER_NULL(pHugeFont);
278
279 m_pSmallFont = pSmallFont;
280 m_pNormalFont = pNormalFont;
281 m_pHugeFont = pHugeFont;
282 RETURN_NOERROR;
283 }
284
285protected:
297 tResult ProcessBlock(tVoid* pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect)
298 {
299 RETURN_IF_POINTER_NULL(pCommandBlock);
300 RETURN_IF_POINTER_NULL(m_pCanvas);
301
302 tUInt32* pData = (tUInt32*) pCommandBlock;
303 tUInt32* pEndOfData = pData + (nBlockSize / detail::g_nGCL_ItemSize - 1);
304
305 tUInt32 nIdentifier;
306 tUInt32 nMaxIdentifier = sizeof(detail::g_aGCLCommandTable) / sizeof(detail::g_aGCLCommandTable[0]);
307
308 CalcScale(nOrigWidth, nOrigHeight, sTargetRect);
309
310 tInt nJump;
311
312 while (pData < pEndOfData)
313 {
314 nIdentifier = *pData;
315 if (nIdentifier == GCL_CMD_END)
316 {
317 break;
318 }
319 else if (nIdentifier >= nMaxIdentifier)
320 {
321 RETURN_ERROR(ERR_INVALID_ARG);
322 }
323
324 const tGCLCommandDescriptor* pCmd = &detail::g_aGCLCommandTable[nIdentifier];
325 tBool bFormatFloat = m_bFormatFloat;
326
327 RETURN_IF_FAILED(ProcessCommand(pCmd, pData + 1, nJump, sTargetRect));
328
329 // if this flag has changed, the scaling must be recalculated
330 if (m_bFormatFloat != bFormatFloat)
331 {
332 CalcScale(nOrigWidth, nOrigHeight, sTargetRect);
333 }
334
335 if (nJump == 0)
336 {
337 pData += pCmd->nSize; // DWORD-aligned jumps!!
338 }
339 else
340 {
341 pData += nJump;
342 }
343 }
344
345 m_pCanvas = NULL;
346
347 RETURN_NOERROR;
348 }
349
360 tResult ProcessCommand(const tGCLCommandDescriptor* pCmd, tUInt32* pParam, tInt& nJump, cRect sTargetRect)
361 {
362 nJump = 0;
363 ICanvas* pCanvas = m_pCanvas; // is already checked in ProcessBlock
364
365 tFloat32* pFloatParam = (tFloat32*) pParam;
366 tInt32* pCoordParam = (tInt32*) pParam;
367
368 switch (pCmd->nId)
369 {
370 case GCL_CMD_END:
371 {
372 break;
373 }
374
375 case GCL_CMD_INT:
376 {
377 m_bFormatFloat = tFalse;
378 break;
379 }
380
381 case GCL_CMD_FLOAT:
382 {
383 m_bFormatFloat = tTrue;
384 break;
385 }
386
388 {
389 pCanvas->Font(m_pSmallFont);
390 break;
391 }
393 {
394 pCanvas->Font(m_pNormalFont);
395 break;
396 }
398 {
399 pCanvas->Font(m_pHugeFont);
400 break;
401 }
402
403 case GCL_CMD_CLEAR:
404 {
405 pCanvas->Clear();
406
409 sEvent.i32Param1 = 0;
410 sEvent.i32Param2 = 0;
411 sEvent.pvData = pCanvas;
412 sEvent.szDataLength = 0;
413 FireEvent(&sEvent);
414 break;
415 }
416
417 case GCL_CMD_FGCOL:
418 {
419 if (m_bFlipRGB)
420 {
421 pCanvas->Color(((tUInt8*) (pParam))[2], ((tUInt8*) (pParam))[1], ((tUInt8*) (pParam))[0],
422 ((tUInt8*) (pParam))[3]);
423 }
424 else
425 {
426 pCanvas->Color(((tUInt8*) (pParam))[0], ((tUInt8*) (pParam))[1], ((tUInt8*) (pParam))[2],
427 ((tUInt8*) (pParam))[3]);
428 }
429 break;
430 }
431
432 case GCL_CMD_BGCOL:
433 {
434 if (m_bFlipRGB)
435 {
436 pCanvas->BgColor(((tUInt8*) (pParam))[2], ((tUInt8*) (pParam))[1], ((tUInt8*) (pParam))[0],
437 ((tUInt8*) (pParam))[3]);
438 }
439 else
440 {
441 pCanvas->BgColor(((tUInt8*) (pParam))[0], ((tUInt8*) (pParam))[1], ((tUInt8*) (pParam))[2],
442 ((tUInt8*) (pParam))[3]);
443 }
444 break;
445 }
446
447 case GCL_CMD_ALPHA:
448 {
449 if (pParam[0] != 0)
450 {
451 pCanvas->EnableAlpha();
452 }
453 else
454 {
455 pCanvas->DisableAlpha();
456 }
457 break;
458 }
459
460 case GCL_CMD_MOVETO:
461 {
462 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
463 break;
464 }
465
466 case GCL_CMD_LINETO:
467 {
468 tInt nParamX = 0, nParamY = 0;
469 GetCoords(pParam, sTargetRect, nParamX, nParamY);
470
471 pCanvas->DrawLine(m_nCurrentX, m_nCurrentY, nParamX, nParamY);
472
473 m_nCurrentX = nParamX;
474 m_nCurrentY = nParamY;
475 break;
476 }
477
479 {
480 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
482 break;
483 }
484
485 case GCL_CMD_DRAWLINE:
486 {
487 tInt nParamX = 0, nParamY = 0;
488 GetCoords(pParam, sTargetRect, nParamX, nParamY);
489 GetCoords(pParam + 2, sTargetRect, m_nCurrentX, m_nCurrentY);
490 pCanvas->DrawLine(nParamX, nParamY, m_nCurrentX, m_nCurrentY);
491 break;
492 }
493
494 case GCL_CMD_DRAWRECT:
495 {
496 tInt nParamX = 0, nParamY = 0;
497 GetCoords(pParam, sTargetRect, nParamX, nParamY);
498 GetCoords(pParam + 2, sTargetRect, m_nCurrentX, m_nCurrentY);
499 pCanvas->DrawRect(nParamX, nParamY, m_nCurrentX, m_nCurrentY);
500 break;
501 }
502
503 case GCL_CMD_FILLRECT:
504 {
505 tInt nParamX = 0, nParamY = 0;
506 GetCoords(pParam, sTargetRect, nParamX, nParamY);
507 GetCoords(pParam + 2, sTargetRect, m_nCurrentX, m_nCurrentY);
508 pCanvas->FillRect(nParamX, nParamY, m_nCurrentX, m_nCurrentY);
509 break;
510 }
511
512 case GCL_CMD_TEXT:
513 {
514 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
515
516 tUInt32 nTextLength = pParam[2];
517
518 nJump = 4 + (nTextLength + detail::g_nGCL_ItemSize - 1) / detail::g_nGCL_ItemSize;
519 tChar* strText = (tChar*) (pParam + 3);
520
521 tChar* pBuffer = new tChar[nTextLength + 1];
522 if (pBuffer == NULL)
523 {
524 RETURN_ERROR(ERR_MEMORY);
525 }
526
527 adtf_util::cMemoryBlock::MemCopy(pBuffer, strText, nTextLength);
528 *(pBuffer + nTextLength) = '\0';
529
530 pCanvas->OutputText(m_nCurrentX, m_nCurrentY, pBuffer);
531
532 delete[] pBuffer;
533 break;
534 }
535
537 {
538 tUInt32 nLineWidth = pParam[0];
539 pCanvas->LineWidth(nLineWidth);
540 break;
541 }
542
544 {
545 tUInt16 nLinePattern = (tUInt16) pParam[0];
546 tInt nFactor = pParam[1];
547 pCanvas->LinePattern(nLinePattern, nFactor);
548 break;
549 }
550
552 {
553 tInt32 nRadiusX = 0;
554 tInt32 nRadiusY = 0;
555
556 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
557
558 if (m_bFormatFloat)
559 {
560 nRadiusY = nRadiusX = (tInt) ((pFloatParam[2] * m_fScaleX) + 0.5);
561 }
562 else
563 {
564 nRadiusY = nRadiusX = (tInt) ((pCoordParam[2] * m_fScaleX) + 0.5);
565 }
566
567 // this makes the parameter the diameter and not the radius.
568 pCanvas->DrawCircle((tInt) (m_nCurrentX - nRadiusX / 2), m_nCurrentY - nRadiusY / 2,
569 m_nCurrentX + nRadiusX / 2, m_nCurrentY + nRadiusY / 2);
570 break;
571 }
572
574 {
575 tInt32 nRadiusX = 0;
576 tInt32 nRadiusY = 0;
577
578 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
579
580 if (m_bFormatFloat)
581 {
582 nRadiusY = nRadiusX = (tInt) ((pFloatParam[2] * m_fScaleX) + 0.5);
583 }
584 else
585 {
586 nRadiusY = nRadiusX = (tInt) ((pCoordParam[2] * m_fScaleX) + 0.5);
587 }
588 // this makes the parameter the diameter and not the radius.
589 pCanvas->FillCircle((tInt) (m_nCurrentX - nRadiusX / 2), m_nCurrentY - nRadiusY / 2,
590 m_nCurrentX + nRadiusX / 2, m_nCurrentY + nRadiusY / 2);
591 break;
592 }
593
595 {
596 tInt nParamCount = *pParam++;
597 if (nParamCount == 0 || ((nParamCount & 1) == 1))
598 {
599 RETURN_ERROR(ERR_INVALID_ARG);
600 }
601 nParamCount /= 2;
602
603 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
604 pParam += 2;
605 tInt nStartX = m_nCurrentX;
606 tInt nStartY = m_nCurrentY;
607
608 for (tInt i = 1; i < nParamCount; i++)
609 {
610 tInt nParamX = 0, nParamY = 0;
611 GetCoords(pParam, sTargetRect, nParamX, nParamY);
612 pCanvas->DrawLine(m_nCurrentX, m_nCurrentY, nParamX, nParamY);
613 m_nCurrentX = nParamX;
614 m_nCurrentY = nParamY;
615 pParam += 2;
616 }
617
618 pCanvas->DrawLine(m_nCurrentX, m_nCurrentY, nStartX, nStartY);
619 nJump += nParamCount * 2 + 2;
620 break;
621 }
622
624 {
625 tInt nParamCount = *pParam++;
626 if (nParamCount == 0 || ((nParamCount & 1) == 1))
627 {
628 RETURN_ERROR(ERR_INVALID_ARG);
629 }
630 nParamCount /= 2;
631
632 std::vector<IPoint*> vPoints;
633
634 for (tInt i = 0; i < nParamCount; i++)
635 {
636 GetCoords(pParam, sTargetRect, m_nCurrentX, m_nCurrentY);
637 vPoints.push_back((IPoint*) new cPoint(m_nCurrentX, m_nCurrentY));
638 pParam += 2;
639 }
640
641 pCanvas->FillPolygon(&vPoints.at(0), static_cast<tInt>(vPoints.size()));
642
643 for (tUInt i = 0; i < vPoints.size(); i++)
644 {
645 vPoints[i]->Release();
646 }
647 nJump += nParamCount * 2 + 2;
648 break;
649 }
650
651 default:
652 {
653 break;
654 }
655 }
656
657 RETURN_NOERROR;
658 }
659
670 tResult CalcScale(tUInt nOrigWidth, tUInt nOrigHeight, const cRect& sTargetRect)
671 {
672 if (m_bFormatFloat)
673 {
674 // in float mode coordinates [0..1] have to be scaled to current viewport
675 m_fScaleX = (tFloat32) (sTargetRect.m_nRight - sTargetRect.m_nLeft);
676 m_fScaleY = (tFloat32) (sTargetRect.m_nBottom - sTargetRect.m_nTop);
677 }
678 else
679 {
680 if (nOrigWidth != 0 && nOrigHeight != 0)
681 {
682 // in int mode coordinates [0..nOrigWidth] or [0..nOrigHeight] have to be normalized by
683 // original image width and height and then scaled to current viewport
684 m_fScaleX = ((tFloat32) (sTargetRect.m_nRight - sTargetRect.m_nLeft)) / (tFloat32) nOrigWidth;
685 m_fScaleY = ((tFloat32) (sTargetRect.m_nBottom - sTargetRect.m_nTop)) / (tFloat32) nOrigHeight;
686 }
687 else
688 {
689 m_fScaleX = 1.0f;
690 m_fScaleY = 1.0f;
691 }
692 }
693
694 RETURN_NOERROR;
695 }
696
708 tResult GetCoords(const tUInt32* pParam, const cRect& sTargetRect, tInt& x, tInt& y) const
709 {
710 if (m_bFormatFloat)
711 {
712 tFloat32* pFloatParam = (tFloat32*) pParam;
713 x = (tInt) ((pFloatParam[0] * m_fScaleX) + 0.5) + sTargetRect.m_nLeft;
714 y = (tInt) ((pFloatParam[1] * m_fScaleY) + 0.5) + sTargetRect.m_nTop;
715 }
716 else
717 {
718 tInt32* pCoordParam = (tInt32*) pParam;
719 x = (tInt) ((pCoordParam[0] * m_fScaleX) + 0.5) + sTargetRect.m_nLeft;
720 y = (tInt) ((pCoordParam[1] * m_fScaleY) + 0.5) + sTargetRect.m_nTop;
721 }
722 RETURN_NOERROR;
723 }
724};
725
726} // namespace dengar
727
728using dengar::IGCLProcessorEvents;
729using dengar::cGCLProcessor;
730} // namespace graphicslib
731
732} // namespace disptb
733
734} // namespace adtf
735
736//*************************************************************************************************
virtual tVoid Clear()=0
Clears the canvas and all drawings to background color.
virtual tVoid FillCircle(tInt x1, tInt y1, tInt x2, tInt y2)=0
Fills a circle with the current color.
virtual tVoid DrawCircle(tInt x1, tInt y1, tInt x2, tInt y2)=0
Draws a circle.
virtual tVoid DrawPixel(tInt x, tInt y)=0
Draws a pixel at the given position.
virtual tVoid Font(IFont *pFont)=0
Sets the current font for drawing operations.
virtual tVoid OutputText(tInt x, tInt y, const tChar *fmt,...)=0
Sets an text to a given position.
virtual tVoid DrawRect(tInt x1, tInt y1, tInt x2, tInt y2)=0
Draws a rectangle using two given corners.
virtual tVoid FillPolygon(IPoint **ppPoints, tInt nCount)=0
Fills a polygon by the given point array.
virtual tVoid FillRect(tInt x1, tInt y1, tInt x2, tInt y2)=0
Fills a rectangle with the current color.
virtual tVoid DrawLine(tInt x1, tInt y1, tInt x2, tInt y2)=0
Draws a line between two given points.
Default Font handling interface for basic font support.
Class for events of Graphics Command Language.
Definition gcl.h:29
tGCLProcessorEventIds
Event Id enumeration for the tGCLProcessEvent::nEventId.
Definition gcl.h:35
@ GCLPE_Clear
emited when a clear command was processed.
Definition gcl.h:38
virtual tVoid BgColor(const IColor *col)=0
This function sets the current background color to col value.
virtual tVoid EnableAlpha(tBool bAdditiveMode=tFalse) const =0
This function enables the alpha graphics mode.
virtual tVoid DisableAlpha() const =0
This function disables the alpha graphics mode.
virtual tVoid Color(const IColor *col)=0
This function sets the current color to col value.
virtual tVoid LinePattern(tUInt16 ui16Pattern, tInt nFactor=1)=0
This function adjusts the Line Style for all Lines in drawing operations.
virtual tVoid LineWidth(tFloat64 fWidth)=0
This function sets the current line width to the fWidth value.
tResult SetFonts(IFont *pSmallFont, IFont *pNormalFont, IFont *pHugeFont)
Sets small, normal and huge font for the GCL_CMD_Text Command.
Definition gcl.h:273
tResult CalcScale(tUInt nOrigWidth, tUInt nOrigHeight, const cRect &sTargetRect)
Calculate the current scaling factor and sets the members m_fScaleX and m_fScaleY.
Definition gcl.h:670
tBool m_bFormatFloat
Use integer (false) or floating-point (true) coordinates.
Definition gcl.h:115
tResult Create()
Create GCLProcessor.
Definition gcl.h:163
tResult ProcessBlock(tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect)
Process command block.
Definition gcl.h:297
tResult Process(tHandle hCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse)
Process command block on canvas.
Definition gcl.h:222
tResult Process(ICanvas *pCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse)
Process command block on canvas.
Definition gcl.h:193
tBool m_bInitialized
Is GCLProcessor initialized?
Definition gcl.h:111
tFloat32 m_fScaleX
Current scaling factor.
Definition gcl.h:117
tInt m_nCurrentX
Current x coordinate (integer)
Definition gcl.h:113
IFont * m_pSmallFont
Small font for GCL_CMD_Text Command.
Definition gcl.h:122
tResult ProcessCommand(const tGCLCommandDescriptor *pCmd, tUInt32 *pParam, tInt &nJump, cRect sTargetRect)
Process command.
Definition gcl.h:360
tFloat32 m_fScaleY
Current scaling factor.
Definition gcl.h:118
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 ...
Definition gcl.h:708
tInt m_nCurrentY
Current y coordinate (integer)
Definition gcl.h:114
tResult Release()
Release GCLProcessor.
Definition gcl.h:174
tHandle m_hCanvas
Windows canvas handle for output.
Definition gcl.h:110
IFont * m_pHugeFont
Huge font for GCL_CMD_Text Command.
Definition gcl.h:124
tBool m_bFlipRGB
Flag for legacy issues.
Definition gcl.h:120
IFont * m_pNormalFont
Normal font for GCL_CMD_Text Command.
Definition gcl.h:123
ICanvas * m_pCanvas
D-Pointer implementation.
Definition gcl.h:109
tInt m_nRight
right border of the rect
Definition rect.h:40
tInt m_nTop
top border of the rect
Definition rect.h:39
tInt m_nLeft
left border of the rect
Definition rect.h:38
tInt m_nBottom
bottom border of the rect
Definition rect.h:41
Copyright © Audi Electronics Venture GmbH.
@ GCL_CMD_LINEWIDTH
Sets width for line drawing operations.
Definition gcltypes.h:41
@ GCL_CMD_DRAWCIRCLE
Draws a circle at the specified point and with the given diameter.
Definition gcltypes.h:42
@ GCL_CMD_TEXT_SIZE_HUGE
Sets current font to huge font.
Definition gcltypes.h:50
@ GCL_CMD_FLOAT
Switches mode to float coordinates (not supported)
Definition gcltypes.h:27
@ GCL_CMD_TEXT_SIZE_SMALL
Sets current font to small font.
Definition gcltypes.h:48
@ GCL_CMD_DRAWLINE
Draws a line between the specified points.
Definition gcltypes.h:36
@ GCL_CMD_FILLPOLYGON
Fills a polygon.
Definition gcltypes.h:47
@ GCL_CMD_ALPHA
Enable/Disable alpha blending (OpenGL only)
Definition gcltypes.h:45
@ GCL_CMD_TEXT_SIZE_NORMAL
Sets current font to normal font.
Definition gcltypes.h:49
@ GCL_CMD_INT
Switches mode to integer coordinates (not supported)
Definition gcltypes.h:26
@ GCL_CMD_LINEPATTERN
Sets the line pattern (pattern, factor)
Definition gcltypes.h:44
@ GCL_CMD_DRAWPIXEL
Draws a pixel at the specified coordinate.
Definition gcltypes.h:35
@ GCL_CMD_BGCOL
Sets background color.
Definition gcltypes.h:33
@ GCL_CMD_LINETO
Draws a line from the current position to the specified coordinate.
Definition gcltypes.h:37
@ GCL_CMD_FGCOL
Sets foreground color.
Definition gcltypes.h:32
@ GCL_CMD_FILLCIRCLE
Draws a filled circle at the specified point with the given diameter.
Definition gcltypes.h:43
@ GCL_CMD_END
Marks the end of the GCL buffer.
Definition gcltypes.h:25
@ GCL_CMD_DRAWPOLYGON
Draws a polygon (outline)
Definition gcltypes.h:46
@ GCL_CMD_CLEAR
Clears the drawing canvas.
Definition gcltypes.h:28
@ GCL_CMD_FILLRECT
Draws a filled rectangle.
Definition gcltypes.h:39
@ GCL_CMD_MOVETO
Moves the drawing cursor to the specified coordinate.
Definition gcltypes.h:34
@ GCL_CMD_DRAWRECT
Draws a rectangle.
Definition gcltypes.h:38
@ GCL_CMD_TEXT
Generates text output at specified coordinate.
Definition gcltypes.h:40
Copyright © Audi Electronics Venture GmbH.
Namespace for functionality provided by the Display Toolbox.
Main namespace.
Copyright © Audi Electronics Venture GmbH.
Event structure for signal registry events through the ucom::IEventSource interface.
Definition gcl.h:45
tUInt32 nEventId
EventId shown in IGCLProcessorEvents::tGCLProcessorEventIds.
Definition gcl.h:47
tInt32 i32Param2
A event content specific parameter.
Definition gcl.h:51
tSize szDataLength
size of the additional event data.
Definition gcl.h:55
tInt32 i32Param1
A event content specific parameter.
Definition gcl.h:49
tInt nId
ID value from tGCLCommandIdentifier enumeration.
Definition gcltypes.h:62