Home | History | Annotate | Download | only in fxbarcode
      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_CODE39_H_
      8 #define FXBARCODE_CBC_CODE39_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_OnedCode39Writer;
     17 
     18 class CBC_Code39 : public CBC_OneCode {
     19  public:
     20   CBC_Code39();
     21   ~CBC_Code39() 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   bool SetTextLocation(BC_TEXT_LOC location);
     30   bool SetWideNarrowRatio(int8_t ratio);
     31 
     32  private:
     33   CBC_OnedCode39Writer* GetOnedCode39Writer();
     34 
     35   WideString m_renderContents;
     36 };
     37 
     38 #endif  // FXBARCODE_CBC_CODE39_H_
     39