summaryrefslogtreecommitdiff
path: root/src/lib/Pict1Parser.h
blob: 7d9bf412b37314b527a60f38c9ef579986790cdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
/* libpict
 * Copyright (C) 2011 Fridrich Strba (fridrich.strba@bluewin.ch)
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA  02111-1301 USA
 *
 */

#ifndef __PICT1PARSER_H__
#define __PICT1PARSER_H__

#include "PictXParser.h"
#include "PictBitmap.h"
#include <librevenge/librevenge.h>
#include <vector>

class Pict1Parser : public PictXParser
{
public:
  Pict1Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter);
  bool parse();

private:
  void handleNOP();
  void handleClipRgn();
  void handleBkPat();
  void handleTxFont();
  void handleTxFace();
  void handleTxMode();
  void handleSpExtra();
  void handlePnSize();
  void handlePnMode();
  void handlePnPat();
  void handleThePat();
  void handleOwSize();
  void handleOrigin();
  void handleTxSize();
  void handleFgColor();
  void handleBkColor();
  void handleTxRatio();
  void handlePicVersion();

  void handleLine();
  void handleLineFrom();
  void handleShortLine();
  void handleShortLineFrom();

  void handleLongText();
  void handleDHText();
  void handleDVText();
  void handleDHDVText();

  void handleFrameRect();
  void handlePaintRect();
  void handleEraseRect();
  void handleInvertRect();
  void handleFillRect();

  void handleFrameSameRect();
  void handlePaintSameRect();
  void handleEraseSameRect();
  void handleInvertSameRect();
  void handleFillSameRect();

  void handleFrameRRect();
  void handlePaintRRect();
  void handleEraseRRect();
  void handleInvertRRect();
  void handleFillRRect();

  void handleFrameSameRRect();
  void handlePaintSameRRect();
  void handleEraseSameRRect();
  void handleInvertSameRRect();
  void handleFillSameRRect();

  void handleFrameOval();
  void handlePaintOval();
  void handleEraseOval();
  void handleInsertOval();
  void handleFillOval();

  void handleFrameSameOval();
  void handlePaintSameOval();
  void handleEraseSameOval();
  void handleInsertSameOval();
  void handleFillSameOval();

  void handleFrameArc();
  void handlePaintArc();
  void handleEraseArc();
  void handleInsertArc();
  void handleFillArc();

  void handleFrameSameArc();
  void handlePaintSameArc();
  void handleEraseSameArc();
  void handleInsertSameArc();
  void handleFillSameArc();

  void handleFramePoly();
  void handlePaintPoly();
  void handleErasePoly();
  void handleInvertPoly();
  void handleFillPoly();

  void handleFrameSamePoly();
  void handlePaintSamePoly();
  void handleEraseSamePoly();
  void handleInvertSamePoly();
  void handleFillSamePoly();

  void handleFrameRgn();
  void handlePaintRgn();
  void handleEraseRgn();
  void handleInvertRgn();
  void handleFillRgn();

  void handleFrameSameRgn();
  void handlePaintSameRgn();
  void handleEraseSameRgn();
  void handleInvertSameRgn();
  void handleFillSameRgn();

  void handleBitsRect();
  void handleBitsRgn();

  void handlePackBitsRect();
  void handlePackBitsRgn();

  void handleShortComment();
  void handleLongComment();

  void handleEndOfPicture();

  void _handlePackBitsData();
  void _handlePictureComment();

  int m_recordSize;
};

#endif // __PICT1PARSER_H__