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