Main Page
Namespaces
Classes
Files
File List
File Members
WPG1Parser.h
Go to the documentation of this file.
1
/* libwpg
2
* Copyright (C) 2006 Ariya Hidayat (ariya@kde.org)
3
* Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch)
4
* Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl)
5
*
6
* This library is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU Library General Public
8
* License as published by the Free Software Foundation; either
9
* version 2 of the License, or (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14
* Library General Public License for more details.
15
*
16
* You should have received a copy of the GNU Library General Public
17
* License along with this library; if not, write to the
18
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19
* Boston, MA 02111-1301 USA
20
*
21
* For further information visit http://libwpg.sourceforge.net
22
*/
23
24
/* "This product is not manufactured, approved, or supported by
25
* Corel Corporation or Corel Corporation Limited."
26
*/
27
28
#ifndef __WPG1PARSER_H__
29
#define __WPG1PARSER_H__
30
31
#include "
WPGXParser.h
"
32
#include "
WPGDashArray.h
"
33
#include "
WPGBitmap.h
"
34
#include <libwpd/libwpd.h>
35
#include <vector>
36
37
class
WPG1Parser
:
public
WPGXParser
38
{
39
public
:
40
WPG1Parser
(WPXInputStream *input,
libwpg::WPGPaintInterface
* painter);
41
bool
parse
();
42
43
private
:
44
void
handleStartWPG
();
45
void
handleEndWPG
();
46
47
void
handleFillAttributes
();
48
void
handleLineAttributes
();
49
void
handleColormap
();
50
51
void
handleLine
();
52
void
handlePolyline
();
53
void
handleRectangle
();
54
void
handlePolygon
();
55
void
handleEllipse
();
56
57
void
handleCurvedPolyline
();
58
59
void
decodeRLE
(std::vector<unsigned char>& buffer,
unsigned
width,
unsigned
height,
unsigned
depth);
60
void
fillPixels
(
libwpg::WPGBitmap
& bitmap,
const
unsigned
char
* buffer,
unsigned
width,
unsigned
height,
unsigned
depth);
61
void
handleBitmapTypeOne
();
62
void
handleBitmapTypeTwo
();
63
void
handlePostscriptTypeOne
();
64
void
handlePostscriptTypeTwo
();
65
66
void
handleGraphicsTextAttributes
();
67
void
handleGraphicsTextTypeOne
();
68
void
handleGraphicsTextTypeTwo
();
69
void
handleGraphicsTextTypeThree
();
70
71
void
resetPalette
();
72
73
// parsing context
74
int
m_recordLength
;
75
long
m_recordEnd
;
76
bool
m_success
;
77
bool
m_exit
;
78
bool
m_graphicsStarted
;
79
int
m_width
;
80
int
m_height
;
81
::WPXPropertyList
m_style
;
82
libwpg::WPGColor
m_penForeColor
;
83
libwpg::WPGColor
m_penBackColor
;
84
libwpg::WPGColor
m_brushForeColor
;
85
libwpg::WPGColor
m_brushBackColor
;
86
libwpg::WPGDashArray
m_dashArray
;
87
::WPXPropertyListVector
m_gradient
;
88
};
89
90
#endif // __WPG1PARSER_H__
Generated for libwpg by
doxygen
1.8.2