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

« back to all changes in this revision

Viewing changes to src/include/ipepswriter.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2009-12-11 21:22:35 UTC
  • mfrom: (4.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20091211212235-5iio4nzpra64snab
Tags: 7.0.10-1
* New upstream.  Closes: #551192.
  - New build-depends: libcairo2-dev, liblua5.1-0-dev, gsfonts
  - patches/config.diff: Remove.  Upstream build system replaced.
  - Runtime lib package changed to libipe7.0.10 from libipe1c2a
  - Devel package renamed to libipe-dev (from libipe1-dev)
  - Package ipe depends on lua5.1 due to ipe-update-master.

* rules: Re-write to use dh.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
/*
6
6
 
7
7
    This file is part of the extensible drawing editor Ipe.
8
 
    Copyright (C) 1993-2007  Otfried Cheong
 
8
    Copyright (C) 1993-2009  Otfried Cheong
9
9
 
10
10
    Ipe is free software; you can redistribute it and/or modify it
11
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
 
12
    the Free Software Foundation; either version 3 of the License, or
13
13
    (at your option) any later version.
14
14
 
15
15
    As a special exception, you have permission to link Ipe with the
38
38
#include "ipeimage.h"
39
39
#include "ipepdfwriter.h"
40
40
 
41
 
class IpeDocument;
42
 
class IpeFont;
43
 
 
44
 
// --------------------------------------------------------------------
45
 
 
46
 
class IpePsPainter : public IpePdfPainter {
47
 
public:
48
 
  IpePsPainter(const IpeStyleSheet *style, IpeStream &stream);
49
 
  ~IpePsPainter();
50
 
 
51
 
protected:
52
 
  virtual void DoDrawPath();
53
 
  virtual void DoDrawBitmap(IpeBitmap bitmap);
54
 
 
55
 
private:
56
 
  void StrokePath();
57
 
  void FillPath(bool eoFill, bool preservePath);
58
 
 
59
 
private:
60
 
  int iImageNumber;
61
 
};
62
 
 
63
 
// --------------------------------------------------------------------
64
 
 
65
 
class IpePsWriter {
66
 
public:
67
 
  IpePsWriter(IpeTellStream &stream, const IpeDocument *doc, bool noColor);
68
 
  ~IpePsWriter();
69
 
  bool CreateHeader(IpeString creator, int pno = 0, int vno = 0);
70
 
  void CreatePageView(int pno = 0, int vno = 0);
71
 
  void CreateXml(IpeString creator, int compressLevel);
72
 
  void CreateTrailer();
73
 
 
74
 
private:
75
 
  void EmbedFont(const IpeFont &font);
76
 
 
77
 
private:
78
 
  IpeTellStream &iStream;
79
 
  const IpeDocument *iDoc;
80
 
  bool iNoColor;
81
 
};
 
41
// --------------------------------------------------------------------
 
42
 
 
43
namespace ipe {
 
44
 
 
45
  class Font;
 
46
 
 
47
  class PsPainter : public PdfPainter {
 
48
  public:
 
49
    PsPainter(const Cascade *style, Stream &stream);
 
50
    ~PsPainter();
 
51
 
 
52
  protected:
 
53
    virtual void doNewPath();
 
54
    virtual void doDrawPath(TPathMode mode);
 
55
    virtual void doDrawBitmap(Bitmap bitmap);
 
56
    virtual void doAddClipPath();
 
57
 
 
58
  private:
 
59
    void strokePath();
 
60
    void fillPath(bool eoFill, bool preservePath);
 
61
 
 
62
  private:
 
63
    int iImageNumber;
 
64
  };
 
65
 
 
66
  // --------------------------------------------------------------------
 
67
 
 
68
  class PsWriter {
 
69
  public:
 
70
    PsWriter(TellStream &stream, const Document *doc, bool noColor);
 
71
    ~PsWriter();
 
72
    bool createHeader(int pno = 0, int vno = 0);
 
73
    void createPageView(int pno = 0, int vno = 0);
 
74
    void createXml(int compressLevel);
 
75
    void createTrailer();
 
76
 
 
77
  private:
 
78
    void embedFont(const Font &font);
 
79
 
 
80
private:
 
81
    TellStream &iStream;
 
82
    const Document *iDoc;
 
83
    bool iNoColor;
 
84
  };
 
85
 
 
86
} // namespace
82
87
 
83
88
// --------------------------------------------------------------------
84
89
#endif