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_SRC_FXBARCODE_BC_TWODIMWRITER_H_
8 #define XFA_SRC_FXBARCODE_BC_TWODIMWRITER_H_
9 
10 #include "xfa/src/fxbarcode/BC_Writer.h"
11 
12 class CBC_CommonBitMatrix;
13 
14 class CBC_TwoDimWriter : public CBC_Writer {
15  public:
16   CBC_TwoDimWriter();
17   virtual ~CBC_TwoDimWriter();
18   virtual void RenderResult(uint8_t* code,
19                             int32_t codeWidth,
20                             int32_t codeHeight,
21                             int32_t& e);
22   virtual void RenderBitmapResult(CFX_DIBitmap*& pOutBitmap, int32_t& e);
23   virtual void RenderDeviceResult(CFX_RenderDevice* device,
24                                   const CFX_Matrix* matrix);
25   virtual FX_BOOL SetErrorCorrectionLevel(int32_t level) = 0;
GetErrorCorrectionLevel()26   virtual int32_t GetErrorCorrectionLevel() { return m_iCorrectLevel; };
27 
28  protected:
29   int32_t m_iCorrectLevel;
30   FX_BOOL m_bFixedSize;
31   CBC_CommonBitMatrix* m_output;
32 };
33 
34 #endif  // XFA_SRC_FXBARCODE_BC_TWODIMWRITER_H_
35