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

« back to all changes in this revision

Viewing changes to filter/pdftopdf/qpdf_pdftopdf.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
#ifndef QPDF_PDFTOPDF_H
 
2
#define QPDF_PDFTOPDF_H
 
3
 
 
4
#include <qpdf/QPDFObjectHandle.hh>
 
5
#include "pptypes.h"
 
6
 
 
7
// helper functions
 
8
 
 
9
PageRect getBoxAsRect(QPDFObjectHandle box);
 
10
QPDFObjectHandle getRectAsBox(const PageRect &rect);
 
11
 
 
12
// Note that PDF specification is CW, but our Rotation is CCW
 
13
Rotation getRotate(QPDFObjectHandle page);
 
14
QPDFObjectHandle makeRotate(Rotation rot); // Integer
 
15
 
 
16
double getUserUnit(QPDFObjectHandle page);
 
17
 
 
18
// PDF CTM
 
19
class Matrix {
 
20
public:
 
21
  Matrix(); // identity
 
22
  Matrix(QPDFObjectHandle ar);
 
23
  
 
24
  Matrix &rotate(Rotation rot);
 
25
  Matrix &rotate_move(Rotation rot,double width,double height);
 
26
  Matrix &rotate(double rad);
 
27
//  Matrix &rotate_deg(double deg);
 
28
 
 
29
  Matrix &translate(double tx,double ty);
 
30
  Matrix &scale(double sx,double sy);
 
31
  Matrix &scale(double s) { return scale(s,s); }
 
32
 
 
33
  Matrix &operator*=(const Matrix &rhs);
 
34
 
 
35
  QPDFObjectHandle get() const;
 
36
  std::string get_string() const;
 
37
private:
 
38
  double ctm[6];
 
39
};
 
40
 
 
41
#endif