PieDock 1.4.3
Public Member Functions | Protected Member Functions | Protected Attributes

PieDock::XSurface Class Reference

#include <XSurface.h>

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

List of all members.

Public Member Functions

 XSurface (int, int, Display *, Visual *, int)
virtual ~XSurface ()
XImage * getResource () const
Visual * getVisual () const

Protected Member Functions

virtual int determineBitsPerPixel (int)
virtual void allocateData ()
virtual void freeData ()

Protected Attributes

Display * display
Visual * visual
int orginalDepth
XImage * resource

Detailed Description

XSurface provides a Display-compatible surface

Author:
Markus Fisch <mf@markusfisch.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 ( ) [protected, virtual]

Allocate data

Reimplemented from PieDock::Surface.

Referenced by XSurface().

int XSurface::determineBitsPerPixel ( int  depth) [protected, virtual]

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 ( ) [protected, virtual]

Free data

Reimplemented from PieDock::Surface.

Referenced by ~XSurface().


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