~ubuntu-branches/ubuntu/precise/ipe/precise

« back to all changes in this revision

Viewing changes to src/ipemodel/ipepdfoutputdev_p.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2005-02-24 22:09:16 UTC
  • mfrom: (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050224220916-9vxiiqjz066r5489
Tags: 6.0pre23-2
debian/control: Ipe should depend on exact version of libipe.
Closes: #296771.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// -*- C++ -*-
2
 
// --------------------------------------------------------------------
3
 
// Output device for Xpdflib
4
 
// --------------------------------------------------------------------
5
 
/*
6
 
 
7
 
    This file is part of the extensible drawing editor Ipe.
8
 
    Copyright (C) 1993-2004  Otfried Cheong
9
 
 
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.
14
 
 
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.
19
 
 
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.
24
 
 
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.
29
 
 
30
 
*/
31
 
 
32
 
#ifndef PDFOUTPUTDEV_H
33
 
#define PDFOUTPUTDEV_H
34
 
 
35
 
#include "ipetext.h"
36
 
 
37
 
#include "ipepdflib_p.h"
38
 
 
39
 
// --------------------------------------------------------------------
40
 
 
41
 
class FTFont;
42
 
class IpeFontPool;
43
 
 
44
 
class IpeOutputDev: public OutputDev {
45
 
public:
46
 
  explicit IpeOutputDev(XRef *xref, IpeFontPool *pool,
47
 
                        IpeText::XForm *xform);
48
 
  virtual ~IpeOutputDev();
49
 
 
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; }
53
 
 
54
 
  //! Does this device use drawChar() or drawString()?
55
 
  virtual GBool useDrawChar() { return gTrue; }
56
 
 
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; }
61
 
 
62
 
  virtual void stroke(GfxState *state);
63
 
 
64
 
  //----- update text state
65
 
  virtual void updateAll(GfxState *state);
66
 
  virtual void updateFont(GfxState *state);
67
 
 
68
 
  //----- text drawing
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);
72
 
 
73
 
private:
74
 
  XRef *iXRef;                   // the xref table for this PDF file
75
 
  IpeFontPool *iFontPool;        // font cache
76
 
  IpeText::XForm *iXForm;        // text object being rendered
77
 
 
78
 
  GfxFont *iGfxFont;             // current PDF font
79
 
  int iFontObject;               // object number of current font
80
 
  double iFontMatrix[4];         // transformation of current font
81
 
};
82
 
 
83
 
// --------------------------------------------------------------------
84
 
#endif