Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

djgraph.h File Reference

Graphics functionality. More...


Compounds

class  djVisual

Defines

#define PIXEL32TO16(i)   ( ((((i&0xFF0000)>>16) / 8) << 11) | ((((i& 0xFF00)>> 8) / 4) << 5) | ((((i& 0xFF) ) / 8) ) )

Functions

int djgInit ()
 Initialize the library.

int djgDone ()
 Library cleanup.

unsigned int djgMapColor (djVisual *pVis, djColor color)
djVisual* djgOpenVisual (const char *vistype, int w, int h, int bpp=0, bool bSynchronous=true)
 Create a visual.

void djgCloseVisual (djVisual *pVis)
 Destroy a visual.

void djgLock (djVisual *pVis)
 Lock a visual for surface buffer drawing.

void djgUnlock (djVisual *pVis)
 Unlock a visual.

void djgFlush (djVisual *pVis)
 Flush any pending drawing operations to visual buffer.

void djgSetColor (djVisual *pVis, djColor clrFore, djColor clrBack)
 set foreground and background colors.

void djgSetColorFore (djVisual *pVis, djColor color)
 set foreground color.

void djgSetColorBack (djVisual *pVis, djColor color)
 set background color.

void djgClear (djVisual *pVis)
 clear a visual.

void djgPutPixel (djVisual *pVis, int x, int y, int r, int g, int b)
 Put pixel.

void djgPutPixel (djVisual *pVis, int x, int y, djColor color)
 Put pixel.

void djgDrawRectangle (djVisual *pVis, int x, int y, int w, int h)
 draw rectangle in current color.

void djgDrawBox (djVisual *pVis, int x, int y, int w, int h)
 draw filled box in current color.

void djgDrawHLine (djVisual *pVis, int x, int y, int n)
 draw horizontal line in current color.

void djgDrawVLine (djVisual *pVis, int x, int y, int n)
 draw vertical line in current color.

void djgDrawImage (djVisual *pVis, djImage *pImage, int x, int y, int w, int h)
 Draw (w,h) pixels of an image at (x,y).

void djgDrawImage (djVisual *pVis, djImage *pImage, int xS, int yS, int xD, int yD, int w, int h)
 Draw (w,h) pixels of an image at (xD,yD) from (xS,yS) on image.

void djgDrawImageAlpha (djVisual *pVis, djImage *pImage, int xS, int yS, int xD, int yD, int w, int h)
 Draw (w,h) pixels of an image at (xD,yD) from (xS,yS) on image with transparency.

void djgDrawVisual (djVisual *pDest, djVisual *pSrc, int xD, int yD, int xS, int yS, int w, int h)
 Draw (w,h) pixels from a visual at (xD,yD) from (xS,yS).

void djgFlip (djVisual *pVisDest, djVisual *pVisSrc)
 flip one visual to another.


Detailed Description

Graphics functionality.

Author:
David Joffe


http://www.scorpioncity.com/djgame.html
Copyright (C) David Joffe. Generated: 15 Jul 2001