]> www.fi.muni.cz Git - evince.git/blob - pdf/xpdf/Thumb.h
:Thumb): Added a flag for keeping Thumb data validity and the method to
[evince.git] / pdf / xpdf / Thumb.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-indent-level: 8; c-basic-offset: 8 -*- */
2 /* 
3  *  Copyright (C) 2003 Remi Cohen-Scali
4  *
5  *  Author:
6  *    Remi Cohen-Scali <Remi@Cohen-Scali.com>
7  *
8  * GPdf is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * GPdf is distributed in the hope that it will be useful, but WITHOUT
14  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
16  * License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
21  */
22
23 #ifndef THUMB_H
24 #define THUMB_H
25
26 #include <aconf.h>
27
28 class XRef;
29 class GfxColorSpace;
30
31 /* FIXME: Should have a class to avoid reading same colormap for every thumb */
32
33 /*
34  * Thumb
35  */
36
37 class Thumb {
38
39       public:
40         Thumb(XRef *xrefA, Object *obj);
41         ~Thumb();
42
43         int getWidth(void) {return width; };
44         int getHeight(void) {return height; };
45         GfxColorSpace *getColorSpace(void) {return colorMap->getColorSpace(); };
46         int getBitsPerComponent(void) {return colorMap->getBits(); };
47         int getLength(void) {return length; };
48
49         Stream *getStream() {return str; };
50
51         unsigned char *getPixbufData();
52
53         char ok() {return ok_flag != 0; }; 
54
55       private:
56         XRef *xref;
57         Stream *str;
58         GfxImageColorMap *colorMap;
59         int width, height, bits;
60         int length;
61         char ok_flag; 
62 };
63
64 #endif
65