blob: 937673c740696b794d898cd7a206a420d7b255ae [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_CODE39_H_
8#define FXBARCODE_CBC_CODE39_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
Nicolas Pena37cc5fb2017-04-04 12:12:49 -040010#include "core/fxcrt/fx_coordinates.h"
dsinclaira52ab742016-09-29 13:59:29 -070011#include "core/fxcrt/fx_string.h"
12#include "core/fxcrt/fx_system.h"
dsinclair74a34fc2016-09-29 16:41:42 -070013#include "core/fxge/fx_dib.h"
Dan Sinclaire7786682017-03-29 15:18:41 -040014#include "fxbarcode/cbc_onecode.h"
Dan Sinclaira98600a2016-03-21 15:15:56 -040015
Lei Zhang1badb852017-04-20 15:58:56 -070016class CBC_OnedCode39Writer;
17
Dan Sinclaira98600a2016-03-21 15:15:56 -040018class CBC_Code39 : public CBC_OneCode {
19 public:
20 CBC_Code39();
thestigfbe14b92016-05-02 13:31:10 -070021 ~CBC_Code39() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040022
thestigfbe14b92016-05-02 13:31:10 -070023 // CBC_OneCode:
Ryan Harrison275e2602017-09-18 14:23:18 -040024 bool Encode(const WideStringView& contents) override;
tsepezd19e9122016-11-02 15:43:18 -070025 bool RenderDevice(CFX_RenderDevice* device,
Lei Zhang1badb852017-04-20 15:58:56 -070026 const CFX_Matrix* matrix) override;
weili29b8ad02016-06-14 18:20:04 -070027 BC_TYPE GetType() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040028
tsepezd19e9122016-11-02 15:43:18 -070029 bool SetTextLocation(BC_TEXT_LOC location);
Lei Zhang1badb852017-04-20 15:58:56 -070030 bool SetWideNarrowRatio(int8_t ratio);
Dan Sinclaira98600a2016-03-21 15:15:56 -040031
32 private:
Lei Zhang1badb852017-04-20 15:58:56 -070033 CBC_OnedCode39Writer* GetOnedCode39Writer();
34
Ryan Harrison275e2602017-09-18 14:23:18 -040035 WideString m_renderContents;
Dan Sinclaira98600a2016-03-21 15:15:56 -040036};
37
Dan Sinclaire7786682017-03-29 15:18:41 -040038#endif // FXBARCODE_CBC_CODE39_H_