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