2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-04 03:10:52 +00:00
qpdf/libqpdf/qpdf/QPDFMatrix.hh
2019-01-27 07:50:30 -05:00

54 lines
1.1 KiB
C++

#ifndef QPDFMATRIX_HH
#define QPDFMATRIX_HH
#include <qpdf/QPDFObjectHandle.hh>
#include <qpdf/DLL.h>
#include <string>
class QPDFMatrix
{
public:
QPDF_DLL
QPDFMatrix();
QPDF_DLL
QPDFMatrix(double a, double b, double c,
double d, double e, double f);
QPDF_DLL
QPDFMatrix(QPDFObjectHandle::Matrix const&);
QPDF_DLL
std::string unparse() const;
QPDF_DLL
QPDFObjectHandle::Matrix getAsMatrix() const;
// This is not part of the public API. Just provide the methods we
// need as we need them.
QPDF_DLL
void concat(QPDFMatrix const& other);
QPDF_DLL
void scale(double sx, double sy);
QPDF_DLL
void translate(double tx, double ty);
// Any value other than 90, 180, or 270 is ignored
QPDF_DLL
void rotatex90(int angle);
QPDF_DLL
void transform(double x, double y, double& xp, double& yp);
QPDF_DLL
QPDFObjectHandle::Rectangle transformRectangle(
QPDFObjectHandle::Rectangle r);
private:
double a;
double b;
double c;
double d;
double e;
double f;
};
#endif // QPDFMATRIX_HH