|
ADTF Display Toolbox
|
Graphics command language processing class. More...
#include <gcl.h>
Public Member Functions | |
| cGCLProcessor () | |
| Constructor. | |
| virtual | ~cGCLProcessor () |
| Destructor. | |
| tResult | Create () |
| Create GCLProcessor. | |
| tResult | Release () |
| Release GCLProcessor. | |
| tResult | Process (ICanvas *pCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse) |
| Process command block on canvas. | |
| tResult | Process (tHandle hCanvas, tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect, tBool bFlipRGB=tFalse) |
| Process command block on canvas. | |
| tResult | SetFonts (IFont *pSmallFont, IFont *pNormalFont, IFont *pHugeFont) |
| Sets small, normal and huge font for the GCL_CMD_Text Command. | |
Protected Member Functions | |
| tResult | ProcessBlock (tVoid *pCommandBlock, tInt nBlockSize, tUInt nOrigWidth, tUInt nOrigHeight, cRect sTargetRect) |
| Process command block. | |
| tResult | ProcessCommand (const tGCLCommandDescriptor *pCmd, tUInt32 *pParam, tInt &nJump, cRect sTargetRect) |
| Process command. | |
| tResult | CalcScale (tUInt nOrigWidth, tUInt nOrigHeight, const cRect &sTargetRect) |
| Calculate the current scaling factor and sets the members m_fScaleX and m_fScaleY. | |
| 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 flag, scales and translates them and writes the result back to x, y. | |
Protected Attributes | |
| ICanvas * | m_pCanvas |
| D-Pointer implementation. | |
| tHandle | m_hCanvas |
| Windows canvas handle for output. | |
| tBool | m_bInitialized |
| Is GCLProcessor initialized? | |
| tInt | m_nCurrentX |
| Current x coordinate (integer) | |
| tInt | m_nCurrentY |
| Current y coordinate (integer) | |
| tBool | m_bFormatFloat |
| Use integer (false) or floating-point (true) coordinates. | |
| tFloat32 | m_fScaleX |
| Current scaling factor. | |
| tFloat32 | m_fScaleY |
| Current scaling factor. | |
| tBool | m_bFlipRGB |
| Flag for legacy issues. | |
| IFont * | m_pSmallFont |
| Small font for GCL_CMD_Text Command. | |
| IFont * | m_pNormalFont |
| Normal font for GCL_CMD_Text Command. | |
| IFont * | m_pHugeFont |
| Huge font for GCL_CMD_Text Command. | |
|
inline |
Constructor.
Definition at line 132 of file gcl.h.
References m_bFlipRGB, m_bFormatFloat, m_bInitialized, m_fScaleX, m_fScaleY, m_hCanvas, m_nCurrentX, m_nCurrentY, m_pCanvas, m_pHugeFont, m_pNormalFont, and m_pSmallFont.
|
inlinevirtual |
|
inlineprotected |
Calculate the current scaling factor and sets the members m_fScaleX and m_fScaleY.
| nOrigWidth | [in] Original width. |
| nOrigHeight | [in] Original height. |
| sTargetRect | [in] Target rectangle. |
Definition at line 670 of file gcl.h.
References m_bFormatFloat, m_fScaleX, m_fScaleY, cRect::m_nBottom, cRect::m_nLeft, cRect::m_nRight, and cRect::m_nTop.
Referenced by ProcessBlock().
|
inline |
|
inlineprotected |
Takes the first two parameters from the array (pParam) converts them depending on the m_bFormatFloat flag, scales and translates them and writes the result back to x, y.
| pParam | [in] Array with parameters where the first two of them are to be calculated |
| sTargetRect | [in] Target rectangle.(used for translation |
| x | [out] converted value from pParam[0] |
| y | [out] converted value from pParam[1] |
Definition at line 708 of file gcl.h.
References m_bFormatFloat, m_fScaleX, m_fScaleY, cRect::m_nLeft, and cRect::m_nTop.
Referenced by ProcessCommand().
|
inline |
Process command block on canvas.
| pCanvas | [in] Canvas to paint on. |
| pCommandBlock | [in] Block with GCL commands. |
| nBlockSize | [in] Size of block. |
| nOrigWidth | [in] Original width. |
| nOrigHeight | [in] Original height. |
| sTargetRect | [in] Target rectangle. |
| bFlipRGB | [in] Flip on process. |
Definition at line 193 of file gcl.h.
References m_bFlipRGB, m_pCanvas, and ProcessBlock().
|
inline |
Process command block on canvas.
| hCanvas | [in] Canvas to paint on. |
| pCommandBlock | [in] Block with GCL commands. |
| nBlockSize | [in] Size of block. |
| nOrigWidth | [in] Original width. |
| nOrigHeight | [in] Original height. |
| sTargetRect | [in] Target rectangle. |
| bFlipRGB | [in] Flip on process. |
Definition at line 222 of file gcl.h.
References m_bFlipRGB, m_bInitialized, m_hCanvas, and ProcessBlock().
|
inlineprotected |
Process command block.
| pCommandBlock | [in] Block with GCL commands. |
| nBlockSize | [in] Size of block. |
| nOrigWidth | [in] Original width. |
| nOrigHeight | [in] Original height. |
| sTargetRect | [in] Target rectangle. |
Definition at line 297 of file gcl.h.
References CalcScale(), m_bFormatFloat, m_pCanvas, tGCLCommandDescriptor::nSize, and ProcessCommand().
|
inlineprotected |
Process command.
| pCmd | [in] GCL command. |
| pParams | [in] Command parameters. |
| nJump | [inout] Internally used to navigate inside the command blocks. |
| sTargetRect | [in] Target rectangle. |
Definition at line 360 of file gcl.h.
References IGraphicsMode::BgColor(), ICanvas::Clear(), IGraphicsMode::Color(), IGraphicsMode::DisableAlpha(), ICanvas::DrawCircle(), ICanvas::DrawLine(), ICanvas::DrawPixel(), ICanvas::DrawRect(), IGraphicsMode::EnableAlpha(), ICanvas::FillCircle(), ICanvas::FillPolygon(), ICanvas::FillRect(), ICanvas::Font(), IGCLProcessorEvents::GCLPE_Clear, GetCoords(), IGCLProcessorEvents::tGCLProcessEvent::i32Param1, IGCLProcessorEvents::tGCLProcessEvent::i32Param2, IGraphicsMode::LinePattern(), IGraphicsMode::LineWidth(), m_bFlipRGB, m_bFormatFloat, m_fScaleX, m_nCurrentX, m_nCurrentY, m_pCanvas, m_pHugeFont, m_pNormalFont, m_pSmallFont, IGCLProcessorEvents::tGCLProcessEvent::nEventId, tGCLCommandDescriptor::nId, ICanvas::OutputText(), IGCLProcessorEvents::tGCLProcessEvent::pvData, and IGCLProcessorEvents::tGCLProcessEvent::szDataLength.
Referenced by ProcessBlock().
|
inline |
Release GCLProcessor.
Definition at line 174 of file gcl.h.
References m_bInitialized.
Sets small, normal and huge font for the GCL_CMD_Text Command.
| pSmallFont | [in] small font |
| pNormalFont | [in] normal font |
| pHugeFont | [in] huge font |
Definition at line 273 of file gcl.h.
References m_pHugeFont, m_pNormalFont, and m_pSmallFont.
|
protected |
Flag for legacy issues.
Definition at line 120 of file gcl.h.
Referenced by cGCLProcessor(), Process(), Process(), and ProcessCommand().
|
protected |
Use integer (false) or floating-point (true) coordinates.
Definition at line 115 of file gcl.h.
Referenced by cGCLProcessor(), CalcScale(), GetCoords(), ProcessBlock(), and ProcessCommand().
|
protected |
Is GCLProcessor initialized?
Definition at line 111 of file gcl.h.
Referenced by cGCLProcessor(), Process(), and Release().
|
protected |
Current scaling factor.
Definition at line 117 of file gcl.h.
Referenced by cGCLProcessor(), CalcScale(), GetCoords(), and ProcessCommand().
|
protected |
Current scaling factor.
Definition at line 118 of file gcl.h.
Referenced by cGCLProcessor(), CalcScale(), and GetCoords().
|
protected |
Windows canvas handle for output.
Definition at line 110 of file gcl.h.
Referenced by cGCLProcessor(), and Process().
|
protected |
Current x coordinate (integer)
Definition at line 113 of file gcl.h.
Referenced by cGCLProcessor(), and ProcessCommand().
|
protected |
Current y coordinate (integer)
Definition at line 114 of file gcl.h.
Referenced by cGCLProcessor(), and ProcessCommand().
|
protected |
D-Pointer implementation.
Canvas for output
Definition at line 109 of file gcl.h.
Referenced by cGCLProcessor(), Process(), ProcessBlock(), and ProcessCommand().
|
protected |
Huge font for GCL_CMD_Text Command.
Definition at line 124 of file gcl.h.
Referenced by cGCLProcessor(), ProcessCommand(), and SetFonts().
|
protected |
Normal font for GCL_CMD_Text Command.
Definition at line 123 of file gcl.h.
Referenced by cGCLProcessor(), ProcessCommand(), and SetFonts().
|
protected |
Small font for GCL_CMD_Text Command.
Definition at line 122 of file gcl.h.
Referenced by cGCLProcessor(), ProcessCommand(), and SetFonts().