PieDock  1.6.3
Public Member Functions | Protected Member Functions | List of all members
PieDock::XSurface Class Reference

#include <XSurface.h>

Inheritance diagram for PieDock::XSurface:
Inheritance graph
[legend]
Collaboration diagram for PieDock::XSurface:
Collaboration graph
[legend]

Public Member Functions

 XSurface (int, int, Display *, Visual *, int)
 
virtual ~XSurface ()
 
XImage * getResource () const
 
Visual * getVisual () const
 
- Public Member Functions inherited from PieDock::Surface
 Surface (const Surface &)
 
virtual ~Surface ()
 
unsigned char * getData () const
 
const int & getWidth () const
 
const int & getHeight () const
 
const int & getDepth () const
 
const int & getBytesPerPixel () const
 
const int & getBytesPerLine () const
 
const int & getPadding () const
 
const int & getSize () const
 
Surfaceoperator= (const Surface &)
 

Protected Member Functions

virtual int determineBitsPerPixel (int)
 
virtual void allocateData ()
 
virtual void freeData ()
 
- Protected Member Functions inherited from PieDock::Surface
 Surface ()
 
void setData (unsigned char *d)
 
virtual void calculateSize (int, int, int=ARGB)
 

Additional Inherited Members

- Public Types inherited from PieDock::Surface
enum  ColorDepth { Indexed = 8, HighColor = 16, RGB = 24, ARGB = 32 }
 

Detailed Description

XSurface provides a Display-compatible surface

Author
Markus Fisch mf@ma.nosp@m.rkus.nosp@m.fisch.nosp@m..de

Constructor & Destructor Documentation

XSurface::XSurface ( int  w,
int  h,
Display *  d,
Visual *  v,
int  depth 
)

Initialize surface

Parameters
w- width of image in pixels
h- height of image in pixels
d- X Display
v- visual structure for XImage (optional)
depth- desired depth of XImage (optional)

References allocateData(), PieDock::Surface::calculateSize(), and determineBitsPerPixel().

XSurface::~XSurface ( )
virtual

Clean up

References freeData().

Member Function Documentation

void XSurface::allocateData ( )
protectedvirtual

Allocate data

Reimplemented from PieDock::Surface.

Referenced by XSurface().

int XSurface::determineBitsPerPixel ( int  depth)
protectedvirtual

Determine how many bits are used by the given color depth; this depends on X which tries to align the pixels on a multiple of 4 for speed; this means 24 bit RGB is actually 32 bits per pixel

Parameters
depth- color depth

Referenced by XSurface().

void XSurface::freeData ( )
protectedvirtual

Free data

Reimplemented from PieDock::Surface.

Referenced by ~XSurface().


The documentation for this class was generated from the following files: