blob: 827fc28d0f7807e609f61ae913054ddd1d12d088 [file] [log] [blame]
Dan Sinclaira98600a2016-03-21 15:15:56 -04001// 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
Dan Sinclaire7786682017-03-29 15:18:41 -04007#ifndef FXBARCODE_CBC_CODABAR_H_
8#define FXBARCODE_CBC_CODABAR_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
dsinclaira52ab742016-09-29 13:59:29 -070010#include "core/fxcrt/fx_coordinates.h"
11#include "core/fxcrt/fx_system.h"
dsinclair74a34fc2016-09-29 16:41:42 -070012#include "core/fxge/fx_dib.h"
Dan Sinclaire7786682017-03-29 15:18:41 -040013#include "fxbarcode/cbc_onecode.h"
Dan Sinclaira98600a2016-03-21 15:15:56 -040014
Lei Zhang1badb852017-04-20 15:58:56 -070015class CBC_OnedCodaBarWriter;
16
Dan Sinclaira98600a2016-03-21 15:15:56 -040017class CBC_Codabar : public CBC_OneCode {
18 public:
19 CBC_Codabar();
20 ~CBC_Codabar() override;
21
thestigfbe14b92016-05-02 13:31:10 -070022 // CBC_OneCode:
Ryan Harrison275e2602017-09-18 14:23:18 -040023 bool Encode(const WideStringView& contents) override;
tsepezd19e9122016-11-02 15:43:18 -070024 bool RenderDevice(CFX_RenderDevice* device,
Lei Zhang1badb852017-04-20 15:58:56 -070025 const CFX_Matrix* matrix) override;
weili29b8ad02016-06-14 18:20:04 -070026 BC_TYPE GetType() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040027
Dan Sinclair812e96c2017-03-13 16:43:37 -040028 bool SetStartChar(char start);
29 bool SetEndChar(char end);
tsepezd19e9122016-11-02 15:43:18 -070030 bool SetTextLocation(BC_TEXT_LOC location);
Lei Zhang1badb852017-04-20 15:58:56 -070031 bool SetWideNarrowRatio(int8_t ratio);
Dan Sinclaira98600a2016-03-21 15:15:56 -040032
33 private:
Lei Zhang1badb852017-04-20 15:58:56 -070034 CBC_OnedCodaBarWriter* GetOnedCodaBarWriter();
35
Ryan Harrison275e2602017-09-18 14:23:18 -040036 WideString m_renderContents;
Dan Sinclaira98600a2016-03-21 15:15:56 -040037};
38
Dan Sinclaire7786682017-03-29 15:18:41 -040039#endif // FXBARCODE_CBC_CODABAR_H_