2
// --------------------------------------------------------------------
3
// Output device for Xpdflib
4
// --------------------------------------------------------------------
7
This file is part of the extensible drawing editor Ipe.
8
Copyright (C) 1993-2004 Otfried Cheong
10
Ipe is free software; you can redistribute it and/or modify it
11
under the terms of the GNU General Public License as published by
12
the Free Software Foundation; either version 2 of the License, or
13
(at your option) any later version.
15
As a special exception, you have permission to link Ipe with the
16
CGAL library and distribute executables, as long as you follow the
17
requirements of the Gnu General Public License in regard to all of
18
the software in the executable aside from CGAL.
20
Ipe is distributed in the hope that it will be useful, but WITHOUT
21
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
22
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
23
License for more details.
25
You should have received a copy of the GNU General Public License
26
along with Ipe; if not, you can find it at
27
"http://www.gnu.org/copyleft/gpl.html", or write to the Free
28
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32
#ifndef PDFOUTPUTDEV_H
33
#define PDFOUTPUTDEV_H
37
#include "ipepdflib_p.h"
39
// --------------------------------------------------------------------
44
class IpeOutputDev: public OutputDev {
46
explicit IpeOutputDev(XRef *xref, IpeFontPool *pool,
47
IpeText::XForm *xform);
48
virtual ~IpeOutputDev();
50
//! Does this device use upside-down coordinates?
51
/*! (Upside-down means (0,0) is the top left corner of the page.) */
52
virtual GBool upsideDown() { return gTrue; }
54
//! Does this device use drawChar() or drawString()?
55
virtual GBool useDrawChar() { return gTrue; }
57
//! Does this device use beginType3Char/endType3Char?
58
/*! Otherwise, text in Type 3 fonts will be drawn with
59
drawChar/drawString. */
60
virtual GBool interpretType3Chars() { return gFalse; }
62
virtual void stroke(GfxState *state);
64
//----- update text state
65
virtual void updateAll(GfxState *state);
66
virtual void updateFont(GfxState *state);
69
virtual void drawChar(GfxState *state, double x, double y,
70
double dx, double dy, double originX, double originY,
71
CharCode code, Unicode *u, int uLen);
74
XRef *iXRef; // the xref table for this PDF file
75
IpeFontPool *iFontPool; // font cache
76
IpeText::XForm *iXForm; // text object being rendered
78
GfxFont *iGfxFont; // current PDF font
79
int iFontObject; // object number of current font
80
double iFontMatrix[4]; // transformation of current font
83
// --------------------------------------------------------------------