1ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann// Copyright 2014 PDFium Authors. All rights reserved.
2ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann// Use of this source code is governed by a BSD-style license that can be
3ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann// found in the LICENSE file.
4ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann
5ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann
7ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann#ifndef _BC_QRGRIDSAMPLER_H_
8ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann#define _BC_QRGRIDSAMPLER_H_
9ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmannclass CBC_CommonBitMatrix;
10ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmannclass CBC_CommonPerspectiveTransform;
11ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmannclass CBC_CommonDefaultGridSampler;
12ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmannclass CBC_QRGridSampler;
13ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmannclass CBC_QRGridSampler {
14ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann private:
15ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  static CBC_QRGridSampler m_gridSampler;
16ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann
17ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann public:
18ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  CBC_QRGridSampler();
19ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  virtual ~CBC_QRGridSampler();
20ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  virtual CBC_CommonBitMatrix* SampleGrid(CBC_CommonBitMatrix* image,
21ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          int32_t dimensionX,
22ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          int32_t dimensionY,
23ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p1ToX,
24ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p1ToY,
25ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p2ToX,
26ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p2ToY,
27ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p3ToX,
28ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p3ToY,
29ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p4ToX,
30ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p4ToY,
31ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p1FromX,
32ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p1FromY,
33ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p2FromX,
34ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p2FromY,
35ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p3FromX,
36ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p3FromY,
37ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p4FromX,
38ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          FX_FLOAT p4FromY,
39ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                          int32_t& e);
40ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann
41ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  static CBC_QRGridSampler& GetInstance();
42ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann  static void CheckAndNudgePoints(CBC_CommonBitMatrix* image,
43ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                  CFX_FloatArray* points,
44ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann                                  int32_t& e);
45ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann};
46ac3d58cff7c80b0ef56bf55130d91da17cbaa3c4Philip P. Moltmann#endif
47