ADTF Display Toolbox
Loading...
Searching...
No Matches
ICanvasabstract

Canvas interface. More...

#include <gfxlibinterfaces.h>

Inheritance diagram for ICanvas:
[legend]

Public Member Functions

 ADTF_IID (ICanvas, "canvas.adtf_disptb.iid")
 Define an interface id for this class.
 
virtual tInt GetWidth () const =0
 Returns the width of the canvas.
 
virtual tInt GetHeight () const =0
 Returns the height of the canvas.
 
virtual tInt GetBitsPerPixel () const =0
 Returns the resolution of the canvas.
 
virtual tVoid SetMapping (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Define a rectangle for the screen mapping.
 
virtual tVoid ClearMapping ()=0
 clears the mapping
 
virtual tInt MapPixelX (tFloat32 x)=0
 Map x coordinate to screen region.
 
virtual tInt MapPixelY (tFloat32 y)=0
 Map y coordinate to screen region.
 
virtual tInt MapPixelX (tInt x)=0
 Map x coordinate to screen region.
 
virtual tInt MapPixelY (tInt y)=0
 Map y coordinate to screen region.
 
virtual tFloat32 UnmapPixelX (tInt x)=0
 Unmap x coordinate from screen region to global coordinates.
 
virtual tFloat32 UnmapPixelY (tInt y)=0
 Unmap y coordinate from screen region to global coordinates.
 
virtual tVoid Clear ()=0
 Clears the canvas and all drawings to background color.
 
virtual tResult CreateTexture (IImage *pImage, ITexture *&pTexture)=0
 Handy method to create a texture from an image.
 
virtual tVoid DrawTexture (ITexture *pTexture, tFloat32 vPoints[8])=0
 Draws a texture into a polygon which is described with 4 points.
 
virtual tVoid DrawPixel (tInt x, tInt y)=0
 Draws a pixel at the given position.
 
virtual tVoid DrawLine (tInt x1, tInt y1, tInt x2, tInt y2)=0
 Draws a line between two given points.
 
virtual tVoid DrawRect (tInt x1, tInt y1, tInt x2, tInt y2)=0
 Draws a rectangle using two given corners.
 
virtual tVoid DrawCircle (tInt x1, tInt y1, tInt x2, tInt y2)=0
 Draws a circle.
 
virtual tVoid DrawCircleSegment (tInt x1, tInt y1, tInt x2, tInt y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd, tBool bNormalizeRect=tFalse)=0
 Draws a circle segment (see.
 
virtual tVoid FillRect (tInt x1, tInt y1, tInt x2, tInt y2)=0
 Fills a rectangle with the current color.
 
virtual tVoid FillCircle (tInt x1, tInt y1, tInt x2, tInt y2)=0
 Fills a circle with the current color.
 
virtual tVoid FillCircleSegment (tInt x1, tInt y1, tInt x2, tInt y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd, tBool bNormalizeRect=tFalse)=0
 Fills a circle segment (see.
 
virtual tVoid DrawPixel (tFloat32 x, tFloat32 y)=0
 Draws a pixel at the given position.
 
virtual tVoid DrawLine (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Draws a line between two given points.
 
virtual tVoid DrawRect (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Draws a rectangle.
 
virtual tVoid DrawCircle (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Draws a circle.
 
virtual tVoid DrawCircleSegment (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd, tBool bNormalizeRect=tFalse)=0
 Draws a circle segment (see.
 
virtual tVoid FillRect (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Fills a rect with current color.
 
virtual tVoid FillCircle (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2)=0
 Fills a circle with current color.
 
virtual tVoid FillCircleSegment (tFloat32 x1, tFloat32 y1, tFloat32 x2, tFloat32 y2, tFloat64 fDegreeStart, tFloat64 fDegreeEnd, tBool bNormalizeRect=tFalse)=0
 Fills a circle segment (see.
 
virtual tVoid DrawPixel (IPoint *pt)=0
 Draws a pixel.
 
virtual tVoid DrawLine (IPoint *ptStart, IPoint *ptEnd)=0
 Draws a line between two points.
 
virtual tVoid DrawRect (IRect *rect)=0
 Draws a rectangle.
 
virtual tVoid DrawPolygon (IPoint **ppPoints, tInt nCount)=0
 Draws a polygon.
 
virtual tVoid DrawCircle (IRect *rect)=0
 Draws a circle inside a given rectangle.
 
virtual tVoid DrawCircleSegment (IRect *rect, tFloat64 fDegreeStart, tFloat64 fDegreeEnd)=0
 Draws a circle segment inside a given rectangle.
 
virtual tVoid FillRect (IRect *rect)=0
 Fills a rect with current color.
 
virtual tVoid FillPolygon (IPoint **ppPoints, tInt nCount)=0
 Fills a polygon by the given point array.
 
virtual tVoid FillCircle (IRect *rect)=0
 Fills a circle with current color.
 
virtual tVoid FillCircleSegment (IRect *rect, tFloat64 fDegreeStart, tFloat64 fDegreeEnd)=0
 Fills a circle segment with current color.
 
virtual IFont * CreateFont (const char *strName, tInt nHeight, IFont::tStyle eFontStyle=IFont::STYLE_Default)=0
 Creates a new font instance.
 
virtual tVoid SetFontAngle (tFloat64 fAngle)=0
 Sets the font angle.
 
virtual tFloat64 GetFontAngle ()=0
 Returns the font angle.
 
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 OutputText (tFloat32 x, tFloat32 y, const tChar *fmt,...)=0
 Sets an text to a given position.
 
virtual ITexture * CreateTexture (const tBitmapFormat *psFormat, tInt nMode=0)=0
 Creates a Texture in the given format.
 
virtual tVoid Texture (ITexture *pTexture)=0
 Sets a texture on canvas.
 
virtual tVoid Blit (ITexture *pTexture, tInt x, tInt y, tInt nWidth, tInt nHeight)=0
 Blits a texture on canvas.
 
virtual tVoid Blit (IImage *pImage, tInt x, tInt y, tInt nWidth, tInt nHeight)=0
 Blits an Image on canvas.
 
virtual tVoid Capture (IImage **ppImage, tInt x, tInt y, tInt nWidth, tInt nHeight)=0
 Captures the current canvas positions to an image.
 
virtual IScene * BeginScene ()=0
 Starts a 3D Scene context within the canvas.
 
virtual tVoid EndScene ()=0
 Ends the 3D Scene context within the canvas.
 
virtual tVoid SetFlag (tUInt32 nFlag, tInt32 nValue)=0
 Sets a flag with value.
 
virtual tInt32 GetFlag (tUInt32 nFlag)=0
 Returns a flagvalue.
 
virtual tResult PushFlags ()=0
 Stores the current set flags onto the flag stack.
 
virtual tResult PopFlags ()=0
 Restores the flags from the top the flag stack.
 
virtual tVoid ResetFlags ()=0
 Restores the default settings of all flags.
 
virtual tVoid DrawEllipse (tInt iOriginX, tInt iOriginY, tInt iWidth, tInt iHeight, tInt iAngle)=0
 Draws a ellipse.
 
virtual tVoid DrawEllipse (tFloat32 f32OriginX, tFloat32 f32OriginY, tFloat32 f32Width, tFloat32 f32Height, tFloat32 f32Angle)=0
 Draws a ellipse.
 
virtual tVoid FillEllipse (tInt iOriginX, tInt iOriginY, tInt iWidth, tInt iHeight, tInt iAngle)=0
 Fills a ellipse.
 
virtual tVoid FillEllipse (tFloat32 f32OriginX, tFloat32 f32OriginY, tFloat32 f32Width, tFloat32 f32Height, tFloat32 f32Angle)=0
 Fills a ellipse.
 
- Public Member Functions inherited from IGraphicsMode
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.
 
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 EnableAntialiasing () const =0
 This function enables the anti aliasing if feature is supported.
 
virtual tVoid DisableAntialiasing () const =0
 This function disables the anti aliasing.
 
virtual tVoid EnableLighting () const =0
 This function enables the lighting if feature is supported.
 
virtual tVoid DisableLighting () const =0
 This function disables the lighting.
 
virtual tVoid EnableDepthBuffer () const =0
 This function enables the depth buffer if feature is supported.
 
virtual tVoid DisableDepthBuffer () const =0
 This function disables the depth buffer.
 
virtual tVoid EnableBackFaceCulling () const =0
 This function enables the back face culling if supported.
 
virtual tVoid DisableBackFaceCulling () const =0
 This function disables the back face culling.
 
virtual tVoid LineWidth (tFloat64 fWidth)=0
 This function sets the current line width to the fWidth value.
 
virtual tVoid LinePattern (tUInt16 ui16Pattern, tInt nFactor=1)=0
 This function adjusts the Line Style for all Lines in drawing operations.
 
virtual tVoid Color (const IColor *col)=0
 This function sets the current color to col value.
 
virtual tVoid Color (tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha=255)=0
 This function sets the current color.
 
virtual tVoid Color (tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha=255)=0
 This function sets the current color.
 
virtual tVoid Color (tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha=1.0)=0
 This function sets the current color.
 
virtual tVoid BgColor (const IColor *col)=0
 This function sets the current background color to col value.
 
virtual tVoid BgColor (tInt nRed, tInt nGreen, tInt nBlue, tInt nAlpha=0)=0
 This function sets the current background color to col value.
 
virtual tVoid BgColor (tUInt8 nRed, tUInt8 nGreen, tUInt8 nBlue, tUInt8 nAlpha=0)=0
 This function sets the current background color to col value.
 
virtual tVoid BgColor (tFloat64 fRed, tFloat64 fGreen, tFloat64 fBlue, tFloat64 fAlpha=0.0)=0
 This function sets the current background color to col value.
 
virtual tVoid Begin (tMode eMode)=0
 Start graphics command.
 
virtual tVoid Coord (tInt x, tInt y)=0
 Set the context to the given coordinates.
 
virtual tVoid Coord (tFloat32 x, tFloat32 y)=0
 Set the context to the given coordinates.
 
virtual tVoid Coord (IPoint *pt)=0
 Set the context to the given coordinates.
 
virtual tVoid Coord (IPoint **ppPoints, tInt nCount)=0
 Set the context to the coordinate list.
 
virtual tVoid CoordTexture (tFloat32 u, tFloat32 v)=0
 Set the context to the coordinate list.
 
virtual tVoid End ()=0
 Ends a device context.
 

Additional Inherited Members

- Public Types inherited from IGraphicsMode
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...
 

Detailed Description

Canvas interface.

The canvas interface encapsulates all 2D drawing functions. The canvas is to draw in any device context.

Definition at line 571 of file gfxlibinterfaces.h.

Member Function Documentation

◆ BeginScene()

virtual IScene * BeginScene ( )
pure virtual

Starts a 3D Scene context within the canvas.

Only call after call Begin. Do not forget to call EndScene when ready.

Returns
Pointer to new scene object

◆ Blit() [1/2]

virtual tVoid Blit ( IImage * pImage,
tInt x,
tInt y,
tInt nWidth,
tInt nHeight )
pure virtual

Blits an Image on canvas.

Important: If you have disabled the hardware acceleration and use bitmap formats other than PF_RGBA_8888 or PF_RGB_888 this method can be slow, because it has to convert the format to be conform with Windows!

Parameters
[in]pImageImage to blit.
[in]xx coordinate
[in]yy coordinate
[in]nWidthwidth of the blit
[in]nHeightheight of the blit
Returns
void

◆ Blit() [2/2]

virtual tVoid Blit ( ITexture * pTexture,
tInt x,
tInt y,
tInt nWidth,
tInt nHeight )
pure virtual

Blits a texture on canvas.

Parameters
[in]pTexturetexture to blit.
[in]xx coordinate
[in]yy coordinate
[in]nWidthwidth of the blit
[in]nHeightheight of the blit
Returns
void

◆ Capture()

virtual tVoid Capture ( IImage ** ppImage,
tInt x,
tInt y,
tInt nWidth,
tInt nHeight )
pure virtual

Captures the current canvas positions to an image.

Parameters
[out]ppImagereferenced Image to blit.
[in]xx coordinate
[in]yy coordinate
[in]nWidthwidth of the blit
[in]nHeightheight of the blit
Returns
void

◆ Clear()

virtual tVoid Clear ( )
pure virtual

Clears the canvas and all drawings to background color.

Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ ClearMapping()

virtual tVoid ClearMapping ( )
pure virtual

clears the mapping

Returns
void

◆ CreateFont()

virtual IFont * CreateFont ( const char * strName,
tInt nHeight,
IFont::tStyle eFontStyle = IFont::STYLE_Default )
pure virtual

Creates a new font instance.

The font object has to be deleted when it is not longer used.

Parameters
[in]strNameName of the font. Only TrueType Fonts can be used.
Windows: strName can specify a symbolic font name which are stored in the windows registry under "<Local-machine>\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts", or strName can specify the filename of the file "windows/fonts/<strName>.ttf".
e.g. "Courier New (TrueType)" and "COUR" specifies the same font.
[in]nHeightHeight of font in pixels
[in]eFontStyleStyle of font
Returns
Point to new created font instance. NULL on error.
Remarks
If you use this function and also include <windows.h> you need to use the statement #undef ICanvas::CreateFont. Otherwise the windows crap will redefine the CreateFont !

References IFont::STYLE_Default.

◆ CreateTexture() [1/2]

virtual ITexture * CreateTexture ( const tBitmapFormat * psFormat,
tInt nMode = 0 )
pure virtual

Creates a Texture in the given format.

Parameters
[in]psFormatformat of the texture.
[in]nModesee tTextureMode.
Returns
a valid texture.
Return values
NULLerror occurred.

◆ CreateTexture() [2/2]

virtual tResult CreateTexture ( IImage * pImage,
ITexture *& pTexture )
pure virtual

Handy method to create a texture from an image.

(Finally calls pCanvas->CreateTexture)

Parameters
pImage[in] Image which is to be converted into a texture
pTexture[out] Result of this operation
Returns
ERR_POINTER if pCanvas or pImage is NULL or the texture cannot be created
ERR_NOERROR if succeeded

◆ DrawCircle() [1/3]

virtual tVoid DrawCircle ( IRect * rect)
pure virtual

Draws a circle inside a given rectangle.

Parameters
rect[in] given rectangle
Remarks
Use the alternative DrawCircle functions instead.
Returns
void

◆ DrawCircle() [2/3]

virtual tVoid DrawCircle ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Draws a circle.

the given points represents a rectangle. the circle will be drawed insides the spanned rectangle

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

◆ DrawCircle() [3/3]

virtual tVoid DrawCircle ( tInt x1,
tInt y1,
tInt x2,
tInt y2 )
pure virtual

Draws a circle.

The given points represent a rectangle. The circle will be drawn inside this rectangle

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ DrawCircleSegment() [1/3]

virtual tVoid DrawCircleSegment ( IRect * rect,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd )
pure virtual

Draws a circle segment inside a given rectangle.

Parameters
rect[in] rectangle
fDegreeStart[in] start angle
fDegreeEnd[in] end angle
Remarks
Use the alternative DrawCircleSegment functions instead.
Returns
void

◆ DrawCircleSegment() [2/3]

virtual tVoid DrawCircleSegment ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd,
tBool bNormalizeRect = tFalse )
pure virtual

Draws a circle segment (see.

See also
DrawCircle).
Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
fDegreeStart[in] start of the segment
fDegreeEnd[in] end of the segment
bNormalizeRect[in] ensures that x1, y1 is the upper left and x2, y2 is the lower right corner of the rectangle
Returns
void

◆ DrawCircleSegment() [3/3]

virtual tVoid DrawCircleSegment ( tInt x1,
tInt y1,
tInt x2,
tInt y2,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd,
tBool bNormalizeRect = tFalse )
pure virtual

Draws a circle segment (see.

See also
DrawCircle).
Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
fDegreeStart[in] start of the segment
fDegreeEnd[in] end of the segment
bNormalizeRect[in] ensures that x1, y1 is the upper left and x2, y2 is the lower right corner of the rectangle
Returns
void

◆ DrawEllipse() [1/2]

virtual tVoid DrawEllipse ( tFloat32 f32OriginX,
tFloat32 f32OriginY,
tFloat32 f32Width,
tFloat32 f32Height,
tFloat32 f32Angle )
pure virtual

Draws a ellipse.

Parameters
f32OriginX[in] x-value of the origin point
f32OriginY[in] y-value of the origin point
f32Width[in] width of the ellipse
f32Height[in] height of the ellipse
f32Angle[in] angle of the ellipse orientation in degrees and clockwise
Returns
void

◆ DrawEllipse() [2/2]

virtual tVoid DrawEllipse ( tInt iOriginX,
tInt iOriginY,
tInt iWidth,
tInt iHeight,
tInt iAngle )
pure virtual

Draws a ellipse.

Parameters
iOriginX[in] x-value of the origin point
iOriginY[in] y-value of the origin point
iWidth[in] width of the ellipse
iHeight[in] height of the ellipse
iAngle[in] angle of the ellipse orientation in degrees and clockwise
Returns
void

◆ DrawLine() [1/3]

virtual tVoid DrawLine ( IPoint * ptStart,
IPoint * ptEnd )
pure virtual

Draws a line between two points.

Parameters
ptStart[in] start point
ptEnd[in] end point
Remarks
Use the alternative DrawLine functions instead.
Returns
void

◆ DrawLine() [2/3]

virtual tVoid DrawLine ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Draws a line between two given points.

Parameters
x1[in] x position (start)
y1[in] y position (start)
x2[in] x position (end)
y2[in] y position (end)
Returns
void

◆ DrawLine() [3/3]

virtual tVoid DrawLine ( tInt x1,
tInt y1,
tInt x2,
tInt y2 )
pure virtual

Draws a line between two given points.

Parameters
x1[in] x position (start)
y1[in] y position (start)
x2[in] x position (end)
y2[in] y position (end)
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ DrawPixel() [1/3]

virtual tVoid DrawPixel ( IPoint * pt)
pure virtual

Draws a pixel.

Parameters
pt[in] given point
Remarks
Use the alternative DrawPixel functions instead.
Returns
void

◆ DrawPixel() [2/3]

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

Draws a pixel at the given position.

Parameters
x[in] x position
y[in] y position
Returns
void

◆ DrawPixel() [3/3]

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

Draws a pixel at the given position.

Parameters
x[in] x position
y[in] y position
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ DrawPolygon()

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

Draws a polygon.

Parameters
ppPoints[in] array of points
nCount[in] amount of array elements
Returns
void

◆ DrawRect() [1/3]

virtual tVoid DrawRect ( IRect * rect)
pure virtual

Draws a rectangle.

Parameters
rect[in] given rectangle
Remarks
Use the alternative DrawRect functions instead.
Returns
void

◆ DrawRect() [2/3]

virtual tVoid DrawRect ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Draws a rectangle.

using two given corners

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

◆ DrawRect() [3/3]

virtual tVoid DrawRect ( tInt x1,
tInt y1,
tInt x2,
tInt y2 )
pure virtual

Draws a rectangle using two given corners.

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ DrawTexture()

virtual tVoid DrawTexture ( ITexture * pTexture,
tFloat32 vPoints[8] )
pure virtual

Draws a texture into a polygon which is described with 4 points.

The texture will be stretched into this polygon

Parameters
pTexture[in] Pointer to the texture to blit
vPoints[in] Pointer to array with 8 floats describing 4 points (x1, y1, x2, y2, x3, y3, y4, y4)

◆ EndScene()

virtual tVoid EndScene ( )
pure virtual

Ends the 3D Scene context within the canvas.

Call to close the context when opened with BeginScene.

Returns
void

◆ FillCircle() [1/3]

virtual tVoid FillCircle ( IRect * rect)
pure virtual

Fills a circle with current color.

Parameters
rect[in] x, y positions of the first corner and second corner
Returns
void
Remarks
Use the alternative FillCircle functions instead.

◆ FillCircle() [2/3]

virtual tVoid FillCircle ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Fills a circle with current color.

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

◆ FillCircle() [3/3]

virtual tVoid FillCircle ( tInt x1,
tInt y1,
tInt x2,
tInt y2 )
pure virtual

Fills a circle with the current color.

The given points represent a rectangle. The circle will be drawn inside this rectangle

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ FillCircleSegment() [1/3]

virtual tVoid FillCircleSegment ( IRect * rect,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd )
pure virtual

Fills a circle segment with current color.

Parameters
rect[in] x, y positions of the first corner and second corner
fDegreeStart[in] start of the segment
fDegreeEnd[in] end of the segment
Returns
void
Remarks
Use the alternative FillCircleSegment functions instead.

◆ FillCircleSegment() [2/3]

virtual tVoid FillCircleSegment ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd,
tBool bNormalizeRect = tFalse )
pure virtual

Fills a circle segment (see.

See also
DrawCircleSegment).
Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
fDegreeStart[in] start of the segment
fDegreeEnd[in] end of the segment
bNormalizeRect[in] ensures that x1, y1 is the upper left and x2, y2 is the lower right corner of the rectangle
Returns
void
Remarks
An angle of 0 degree points in positive y direction. 90 degrees points to positive x direction. Rotation goes counterclockwise.

◆ FillCircleSegment() [3/3]

virtual tVoid FillCircleSegment ( tInt x1,
tInt y1,
tInt x2,
tInt y2,
tFloat64 fDegreeStart,
tFloat64 fDegreeEnd,
tBool bNormalizeRect = tFalse )
pure virtual

Fills a circle segment (see.

See also
DrawCircleSegment).
Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
fDegreeStart[in] start of the segment
fDegreeEnd[in] end of the segment
bNormalizeRect[in] ensures that x1, y1 is the upper left and x2, y2 is the lower right corner of the rectangle
Returns
void
Remarks
An angle of 0 degree points in negative y direction. 90 degrees points to positive x direction. Rotation goes counterclockwise.

◆ FillEllipse() [1/2]

virtual tVoid FillEllipse ( tFloat32 f32OriginX,
tFloat32 f32OriginY,
tFloat32 f32Width,
tFloat32 f32Height,
tFloat32 f32Angle )
pure virtual

Fills a ellipse.

Parameters
f32OriginX[in] x-value of the origin point
f32OriginY[in] y-value of the origin point
f32Width[in] width of the ellipse
f32Height[in] height of the ellipse
f32Angle[in] angle of the ellipse orientation in degrees and clockwise
Returns
void

◆ FillEllipse() [2/2]

virtual tVoid FillEllipse ( tInt iOriginX,
tInt iOriginY,
tInt iWidth,
tInt iHeight,
tInt iAngle )
pure virtual

Fills a ellipse.

Parameters
iOriginX[in] x-value of the origin point
iOriginY[in] y-value of the origin point
iWidth[in] width of the ellipse
iHeight[in] height of the ellipse
iAngle[in] angle of the ellipse orientation in degrees and clockwise
Returns
void

◆ FillPolygon()

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

Fills a polygon by the given point array.

Parameters
ppPoints[in] a IPoint array reference
nCount[in] size of the array
Returns
void
Remarks
There is no alternative yet because of interface compatibility.

Referenced by cGCLProcessor::ProcessCommand().

◆ FillRect() [1/3]

virtual tVoid FillRect ( IRect * rect)
pure virtual

Fills a rect with current color.

Parameters
rect[in] rectangle of the first and the second corner
Returns
void
Remarks
Use the alternative FillRect functions instead.

◆ FillRect() [2/3]

virtual tVoid FillRect ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Fills a rect with current color.

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

◆ FillRect() [3/3]

virtual tVoid FillRect ( tInt x1,
tInt y1,
tInt x2,
tInt y2 )
pure virtual

Fills a rectangle with the current color.

Parameters
x1[in] x position of the first corner
y1[in] y position of the first corner
x2[in] x position of the second corner
y2[in] y position of the second corner
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ Font()

virtual tVoid Font ( IFont * pFont)
pure virtual

Sets the current font for drawing operations.

Parameters
[in]pFontPointer to font instance
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ GetBitsPerPixel()

virtual tInt GetBitsPerPixel ( ) const
pure virtual

Returns the resolution of the canvas.

Returns
The number of bits per pixel.

◆ GetFlag()

virtual tInt32 GetFlag ( tUInt32 nFlag)
pure virtual

Returns a flagvalue.

Parameters
[in]nFlagFlag to be returned. For valid flags see the tCanvasFlags enum
Returns
Flag value

◆ GetFontAngle()

virtual tFloat64 GetFontAngle ( )
pure virtual

Returns the font angle.

Returns
angle of the font

◆ GetHeight()

virtual tInt GetHeight ( ) const
pure virtual

Returns the height of the canvas.

Returns
The height (in pixel).

◆ GetWidth()

virtual tInt GetWidth ( ) const
pure virtual

Returns the width of the canvas.

Returns
The width (in pixel).

◆ MapPixelX() [1/2]

virtual tInt MapPixelX ( tFloat32 x)
pure virtual

Map x coordinate to screen region.

Parameters
x[in] x coordinate to map
Returns
The mapped coordinate

◆ MapPixelX() [2/2]

virtual tInt MapPixelX ( tInt x)
pure virtual

Map x coordinate to screen region.

Parameters
x[in] x coordinate to map
Returns
The mapped coordinate

◆ MapPixelY() [1/2]

virtual tInt MapPixelY ( tFloat32 y)
pure virtual

Map y coordinate to screen region.

Parameters
y[in] y coordinate to map
Returns
The mapped coordinate

◆ MapPixelY() [2/2]

virtual tInt MapPixelY ( tInt y)
pure virtual

Map y coordinate to screen region.

Parameters
y[in] y coordinate to map
Returns
The mapped coordinate

◆ OutputText() [1/2]

virtual tVoid OutputText ( tFloat32 x,
tFloat32 y,
const tChar * fmt,
... )
pure virtual

Sets an text to a given position.

Parameters
[in]xx position of the text
[in]yy position of the text
[in]fmtformat string the format follows the printf specification
[in]...unspecified parameters described in the format string
Returns
void

◆ OutputText() [2/2]

virtual tVoid OutputText ( tInt x,
tInt y,
const tChar * fmt,
... )
pure virtual

Sets an text to a given position.

Parameters
[in]xx position of the text
[in]yy position of the text
[in]fmtformat string the format follows the printf specification
[in]...unspecified parameters described in the format string
Returns
void

Referenced by cGCLProcessor::ProcessCommand().

◆ PopFlags()

virtual tResult PopFlags ( )
pure virtual

Restores the flags from the top the flag stack.

Returns
Standard Result Code (depends on implementation).
Return values
ERR_OUT_OF_RANGEThe flag stack is empty

◆ PushFlags()

virtual tResult PushFlags ( )
pure virtual

Stores the current set flags onto the flag stack.

Returns
Standard Result Code (depends on implementation).
Return values
ERR_OUT_OF_RANGEThe flags does not fit in the flag stack

◆ SetFlag()

virtual tVoid SetFlag ( tUInt32 nFlag,
tInt32 nValue )
pure virtual

Sets a flag with value.

For valid flags and posible values see tCanvasFlags enum

Parameters
[in]nFlagFlag to be set. For valid flags see the tCanvasFlags enum
[in]nValueFlagvalue

◆ SetFontAngle()

virtual tVoid SetFontAngle ( tFloat64 fAngle)
pure virtual

Sets the font angle.

Parameters
[in]fAngleangle to be set
Returns
void

◆ SetMapping()

virtual tVoid SetMapping ( tFloat32 x1,
tFloat32 y1,
tFloat32 x2,
tFloat32 y2 )
pure virtual

Define a rectangle for the screen mapping.

Parameters
x1[in] Upper left x coordinate
y1[in] Upper left y coordinate
x2[in] Bottom right x coordinate
y2[in] Bottom right y coordinate
Returns
void

◆ Texture()

virtual tVoid Texture ( ITexture * pTexture)
pure virtual

Sets a texture on canvas.

Parameters
[in]pTexturetexture to set.
Returns
void

◆ UnmapPixelX()

virtual tFloat32 UnmapPixelX ( tInt x)
pure virtual

Unmap x coordinate from screen region to global coordinates.

Parameters
x[in] x coordinate to unmap
Returns
The unmapped coordinate

◆ UnmapPixelY()

virtual tFloat32 UnmapPixelY ( tInt y)
pure virtual

Unmap y coordinate from screen region to global coordinates.

Parameters
y[in] y coordinate to unmap
Returns
The unmapped coordinate