In file libs/cs2d/common/xgraph2d.h:

(a) class IXGraphics2D : public IGraphics2D

This serves as the composite interface that implements IGraphics2D for csGraphics2D and all derived classes

Inheritance:


Private Methods

STDMETHODIMP BeginDraw()
This routine should be called before any draw operations
STDMETHODIMP Clear(int color)
Clear backbuffer.
STDMETHODIMP ClearAll(int color)
Clear all video pages.
STDMETHODIMP ClipLine(float &x1, float &y1, float &x2, float &y2, int xmin, int ymin, int xmax, int ymax)
Clip a line against given rectangle
STDMETHODIMP Close()
Close down the device.
STDMETHODIMP DoubleBuffer(bool Enable)
Enable or disable double buffering; returns S_OK or S_FALSE.
STDMETHODIMP DrawBox(int x, int y, int w, int h, int color)
Draw a box
STDMETHODIMP DrawLine(float x1, float y1, float x2, float y2, int color)
Draw a line.
STDMETHODIMP DrawPixel(int x, int y, int color)
Draw a pixel.
STDMETHODIMP DrawSprite(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
Draw a sprite using a rectangle from given texture
STDMETHODIMP FinishDraw()
This routine should be called when you finished drawing.
STDMETHODIMP FreeArea(ImageArea* Area)
Free storage allocated for a subarea of screen
STDMETHODIMP GetClipRect(int& nMinX, int& nMinY, int& nMaxX, int& nMaxY)
Retrieve clipping rectangle
STDMETHODIMP GetDoubleBufferState(bool& State)
Get the double buffer state
STDMETHODIMP GetFontID(int& id)
Gets the type of the font.
STDMETHODIMP GetPixelAt(int x, int y, unsigned char** pPixel )
Returns the address of the pixel at the specified (x, y) coordinates.
STDMETHODIMP GetStringError( HRESULT hRes, char* szErrorString )
Get the string equivilent of the HRESULT.
STDMETHODIMP Open(char *Title)
Open the device.
STDMETHODIMP PerformExtension(char* args)
Perform a system specific exension
STDMETHODIMP Print(csRect* pArea)
(*) Flip video pages (or dump backbuffer into framebuffer).
STDMETHODIMP RestoreArea(ImageArea* Area, bool bFree)
Restore a subarea of screen saved with SaveArea()
STDMETHODIMP SaveArea(ImageArea** Area, int x, int y, int w, int h)
Save a subarea of screen area into the variable Data
STDMETHODIMP SetClipRect(int nMinX, int nMinY, int nMaxX, int nMaxY)
Set clipping rectangle
STDMETHODIMP SetFontID(int id)
Sets the type of the font.
STDMETHODIMP SetMouseCursor(csMouseCursorID Shape, ITextureHandle *hBitmap)
Set mouse cursor to one of predefined shape classes (see csmcXXX enum above)
STDMETHODIMP SetMousePosition(int x, int y)
Set cursor position.
STDMETHODIMP SetRGB(int i, int r, int g, int b)
(*) Set a color index to given R,G,B (0..255) values
STDMETHODIMP Write(int x, int y, int fg, int bg, char* str)
Write a text string into the back buffer
STDMETHODIMP WriteChar(int x, int y, int fg, int bg, char c)
Write a single character.

Documentation

This serves as the composite interface that implements IGraphics2D for csGraphics2D and all derived classes
STDMETHODIMP BeginDraw()
This routine should be called before any draw operations. It should return S_OK if graphics context is ready.

STDMETHODIMP FinishDraw()
This routine should be called when you finished drawing.

STDMETHODIMP Print(csRect* pArea)
(*) Flip video pages (or dump backbuffer into framebuffer).

STDMETHODIMP Clear(int color)
Clear backbuffer.

STDMETHODIMP ClearAll(int color)
Clear all video pages.

STDMETHODIMP DrawLine(float x1, float y1, float x2, float y2, int color)
Draw a line.

STDMETHODIMP DrawBox(int x, int y, int w, int h, int color)
Draw a box

STDMETHODIMP DrawPixel(int x, int y, int color)
Draw a pixel.

STDMETHODIMP GetPixelAt(int x, int y, unsigned char** pPixel )
Returns the address of the pixel at the specified (x, y) coordinates.

STDMETHODIMP DrawSprite(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
Draw a sprite using a rectangle from given texture

STDMETHODIMP DoubleBuffer(bool Enable)
Enable or disable double buffering; returns S_OK or S_FALSE.

STDMETHODIMP GetDoubleBufferState(bool& State)
Get the double buffer state

STDMETHODIMP SaveArea(ImageArea** Area, int x, int y, int w, int h)
Save a subarea of screen area into the variable Data. Storage is allocated in this call, you should either FreeArea() it after usage or RestoreArea() it.

STDMETHODIMP RestoreArea(ImageArea* Area, bool bFree)
Restore a subarea of screen saved with SaveArea()

STDMETHODIMP FreeArea(ImageArea* Area)
Free storage allocated for a subarea of screen

STDMETHODIMP GetClipRect(int& nMinX, int& nMinY, int& nMaxX, int& nMaxY)
Retrieve clipping rectangle

STDMETHODIMP SetClipRect(int nMinX, int nMinY, int nMaxX, int nMaxY)
Set clipping rectangle

STDMETHODIMP SetMousePosition(int x, int y)
Set cursor position.

STDMETHODIMP SetMouseCursor(csMouseCursorID Shape, ITextureHandle *hBitmap)
Set mouse cursor to one of predefined shape classes (see csmcXXX enum above). If a specific mouse cursor shape is not supported, return 'false'; otherwise return 'true'. If system supports it and iBitmap != NULL, shape should be set to the bitmap passed as second argument; otherwise cursor should be set to its nearest system equivalent depending on iShape argument.

STDMETHODIMP SetRGB(int i, int r, int g, int b)
(*) Set a color index to given R,G,B (0..255) values

STDMETHODIMP Write(int x, int y, int fg, int bg, char* str)
Write a text string into the back buffer

STDMETHODIMP WriteChar(int x, int y, int fg, int bg, char c)
Write a single character.

STDMETHODIMP GetFontID(int& id)
Gets the type of the font.

STDMETHODIMP SetFontID(int id)
Sets the type of the font.

STDMETHODIMP GetStringError( HRESULT hRes, char* szErrorString )
Get the string equivilent of the HRESULT.

STDMETHODIMP Open(char *Title)
Open the device.

STDMETHODIMP ClipLine(float &x1, float &y1, float &x2, float &y2, int xmin, int ymin, int xmax, int ymax)
Clip a line against given rectangle. Function returns S_OK if line is not visible.

STDMETHODIMP Close()
Close down the device.

STDMETHODIMP PerformExtension(char* args)
Perform a system specific exension. This is probably not the good way to do this but I see no other way currently.


This class has no child classes.

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de