OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef XFA_FXBARCODE_COMMON_BC_COMMONPERSPECTIVETRANSFORM_H_ | |
8 #define XFA_FXBARCODE_COMMON_BC_COMMONPERSPECTIVETRANSFORM_H_ | |
9 | |
10 #include "core/fxcrt/include/fx_basic.h" | |
11 | |
12 class CBC_CommonPerspectiveTransform { | |
13 public: | |
14 CBC_CommonPerspectiveTransform(FX_FLOAT a11, | |
15 FX_FLOAT a21, | |
16 FX_FLOAT a31, | |
17 FX_FLOAT a12, | |
18 FX_FLOAT a22, | |
19 FX_FLOAT a32, | |
20 FX_FLOAT a13, | |
21 FX_FLOAT a23, | |
22 FX_FLOAT a33); | |
23 virtual ~CBC_CommonPerspectiveTransform(); | |
24 | |
25 static CBC_CommonPerspectiveTransform* QuadrilateralToQuadrilateral( | |
26 FX_FLOAT x0, | |
27 FX_FLOAT y0, | |
28 FX_FLOAT x1, | |
29 FX_FLOAT y1, | |
30 FX_FLOAT x2, | |
31 FX_FLOAT y2, | |
32 FX_FLOAT x3, | |
33 FX_FLOAT y3, | |
34 FX_FLOAT x0p, | |
35 FX_FLOAT y0p, | |
36 FX_FLOAT x1p, | |
37 FX_FLOAT y1p, | |
38 FX_FLOAT x2p, | |
39 FX_FLOAT y2p, | |
40 FX_FLOAT x3p, | |
41 FX_FLOAT y3p); | |
42 static CBC_CommonPerspectiveTransform* SquareToQuadrilateral(FX_FLOAT x0, | |
43 FX_FLOAT y0, | |
44 FX_FLOAT x1, | |
45 FX_FLOAT y1, | |
46 FX_FLOAT x2, | |
47 FX_FLOAT y2, | |
48 FX_FLOAT x3, | |
49 FX_FLOAT y3); | |
50 static CBC_CommonPerspectiveTransform* QuadrilateralToSquare(FX_FLOAT x0, | |
51 FX_FLOAT y0, | |
52 FX_FLOAT x1, | |
53 FX_FLOAT y1, | |
54 FX_FLOAT x2, | |
55 FX_FLOAT y2, | |
56 FX_FLOAT x3, | |
57 FX_FLOAT y3); | |
58 CBC_CommonPerspectiveTransform* BuildAdjoint(); | |
59 CBC_CommonPerspectiveTransform* Times(CBC_CommonPerspectiveTransform& other); | |
60 void TransformPoints(CFX_FloatArray* points); | |
61 | |
62 private: | |
63 FX_FLOAT m_a11, m_a12, m_a13, m_a21, m_a22, m_a23, m_a31, m_a32, m_a33; | |
64 }; | |
65 | |
66 #endif // XFA_FXBARCODE_COMMON_BC_COMMONPERSPECTIVETRANSFORM_H_ | |
OLD | NEW |