ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
cGCLWriter

Helper class for generating graphics command lists. More...

Static Public Member Functions

static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId)
 Stores a GCL command in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tInt n)
 Stores a GCL command with one integer parameter in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tInt x, tInt y)
 Stores a GCL command with two integer parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y)
 Stores a GCL command with two float parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tInt x, tInt y, tInt z)
 Stores a GCL command with three integer parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y, tInt z)
 Stores a GCL command with two float and one integer parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y, tFloat32 radius)
 Stores a GCL command with three float parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tInt x1, tInt y1, tInt x2, tInt y2)
 Stores a GCL command with four integer parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)
 Stores a GCL command with four float parameters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tInt nParamCount, const tUInt32 *pParams)
 Stores a GCL command with an array of tUInt32 in the buffer. More...
 
static tResult StoreData (tUInt32 *&pCommandBlock, tUInt32 nParam)
 Stores one tUInt32 in the buffer. More...
 
static tResult StoreData (tUInt32 *&pCommandBlock, tInt nParamCount, const tUInt32 *pParams)
 Stores an array of tUInt32 in the buffer. More...
 
static tResult StoreData (tUInt32 *&pCommandBlock, tInt nByteCount, const tUInt8 *pData)
 Stores an array of bytes in the buffer. More...
 
static tResult StoreData (tUInt32 *&pCommandBlock, tInt nByteCount, const tChar *pData)
 Stores an array of characters in the buffer. More...
 
static tResult StoreCommand (tUInt32 *&pCommandBlock, tUInt32 nCommandId, tUInt16 nPattern, tInt nFactor)
 Stores a GCL command with one UInt16 and one int parameters in the dynamic memory block. More...
 
static tResult GetDynamicMemoryBlock (IDynamicMemoryBlock *&pCommandBlock)
 Creates and returns a pointer to the IDynamicMemoryBlock interface. More...
 
static tResult FreeDynamicMemoryBlock (IDynamicMemoryBlock *&pCommandBlock)
 Deallocates or frees a dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId)
 Stores a GCL command in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tInt n)
 Stores a GCL command with one integer parameter in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tInt x, tInt y)
 Stores a GCL command with two integer parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y)
 Stores a GCL command with two float parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tInt x, tInt y, tInt z)
 Stores a GCL command with three integer parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y, tInt z)
 Stores a GCL command with two float and one integer parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tFloat32 x, tFloat32 y, tFloat32 radius)
 Stores a GCL command with three float parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tInt x1, tInt y1, tInt x2, tInt y2)
 Stores a GCL command with four integer parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tUInt16 nPattern, tInt nFactor)
 Stores a GCL command with one UInt16 and one int parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)
 Stores a GCL command with four float parameters in the dynamic memory block. More...
 
static tResult StoreCommand (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nCommandId, tInt nParamCount, const tUInt32 *pParams)
 Stores a GCL command with an array of tUInt32 in the dynamic memory block. More...
 
static tResult StoreData (IDynamicMemoryBlock *&pCommandBlock, tUInt32 nParam)
 Stores one tUInt32 in the dynamic memory block. More...
 
static tResult StoreData (IDynamicMemoryBlock *&pCommandBlock, tInt nParamCount, const tUInt32 *pParams)
 Stores an array of tUInt32 in the dynamic memory block. More...
 
static tResult StoreData (IDynamicMemoryBlock *&pCommandBlock, tInt nByteCount, const tUInt8 *pData)
 Stores an array of bytes in the dynamic memory block. More...
 
static tResult StoreData (IDynamicMemoryBlock *&pCommandBlock, tInt nByteCount, const tChar *pData)
 Stores an array of characters in the dynamic memory block. More...
 

Detailed Description

Helper class for generating graphics command lists.

The following commands in the cGCLWriter::StoreCommand() are supported:

Command Description Usage
GCL_CMD_END Marks the end of the GCL buffer cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_END);
GCL_CMD_CLEAR Clears the drawing canvas cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_CLEAR);
GCL_CMD_FGCOL Sets the foreground color. cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FGCOL, 0xFFFF0000);
GCL_CMD_BGCOL Sets background color cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_BGCOL,0xFF000000);
GCL_CMD_MOVETO Moves the drawing cursor to the specified coordinate cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_MOVETO, 42,42);
GCL_CMD_DRAWPIXEL Draws a pixel at the specified coordinate cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_DRAWPIXEL, 42,42);
GCL_CMD_DRAWLINE Draws a line between the specified points cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_DRAWLINE, 0,0, 42,42);
GCL_CMD_LINETO Draws a line from the current position to the specified coordinate cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_LINETO, 42,42);
GCL_CMD_DRAWRECT Draws a rectangle cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_DRAWRECT, 0,0, 42,42);
GCL_CMD_FILLRECT Draws a filled rectangle cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FILLRECT, 0,0, 42,42);
GCL_CMD_TEXT Generates text output at specified coordinate cString strText = "Hello world";
cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_TEXT, 10, 20, strText.GetLength());
cGCLWriter::StoreData(pCommandBlock, strText.GetLength(), strText.GetPtr());
GCL_CMD_LINEWIDTH Sets width for line drawing operations cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_LINEWIDTH, 42);
GCL_CMD_DRAWCIRCLE Draws a circle cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_DRAWCIRCLE, 100, 100, 42);
GCL_CMD_FILLCIRCLE Draws a filled circle cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FILLCIRCLE, 100, 100, 42);
GCL_CMD_INT Default. GCL processor will expect integer values. In this mode only StoreCommand with integer parameters can be used.
GCL_CMD_FLOAT GCL processor will expect floating values. In this mode only StoreCommand with floating parameters can be used.
GCL_CMD_LINEPATTERN Changes the line pattern. First parameter descriptes the pattern (16bit), second parameter defines, how often each bit is repeated
GCL_CMD_ALPHA Enables/Disables alpha blending. If the first parameter is 0, alpha blending is disabled, otherwise it is enabled
GCL_CMD_DRAWPOLYGON Draws the lines around a polygon. The first parameter contains the number of coordinates. Then the points (x,y) will follow.
GCL_CMD_FILLPOLYGON Draws a filled polygon. The first parameter contains the number of coordinates. Then the points (x,y) will follow. Polygons are limited by OpenGL to be convex only.
  • Example without using the dynamic memory block

    static tUInt32 aCommandBlock[1024];
    tUInt32* pCmd = aCommandBlock;

    cGCLWriter::StoreCommand(pCmd, GCL_CMD_FGCOL, cColor(255, 255, 0).GetRGBA());
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_MOVETO, 10, 20);
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_LINETO, 300, 30);
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_FGCOL, cColor(0, 255, 0).GetRGBA());
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_DRAWLINE, 20, 30, 50, 100);
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_FGCOL, cColor(0, 0, 255).GetRGBA());
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_FILLRECT, 50, 100, 200, 190);
    cGCLWriter::StoreCommand(pCmd, GCL_CMD_END);
  • Example using the dynamic memory block

    IDynamicMemoryBlock* pCommandBlock;
    cGCLWriter::GetDynamicMemoryBlock(pCommandBlock);

    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FGCOL, cColor(255, 255, 0).GetRGBA());
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_MOVETO, 10, 20);
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_LINETO, 300, 30);
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FGCOL, cColor(0, 255, 0).GetRGBA());
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_DRAWLINE, 20, 30, 50, 100);
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FGCOL, cColor(0, 0, 255).GetRGBA());
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_FILLRECT, 50, 100, 200, 190);
    cGCLWriter::StoreCommand(pCommandBlock, GCL_CMD_END);

    //...

    cGCLWriter::FreeDynamicMemoryBlock(pCommandBlock);

Definition at line 192 of file gclwriter.h.

Member Function Documentation

◆ FreeDynamicMemoryBlock()

static tResult FreeDynamicMemoryBlock ( IDynamicMemoryBlock *&  pCommandBlock)
static

Deallocates or frees a dynamic memory block.

The FreeDynamicMemoryBlock function deallocates and frees a dynamic memory block that was previously allocated by call to GetDynamicMemoryBlock. After a dynamic memory block has been freed, the pCommandBlock is set to NULL.

Parameters
pCommandBlock[inout] Previously allocated dynamic memory block to be freed.
Return values
ERR_OKThe dynamic memory block has been successfully freed.
ERR_POINTERIf pCommandBlock is NULL, the pointer is ignored and the function returns immediately.

◆ GetDynamicMemoryBlock()

static tResult GetDynamicMemoryBlock ( IDynamicMemoryBlock *&  pCommandBlock)
static

Creates and returns a pointer to the IDynamicMemoryBlock interface.

The GetDynamicMemoryBlock function returns a IDynamicMemoryBlock interface or NULL if there is insufficient memory available.

Parameters
pCommandBlock[inout] Pointer to the IDynamicMemoryBlock interface.
Return values
ERR_OKA new dynamic memory block has been successfully created.
ERR_POINTERInsufficient memory available.
Remarks
Dynamic memory blocks that are no longer required must be freed by calling the FreeDynamicMemoryBlock function.

◆ StoreCommand() [1/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId 
)
static

Stores a GCL command in the dynamic memory block.

Supported GCL commands: GCL_CMD_CLEAR, GCL_CMD_INT, GCL_CMD_FLOAT, GCL_CMD_END

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [2/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y 
)
static

Stores a GCL command with two float parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_MOVETO, GCL_CMD_LINETO, GCL_CMD_DRAWPIXEL

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifie
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [3/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y,
tFloat32  radius 
)
static

Stores a GCL command with three float parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_DRAWCIRCLE, GCL_CMD_FILLCIRCLE

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
radius[in] Circle radius.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [4/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y,
tInt  z 
)
static

Stores a GCL command with two float and one integer parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_TEXT

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
z[in] String length.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [5/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x1,
tFloat32  y1,
tFloat32  x2,
tFloat32  y2 
)
static

Stores a GCL command with four float parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_DRAWLINE, GCL_CMD_DRAWRECT, GCL_CMD_FILLRECT

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x1[in] Specifies the first point x-coordinate.
y1[in] Specifies the first point y-coordinate.
x2[in] Specifies the second point x-coordinate.
y2[in] Specifies the second point y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [6/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tInt  n 
)
static

Stores a GCL command with one integer parameter in the dynamic memory block.

Supported GCL commands: GCL_CMD_FGCOL, GCL_CMD_BGCOL, GCL_CMD_LINEWIDTH

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
n[in] Integer parameter. The meaning depends on command identifier.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [7/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tInt  nParamCount,
const tUInt32 *  pParams 
)
static

Stores a GCL command with an array of tUInt32 in the dynamic memory block.

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
nParamCount[in] Amount of tUInt32 to be stored.
pParams[in] Array of tUInt32.
Return values
ERR_OKArray of tUInt32 has been successfully stored.
ERR_INVALID_ARGIf nParamCount is less than zero.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [8/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x,
tInt  y 
)
static

Stores a GCL command with two integer parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_MOVETO, GCL_CMD_LINETO, GCL_CMD_DRAWPIXEL

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [9/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x,
tInt  y,
tInt  z 
)
static

Stores a GCL command with three integer parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_TEXT, GCL_CMD_DRAWCIRCLE, GCL_CMD_FILLCIRCLE

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
z[in] Integer parameter. The meaning depends on command identifier.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [10/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x1,
tInt  y1,
tInt  x2,
tInt  y2 
)
static

Stores a GCL command with four integer parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_DRAWLINE, GCL_CMD_DRAWRECT, GCL_CMD_FILLRECT

Parameters
pCommandBlock[in,out] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identifier
x1[in] Specifies the first point x-coordinate.
y1[in] Specifies the first point y-coordinate.
x2[in] Specifies the second point x-coordinate.
y2[in] Specifies the second point y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [11/22]

static tResult StoreCommand ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nCommandId,
tUInt16  nPattern,
tInt  nFactor 
)
static

Stores a GCL command with one UInt16 and one int parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_LINEPATTERN

Parameters
pCommandBlock[in,out] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identi
nPattern[in] Specifies the line pattern.
nFactor[in] Specifies the factor.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [12/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId 
)
static

Stores a GCL command in the buffer.

Supported GCL commands: GCL_CMD_CLEAR, GCL_CMD_INT, GCL_CMD_FLOAT, GCL_CMD_END
Required buffer size: 4 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [13/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y 
)
static

Stores a GCL command with two float parameters in the buffer.

Supported GCL commands: GCL_CMD_MOVETO, GCL_CMD_LINETO, GCL_CMD_DRAWPIXEL
Required buffer size: 12 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [14/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y,
tFloat32  radius 
)
static

Stores a GCL command with three float parameters in the buffer.

Supported GCL commands: GCL_CMD_DRAWCIRCLE, GCL_CMD_FILLCIRCLE
Required buffer size: 16 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
radius[in] Circle radius.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [15/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x,
tFloat32  y,
tInt  z 
)
static

Stores a GCL command with two float and one integer parameters in the buffer.

Supported GCL commands: GCL_CMD_TEXT
Required buffer size: 16 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
z[in] String length.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [16/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tFloat32  x1,
tFloat32  y1,
tFloat32  x2,
tFloat32  y2 
)
static

Stores a GCL command with four float parameters in the buffer.

Supported GCL commands: GCL_CMD_DRAWLINE, GCL_CMD_DRAWRECT, GCL_CMD_FILLRECT
Required buffer size: 24 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x1[in] Specifies the first point x-coordinate.
y1[in] Specifies the first point y-coordinate.
x2[in] Specifies the second point x-coordinate.
y2[in] Specifies the second point y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [17/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tInt  n 
)
static

Stores a GCL command with one integer parameter in the buffer.

Supported GCL commands: GCL_CMD_FGCOL, GCL_CMD_BGCOL, GCL_CMD_LINEWIDTH, GCL_CMD_ALPHA
Required buffer size: 8 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
n[in] Integer parameter. The meaning depends on command identifier.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [18/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tInt  nParamCount,
const tUInt32 *  pParams 
)
static

Stores a GCL command with an array of tUInt32 in the buffer.

Required buffer size: (nParamtCount * 4) + 4 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
nParamCount[in] Amount of tUInt32 to be stored.
pParams[in] Array of tUInt32.
Return values
ERR_OKArray of tUInt32 has been successfully stored.
ERR_INVALID_ARGIf nParamCount is less than zero.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock or pParams set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [19/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x,
tInt  y 
)
static

Stores a GCL command with two integer parameters in the buffer.

Supported GCL commands: GCL_CMD_MOVETO, GCL_CMD_LINETO, GCL_CMD_DRAWPIXEL
Required buffer size: 12 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [20/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x,
tInt  y,
tInt  z 
)
static

Stores a GCL command with three integer parameters in the buffer.

Supported GCL commands: GCL_CMD_TEXT, GCL_CMD_DRAWCIRCLE, GCL_CMD_FILLCIRCLE
Required buffer size: 16 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x[in] Specifies the x-coordinate.
y[in] Specifies the y-coordinate.
z[in] Integer parameter. The meaning depends on command identifier.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [21/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tInt  x1,
tInt  y1,
tInt  x2,
tInt  y2 
)
static

Stores a GCL command with four integer parameters in the buffer.

Supported GCL commands: GCL_CMD_DRAWLINE, GCL_CMD_DRAWRECT, GCL_CMD_FILLRECT
Required buffer size: 24 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nCommandId[in] GCL Command identifier
x1[in] Specifies the first point x-coordinate.
y1[in] Specifies the first point y-coordinate.
x2[in] Specifies the second point x-coordinate.
y2[in] Specifies the second point y-coordinate.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreCommand() [22/22]

static tResult StoreCommand ( tUInt32 *&  pCommandBlock,
tUInt32  nCommandId,
tUInt16  nPattern,
tInt  nFactor 
)
static

Stores a GCL command with one UInt16 and one int parameters in the dynamic memory block.

Supported GCL commands: GCL_CMD_LINEPATTERN

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nCommandId[in] GCL Command identi
nPattern[in] Specifies the line pattern.
nFactor[in] Specifies the factor.
Returns
ERR_OK The GCL command has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreData() [1/8]

static tResult StoreData ( IDynamicMemoryBlock *&  pCommandBlock,
tInt  nByteCount,
const tChar *  pData 
)
static

Stores an array of characters in the dynamic memory block.

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nByteCount[in] Amount of characters to be stored.
pData[in] Array of characters.
Return values
ERR_OKArray of characters has been successfully stored.
ERR_INVALID_ARGIf nByteCount is less than zero.
Remarks
In Debug builds with pCommandBlock or pData set to NULL the application terminates with an assertion failure.

◆ StoreData() [2/8]

static tResult StoreData ( IDynamicMemoryBlock *&  pCommandBlock,
tInt  nByteCount,
const tUInt8 *  pData 
)
static

Stores an array of bytes in the dynamic memory block.

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nByteCount[in] Amount of bytes to be stored.
pData[in] Array of bytes.
Return values
ERR_OKArray of bytes has been successfully stored.
ERR_INVALID_ARGIf nByteCount is less than zero.
Remarks
In Debug builds with pCommandBlock or pData set to NULL the application terminates with an assertion failure.

◆ StoreData() [3/8]

static tResult StoreData ( IDynamicMemoryBlock *&  pCommandBlock,
tInt  nParamCount,
const tUInt32 *  pParams 
)
static

Stores an array of tUInt32 in the dynamic memory block.

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nParamCount[in] Amount of tUInt32 to be stored.
pParams[in] Array of tUInt32.
Return values
ERR_OKArray of tUInt32 has been successfully stored.
ERR_INVALID_ARGIf nParamCount is less than zero.
Remarks
In Debug builds with pCommandBlock or pParams set to NULL the application terminates with an assertion failure.

◆ StoreData() [4/8]

static tResult StoreData ( IDynamicMemoryBlock *&  pCommandBlock,
tUInt32  nParam 
)
static

Stores one tUInt32 in the dynamic memory block.

Parameters
pCommandBlock[inout] Pointer to the dynamic memory block.
nParam[in] tUInt32 to be stored.
Returns
ERR_OK tUInt32 has been successfully stored.
Remarks
In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.

◆ StoreData() [5/8]

static tResult StoreData ( tUInt32 *&  pCommandBlock,
tInt  nByteCount,
const tChar *  pData 
)
static

Stores an array of characters in the buffer.

Required buffer size: nByteCount bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nByteCount[in] Amount of characters to be stored.
pData[in] Array of characters.
Return values
ERR_OKArray of characters has been successfully stored.
ERR_INVALID_ARGIf nByteCount is less than zero.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock or pData set to NULL the application terminates with an assertion failure.

◆ StoreData() [6/8]

static tResult StoreData ( tUInt32 *&  pCommandBlock,
tInt  nByteCount,
const tUInt8 *  pData 
)
static

Stores an array of bytes in the buffer.

Required buffer size: nByteCount bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nByteCount[in] Amount of bytes to be stored.
pData[in] Array of bytes.
Return values
ERR_OKArray of bytes has been successfully stored.
ERR_INVALID_ARGIf nByteCount is less than zero.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlockor pData set to NULL the application terminates with an assertion failure.

◆ StoreData() [7/8]

static tResult StoreData ( tUInt32 *&  pCommandBlock,
tInt  nParamCount,
const tUInt32 *  pParams 
)
static

Stores an array of tUInt32 in the buffer.

Required buffer size: nParamtCount * 4 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nParamCount[in] Amount of tUInt32 to be stored.
pParams[in] Array of tUInt32.
Return values
ERR_OKArray of tUInt32 has been successfully stored.
ERR_INVALID_ARGIf nParamCount is less than zero.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock or pParam set to NULL the application terminates with an assertion failure.

◆ StoreData() [8/8]

static tResult StoreData ( tUInt32 *&  pCommandBlock,
tUInt32  nParam 
)
static

Stores one tUInt32 in the buffer.

Required buffer size: 4 bytes.

Parameters
pCommandBlock[inout] Pointer to the buffer.
nParam[in] tUInt32 to be stored.
Returns
ERR_OK tUInt32 has been successfully stored.
Remarks
To prevent buffer overflows make sure that the buffer is large enough! In Debug builds with pCommandBlock set to NULL the application terminates with an assertion failure.