1 // Copyright 2016 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 FXBARCODE_CBC_EAN13_H_ 8 #define FXBARCODE_CBC_EAN13_H_ 9 10 #include "core/fxcrt/fx_coordinates.h" 11 #include "core/fxcrt/fx_string.h" 12 #include "core/fxcrt/fx_system.h" 13 #include "core/fxge/fx_dib.h" 14 #include "fxbarcode/cbc_onecode.h" 15 16 class CBC_OnedEAN13Writer; 17 18 class CBC_EAN13 : public CBC_OneCode { 19 public: 20 CBC_EAN13(); 21 ~CBC_EAN13() override; 22 23 // CBC_OneCode: 24 bool Encode(const WideStringView& contents) override; 25 bool RenderDevice(CFX_RenderDevice* device, 26 const CFX_Matrix* matrix) override; 27 BC_TYPE GetType() override; 28 29 private: 30 CBC_OnedEAN13Writer* GetOnedEAN13Writer(); 31 WideString Preprocess(const WideStringView& contents); 32 33 WideString m_renderContents; 34 }; 35 36 #endif // FXBARCODE_CBC_EAN13_H_ 37