In file libs/cs2d/csdive/csdive.h:

class csGraphics2DOS2DIVE : public csGraphics2D

This is the SysGraphics2D class for OS/2

Inheritance:


Private Fields

bool dblbuff
Do double buffering?
ULONG DivePalette[256]
The palette
diveWindow* dW
The DIVE window object
bool HardwareCursor
Use native mouse cursor, if possible?
UInt LineAddressFrameW
The width for which LineAddress has been computed last time
IOS2SystemDriver* OS2System
Pointer to the OS/2 system driver
UInt PixelFormat
Pixel format (one of FOURCC_XXX)
ISystem* System
Pointer to system driver interface
bool UpdatePalette
true if palette has to be updated
int WindowWidth
Window width and height
int WindowX
Window position in percents
HWND WinHandle
The handle of window where DIVE context is located

Inherited from csGraphics2D:

Public Fields

static int Font
static bool FullScreen
static RGBpaletteEntry Palette[256]
static bool PaletteAlloc[256]
static int Width

Public Methods

static void (*DrawPixel)(int x, int y, int color)
static void (*DrawSprite)(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
static unsigned char* (*GetPixelAt)(int x, int y)
static void (*WriteChar)(int x, int y, int fg, int bg, char c)
virtual bool BeginDraw()
virtual void Clear(int color)
void ClearAll(int color)
static bool ClipLine(float &x1, float &y1, float &x2, float &y2, int xmin, int ymin, int xmax, int ymax)
virtual void Close()
virtual bool DoubleBuffer()
virtual bool DoubleBuffer(bool Enable)
virtual void DrawBox(int x, int y, int w, int h, int color)
virtual void DrawLine(float x1, float y1, float x2, float y2, int color)
static void DrawPixel8(int x, int y, int color)
virtual void FinishDraw()
virtual void FreeArea(ImageArea *Area)
virtual void GetClipRect(int &xmin, int &ymin, int &xmax, int &ymax)
int GetNumPalEntries()
virtual int GetPage()
int GetPixelBytes()
csPixelFormat* GetPixelFormat()
virtual void GetStringError(HRESULT hRes, char* szValue)
virtual int GetTextHeight(int Font)
virtual int GetTextWidth(int Font, char *text)
virtual void Initialize()
virtual bool Open(char *Title)
virtual bool PerformExtension(char* args)
virtual void Print(csRect *area = NULL)
virtual void RestoreArea(ImageArea *Area, bool Free = true)
virtual bool SaveArea(ImageArea *&Area, int x, int y, int w, int h)
virtual void SetClipRect(int xmin, int ymin, int xmax, int ymax)
virtual bool SetMouseCursor(int iShape, ITextureHandle *hBitmap)
virtual bool SetMousePosition(int x, int y)
virtual void SetRGB(int i, int r, int g, int b)
void SysPrintf(int mode, char* text, ...)
virtual void Write(int x, int y, int fg, int bg, char *text)

Public

Protected Fields

static int ClipX1
static int* LineAddress
static unsigned char* Memory
static csPixelFormat pfmt
static ISystem* system

Protected Methods

void complete_pixel_format()
static void DrawPixel16(int x, int y, int color)
static void DrawPixel32(int x, int y, int color)
static void DrawSprite16(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
static void DrawSprite32(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
static void DrawSprite8(ITextureHandle *hTex, int sx, int sy, int sw, int sh, int tx, int ty, int tw, int th)
static unsigned char* GetPixelAt16(int x, int y)
static unsigned char* GetPixelAt32(int x, int y)
static unsigned char* GetPixelAt8(int x, int y)
static void WriteChar16(int x, int y, int fg, int bg, char c)
static void WriteChar32(int x, int y, int fg, int bg, char c)
static void WriteChar8(int x, int y, int fg, int bg, char c)

Protected


Documentation

This is the SysGraphics2D class for OS/2. It implements drawing on a DIVE context - either off-screen or memory, depending on system parameters/available resources. Most system-dependent code is in libDIVE*, the SysGraphics2D class contains only bindings. Because of DIVE flexibility, we get also all the associated goodies - hardware acceleration if there is one, hardware rescaling if there is one, support for lots of pixel formats (although CS currently uses little). Full-screen currently is implemented by just rescaling the window so that client portion of window occupies entire screen. This works pretty fast on my Matrox Mystique (in 1152x864x64K), but is very slow on sluggish cards (such as Cirrus Logic 543X, 546X (last one becuz of lame drivers)).
UInt PixelFormat
Pixel format (one of FOURCC_XXX)

UInt LineAddressFrameW
The width for which LineAddress has been computed last time

diveWindow* dW
The DIVE window object

HWND WinHandle
The handle of window where DIVE context is located

ULONG DivePalette[256]
The palette

bool UpdatePalette
true if palette has to be updated

bool dblbuff
Do double buffering?

bool HardwareCursor
Use native mouse cursor, if possible?

int WindowX
Window position in percents

int WindowWidth
Window width and height

ISystem* System
Pointer to system driver interface

IOS2SystemDriver* OS2System
Pointer to the OS/2 system driver


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