image.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
#ifndef _LIBCP_IMAGE_H_
00027
#define _LIBCP_IMAGE_H_
00028
00029
#include <cstdlib>
00030
#include <iostream>
00031
00032
using namespace std;
00033
00034
#include "globals.h"
00035
#include "baseimage.h"
00036
00037
namespace LIBCP{
00038
00039
00040
struct Color{
00041 Uint8 red;
00042 Uint8 green;
00043 Uint8 blue;
00044 };
00045
00051 class Image :
public BaseImage
00052 {
00053
public:
00054 ~
Image();
00055
00056
static Image*
createImage(
int width,
int height,
int type );
00057
static Image* createImage(
void* buffer,
int width,
00058
int height,
int type );
00059 Uint8*
pixel(
int x,
int y );
00060
00061
00062
void lock();
00063
void unlock();
00064
int depth();
00065
int pitch();
00066
00067
bool isValidPixel(
int x,
int y);
00068
00069
void setBuffer(
void* buffer );
00070
Image&
operator=(
Image& i );
00071
void*
getBuffer();
00072
00073
private:
00074
Image(
void* buffer,
int width,
int height,
int depth,
int pitch,
int type );
00075
void* m_buffer;
00076
00077
int m_depth;
00078
int m_pitch;
00079
00080
00081 };
00082
00083 }
00084
#endif
Generated on Wed May 26 16:43:53 2004 for libcp by
1.3.7