ADTF_DISPLAY_TOOLBOX  3.8.0 (ADTF 3.14.3)
IGraphicsModeabstract

Graphics mode interface for common graphic support. More...

Inheritance diagram for IGraphicsMode:
[legend]

Public Types

enum  tMode {
  MODE_DrawPoints , MODE_DrawLines , MODE_DrawLineStrip , MODE_DrawLineLoop ,
  MODE_DrawTriangles , MODE_DrawTriangleStrip , MODE_DrawTriangleFan , MODE_DrawQuads ,
  MODE_DrawQuadStrip , MODE_DrawPolygon
}
 enumeration for the supported modes. More...
 
enum  tFeature {
  FEATURE_AlphaBlending , FEATURE_Antialiasing , FEATURE_Lighting , FEATURE_DepthBuffer ,
  FEATURE_BackFaceCulling , FEATURE_CommandLists , FEATURE_HardwareAcceleration
}
 This enumeration enables / disables or describes the features for the graphics mode. More...
 

Public Member Functions

virtual ~IGraphicsMode ()
 virtual destructor to ensure proper cleanup.
 
virtual tBool IsSupported (tFeature nFeatureId) const =0
 This function returns if the features shown in tFeature is supported. More...
 
virtual tVoid EnableAlpha (tBool bAdditiveMode=tFalse) const =0
 This function enables the alpha graphics mode. More...
 
virtual tVoid DisableAlpha () const =0
 This function disables the alpha graphics mode. More...
 
virtual tVoid EnableAntialiasing () const =0
 This function enables the anti aliasing if feature is supported. More...
 
virtual tVoid DisableAntialiasing () const =0
 This function disables the anti aliasing. More...
 
virtual tVoid EnableLighting () const =0
 This function enables the lighting if feature is supported. More...
 
virtual tVoid DisableLighting () const =0
 This function disables the lighting. More...
 
virtual tVoid EnableDepthBuffer () const =0
 This function enables the depth buffer if feature is supported. More...
 
virtual tVoid DisableDepthBuffer () const =0
 This function disables the depth buffer. More...
 
virtual tVoid EnableBackFaceCulling () const =0
 This function enables the back face culling if supported. More...
 
virtual tVoid DisableBackFaceCulling () const =0
 This function disables the back face culling. More...
 
virtual tVoid LineWidth (tFloat64 fWidth)=0
 This function sets the current line width to the fWidth value. More...
 
virtual tVoid LinePattern (tUInt16 ui16Pattern, tInt nFactor=1)=0
 This function adjusts the Line Style for all Lines in drawing operations. More...
 
virtual tVoid Color (const IColor *col)=0
 This function sets the current color to col value. More...
 
virtual tVoid Color (tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha=255)=0
 This function sets the current color. More...
 
virtual tVoid Color (tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha=255)=0
 This function sets the current color. More...
 
virtual tVoid Color (tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha=1.0)=0
 This function sets the current color. More...
 
virtual tVoid BgColor (const IColor *col)=0
 This function sets the current background color to col value. More...
 
virtual tVoid BgColor (tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha=0)=0
 This function sets the current background color to col value. More...
 
virtual tVoid BgColor (tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha=0)=0
 This function sets the current background color to col value. More...
 
virtual tVoid BgColor (tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha=0.0)=0
 This function sets the current background color to col value. More...
 
virtual tVoid Begin (tMode eMode)=0
 Start graphics command. More...
 
virtual tVoid Coord (tInt x, tInt y)=0
 Set the context to the given coordinates. More...
 
virtual tVoid Coord (tFloat32 x, tFloat32 y)=0
 Set the context to the given coordinates. More...
 
virtual tVoid Coord (IPoint *pt)=0
 Set the context to the given coordinates. More...
 
virtual tVoid Coord (IPoint **ppPoints, tInt nCount)=0
 Set the context to the coordinate list. More...
 
virtual tVoid CoordTexture (tFloat32 u, tFloat32 v)=0
 Set the context to the coordinate list. More...
 
virtual tVoid End ()=0
 Ends a device context. More...
 

Detailed Description

Graphics mode interface for common graphic support.

Definition at line 221 of file gfxlibinterfaces.h.

Member Enumeration Documentation

◆ tFeature

enum tFeature

This enumeration enables / disables or describes the features for the graphics mode.

Enumerator
FEATURE_AlphaBlending 

anti blending.

FEATURE_Antialiasing 

anti aliasing.

FEATURE_Lighting 

lighting.

FEATURE_DepthBuffer 

deep buffer support.

FEATURE_BackFaceCulling 

back face culling.

FEATURE_CommandLists 

command list.

FEATURE_HardwareAcceleration 

hardware acceleration.

Definition at line 251 of file gfxlibinterfaces.h.

◆ tMode

enum tMode

enumeration for the supported modes.

Enumerator
MODE_DrawPoints 

draw points.

MODE_DrawLines 

draw lines.

MODE_DrawLineStrip 

draw a line strip.

MODE_DrawLineLoop 

draw a line loop.

MODE_DrawTriangles 

draw triangle.

MODE_DrawTriangleStrip 

draw triangle strip.

MODE_DrawTriangleFan 

draw triangle fan.

MODE_DrawQuads 

draw quad.

MODE_DrawQuadStrip 

draw quad strip.

MODE_DrawPolygon 

draw polygon.

Definition at line 226 of file gfxlibinterfaces.h.

Member Function Documentation

◆ Begin()

virtual tVoid Begin ( tMode  eMode)
pure virtual

Start graphics command.

Always call the begin function in your painting routine before use any drawing commands.

Warning
When call Begin never forget to call End to finish graphics mode and stop device context.
Parameters
eModeThe Mode for drawing (see IGraphicsMode).
Returns
void

◆ BgColor() [1/4]

virtual tVoid BgColor ( const IColor col)
pure virtual

This function sets the current background color to col value.

All next draw calls will draw with the col as background.

Parameters
col[in] The Color.
Returns
void

◆ BgColor() [2/4]

virtual tVoid BgColor ( tFloat64  fRed,
tFloat64  fGreen,
tFloat64  fBlue,
tFloat64  fAlpha = 0.0 
)
pure virtual

This function sets the current background color to col value.

All next draw calls will draw with the col as background.

Parameters
fRed[in] Red value (0.0-1.0).
fGreen[in] Green value (0.0-1.0).
fBlue[in] Blue value (0.0-1.0).
fAlpha[in] Alpha value (0.0-1.0 (non-full)).
Returns
void

◆ BgColor() [3/4]

virtual tVoid BgColor ( tInt  nRed,
tInt  nGreen,
tInt  nBlue,
tInt  nAlpha = 0 
)
pure virtual

This function sets the current background color to col value.

All next draw calls will draw with the col as background.

Parameters
nRed[in] Red value (0-255).
nGreen[in] Green value (0-255).
nBlue[in] Blue value (0-255).
nAlpha[in] Alpha value (0-255 (non-full)).
Returns
void

◆ BgColor() [4/4]

virtual tVoid BgColor ( tUInt8  nRed,
tUInt8  nGreen,
tUInt8  nBlue,
tUInt8  nAlpha = 0 
)
pure virtual

This function sets the current background color to col value.

All next draw calls will draw with the col as background.

Parameters
nRed[in] Red value (0-255).
nGreen[in] Green value (0-255).
nBlue[in] Blue value (0-255).
nAlpha[in] Alpha value (0-255 (non-full)).
Returns
void

◆ Color() [1/4]

virtual tVoid Color ( const IColor col)
pure virtual

This function sets the current color to col value.

All next draw calls will draw with the col.

Parameters
col[in] The Color.
Returns
void

◆ Color() [2/4]

virtual tVoid Color ( tFloat64  fRed,
tFloat64  fGreen,
tFloat64  fBlue,
tFloat64  fAlpha = 1.0 
)
pure virtual

This function sets the current color.

All next draw calls will draw with this color.

Parameters
fRed[in] Red value (0.0-1.0).
fGreen[in] Green value (0.0-1.0).
fBlue[in] Blue value (0.0-1.0).
fAlpha[in] Alpha value (0.0-1.0 (non-full)).
Returns
void

◆ Color() [3/4]

virtual tVoid Color ( tInt  nRed,
tInt  nGreen,
tInt  nBlue,
tInt  nAlpha = 255 
)
pure virtual

This function sets the current color.

All next draw calls will draw with this color.

Parameters
nRed[in] Red value (0-255).
nGreen[in] Green value (0-255).
nBlue[in] Blue value (0-255).
nAlpha[in] Alpha value (0-255 (non-full)).
Returns
void

◆ Color() [4/4]

virtual tVoid Color ( tUInt8  nRed,
tUInt8  nGreen,
tUInt8  nBlue,
tUInt8  nAlpha = 255 
)
pure virtual

This function sets the current color.

All next draw calls will draw with this color.

Parameters
nRed[in] Red value (0-255).
nGreen[in] Green value (0-255).
nBlue[in] Blue value (0-255).
nAlpha[in] Alpha value (0-255 (non-full)).
Returns
void

◆ Coord() [1/4]

virtual tVoid Coord ( IPoint **  ppPoints,
tInt  nCount 
)
pure virtual

Set the context to the coordinate list.

Parameters
ppPointsreference to the first elements of the points of coordinates.
nCountnumber of elements.
Returns
void

◆ Coord() [2/4]

virtual tVoid Coord ( IPoint pt)
pure virtual

Set the context to the given coordinates.

Parameters
ptPoint of coordinates.
Returns
void

◆ Coord() [3/4]

virtual tVoid Coord ( tFloat32  x,
tFloat32  y 
)
pure virtual

Set the context to the given coordinates.

Parameters
xx-value.
yy-value.
Returns
void

◆ Coord() [4/4]

virtual tVoid Coord ( tInt  x,
tInt  y 
)
pure virtual

Set the context to the given coordinates.

Parameters
xx-value.
yy-value.
Returns
void

◆ CoordTexture()

virtual tVoid CoordTexture ( tFloat32  u,
tFloat32  v 
)
pure virtual

Set the context to the coordinate list.

Parameters
u[in] the u value
v[in] the u value
Returns
void

◆ DisableAlpha()

virtual tVoid DisableAlpha ( ) const
pure virtual

This function disables the alpha graphics mode.

Returns
void

◆ DisableAntialiasing()

virtual tVoid DisableAntialiasing ( ) const
pure virtual

This function disables the anti aliasing.

Returns
void

◆ DisableBackFaceCulling()

virtual tVoid DisableBackFaceCulling ( ) const
pure virtual

This function disables the back face culling.

Returns
void

◆ DisableDepthBuffer()

virtual tVoid DisableDepthBuffer ( ) const
pure virtual

This function disables the depth buffer.

Returns
void

◆ DisableLighting()

virtual tVoid DisableLighting ( ) const
pure virtual

This function disables the lighting.

Returns
void

◆ EnableAlpha()

virtual tVoid EnableAlpha ( tBool  bAdditiveMode = tFalse) const
pure virtual

This function enables the alpha graphics mode.

If the bAdditiveMode=tTrue then the alpha value will be recalculate additive.

Parameters
bAdditiveMode[in] additive or not.
Returns
void
Remarks
Please keep in mind that colors with alpha channel set to zero are considered transparent!

◆ EnableAntialiasing()

virtual tVoid EnableAntialiasing ( ) const
pure virtual

This function enables the anti aliasing if feature is supported.

Returns
void

◆ EnableBackFaceCulling()

virtual tVoid EnableBackFaceCulling ( ) const
pure virtual

This function enables the back face culling if supported.

Returns
void

◆ EnableDepthBuffer()

virtual tVoid EnableDepthBuffer ( ) const
pure virtual

This function enables the depth buffer if feature is supported.

Returns
void
Warning
do not forget to call DisableDepthBuffer.

◆ EnableLighting()

virtual tVoid EnableLighting ( ) const
pure virtual

This function enables the lighting if feature is supported.

Returns
void

◆ End()

virtual tVoid End ( )
pure virtual

Ends a device context.

Only call when called Begin.

Returns
void

◆ IsSupported()

virtual tBool IsSupported ( tFeature  nFeatureId) const
pure virtual

This function returns if the features shown in tFeature is supported.

Parameters
nFeatureId[in] The feature to ask for shown in tFeature.
Returns
tTrue if the feature is supported, else tFalse.

◆ LinePattern()

virtual tVoid LinePattern ( tUInt16  ui16Pattern,
tInt  nFactor = 1 
)
pure virtual

This function adjusts the Line Style for all Lines in drawing operations.

Parameters
[in]ui16PatternA 16-bit integer whose bit pattern determines which fragments of a line will be drawn when the line is rasterized. Bit zero is used first, and the default pattern is all ones.
if 0xFFFF is used the Lines will be draw solid.
[in]nFactorA multiplier for each bit in the line stipple pattern. If factor is 3, for example, each bit in the pattern will be used three times before the next bit in the pattern is used. The factor parameter is clamped to the range [1, 256] and defaults to one. .
Returns
void
Remarks
This function strongly depends on the hardware acceleration.

◆ LineWidth()

virtual tVoid LineWidth ( tFloat64  fWidth)
pure virtual

This function sets the current line width to the fWidth value.

The next lines will be draw with this new line width.

Parameters
fWidth[in] The line width.
Returns
void