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

#include <Surface.h>

Inheritance diagram for PieDock::Surface:
Inheritance graph

Public Types

enum  ColorDepth { Indexed = 8, HighColor = 16, RGB = 24, ARGB = 32 }

Public Member Functions

 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

 Surface ()
void setData (unsigned char *d)
virtual void calculateSize (int, int, int=ARGB)
virtual void allocateData ()
virtual void freeData ()

Detailed Description

Abstract surface

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

Constructor & Destructor Documentation

Surface::Surface ( const Surface s)

Copy constructor

s- some surface
Surface::~Surface ( )

Free resources

References freeData().

Surface::Surface ( )

Initialize virtual surface

Member Function Documentation

void Surface::allocateData ( )

Allocate data for surface

Reimplemented in PieDock::XSurface.

Referenced by PieDock::ArgbSurface::ArgbSurface(), and operator=().

void Surface::calculateSize ( int  w,
int  h,
int  d = ARGB 

Calculate size in bytes of this surface

w- width of surface in pixels
h- height of surface in pixels
d- color depth, bits per pixel (optional)

Referenced by PieDock::ArgbSurface::ArgbSurface(), and PieDock::XSurface::XSurface().

void Surface::freeData ( )

Free data of surface

Reimplemented in PieDock::XSurface.

Referenced by operator=(), and ~Surface().

Surface & Surface::operator= ( const Surface s)

Copy surface

s- some surface

References allocateData(), and freeData().

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