Main Page Namespace List Class Hierarchy Compound List File List Namespace Members Compound Members Related Pages
Image.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 # ifndef IMAGE_H
00022 # define IMAGE_H
00023
00024 # include <stddef.h>
00025 # include "common.h"
00026
00027 namespace OpenVRML {
00028
00029 class Doc;
00030 class Doc2;
00031 class MFString;
00032
00036 class OPENVRML_SCOPE Image {
00037 Doc * d_url;
00038 int d_w, d_h, d_nc, d_nFrames;
00039 unsigned char *d_pixels;
00040 unsigned char **d_frame;
00041
00042 public:
00043 Image();
00044 ~Image();
00045
00046 bool setURL(const char * url, const Doc2 * relative = 0);
00047
00048 bool tryURLs(const MFString & urls, const Doc2 * relative = 0);
00049
00050 const char *url();
00051
00052 int w() { return d_w; }
00053 int h() { return d_h; }
00054 int nc() { return d_nc; }
00055 int nFrames() { return d_nFrames; }
00056 unsigned char *pixels() { return d_pixels; }
00057 unsigned char *pixels(int frame);
00058
00059 void setSize(int w, int h) { d_w = w; d_h = h; }
00060 };
00061 }
00062
00063 #endif