~ubuntu-branches/ubuntu/quantal/cups-filters/quantal-security

« back to all changes in this revision

Viewing changes to filter/pdftopdf/P2PPattern.h

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2012-08-20 14:53:42 UTC
  • mfrom: (2.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20120820145342-bddzpwqv0klmt84d
Tags: 1.0.22-1
* New upstream release
   - pdftopdf filter replaced by new QPDF-based filter from Tobias
     Hoffmann's Google Summer of Code project. The former Poppler-based
     pdftopdf duplicated a lot of Poppler's code. The old filter is
     still in the package as pdftopdf.old with source code in
     filter/pdftopdf.old. It will be removed in a later release.
   - bannertopdf: Page duplication routine fixed.
   - bannertopdf: Fixed invalid output of a direct stream object.
   - Added most recent contributors to AUTHORS and COPYING files.
* debian/control: Added build dependency on libqpdf-dev.
* debian/copyright: Updated for the addition of the new pdftopdf filter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 
3
 
Copyright (c) 2006-2007, BBR Inc.  All rights reserved.
4
 
 
5
 
Permission is hereby granted, free of charge, to any person obtaining
6
 
a copy of this software and associated documentation files (the
7
 
"Software"), to deal in the Software without restriction, including
8
 
without limitation the rights to use, copy, modify, merge, publish,
9
 
distribute, sublicense, and/or sell copies of the Software, and to
10
 
permit persons to whom the Software is furnished to do so, subject to
11
 
the following conditions:
12
 
 
13
 
The above copyright notice and this permission notice shall be included
14
 
in all copies or substantial portions of the Software.
15
 
 
16
 
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
 
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19
 
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20
 
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
 
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22
 
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
 
 
24
 
*/
25
 
/*
26
 
 P2PPattern.h
27
 
 pdftopdf pattern object
28
 
*/
29
 
#ifndef _P2PPATTERN_H_
30
 
#define _P2PPATTERN_H_
31
 
 
32
 
#include "goo/gmem.h"
33
 
#include "Object.h"
34
 
#include "P2PObject.h"
35
 
#include "GfxState.h"
36
 
#include "Dict.h"
37
 
#include "XRef.h"
38
 
#include "P2POutputStream.h"
39
 
#include "P2PMatrix.h"
40
 
 
41
 
 
42
 
class P2PPattern: public P2PObject {
43
 
public:
44
 
  P2PPattern(Object *objA, XRef *xrefA, P2PMatrix *matA);
45
 
  ~P2PPattern();
46
 
  virtual void output(P2POutputStream *str, XRef *xrefA);
47
 
  class OrgPattern : public P2PObject {
48
 
  public:
49
 
    OrgPattern(int orgNumA, int orgGenA, XRef *xref);
50
 
    OrgPattern(Object *objA);
51
 
    ~OrgPattern();
52
 
    void reference() { refCount++; }
53
 
    int free() { return --refCount; }
54
 
    GfxPattern *getPattern() { return pattern; }
55
 
    Object *getOrgObject() { return &orgObj; }
56
 
  private:
57
 
    GfxPattern *pattern;
58
 
    int refCount;
59
 
    Object orgObj;
60
 
  };
61
 
private:
62
 
  void outputTilingPattern(P2POutputStream *str, GfxPattern *patternA,
63
 
    XRef *xref);
64
 
  void outputShadingPattern(P2POutputStream *str, GfxPattern *patternA,
65
 
    Object *objA, XRef *xref);
66
 
  OrgPattern *pattern;
67
 
  P2PMatrix mat;
68
 
};
69
 
 
70
 
#endif