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 FXBARCODE_BC_WRITER_H_
8 #define FXBARCODE_BC_WRITER_H_
9 
10 #include "core/fxge/fx_dib.h"
11 #include "fxbarcode/BC_Library.h"
12 
13 class CBC_Writer {
14  public:
15   CBC_Writer();
16   virtual ~CBC_Writer();
17   virtual bool SetCharEncoding(int32_t encoding);
18   virtual bool SetModuleHeight(int32_t moduleHeight);
19   virtual bool SetModuleWidth(int32_t moduleWidth);
20   virtual bool SetHeight(int32_t height);
21   virtual bool SetWidth(int32_t width);
22   virtual bool SetTextLocation(BC_TEXT_LOC location);
23   virtual bool SetWideNarrowRatio(int8_t ratio);
24   virtual bool SetStartChar(char start);
25   virtual bool SetEndChar(char end);
26   virtual bool SetErrorCorrectionLevel(int32_t level);
27 
28  protected:
29   static const FX_ARGB kBarColor = 0xff000000;
30   static const FX_ARGB kBackgroundColor = 0xffffffff;
31 
32   int32_t m_CharEncoding = 0;
33   int32_t m_ModuleHeight = 1;
34   int32_t m_ModuleWidth = 1;
35   int32_t m_Height = 320;
36   int32_t m_Width = 640;
37   FXDIB_Format m_colorSpace = FXDIB_Argb;
38 };
39 
40 #endif  // FXBARCODE_BC_WRITER_H_
41