blob: e27596ca9a6bf22f0b69a6edd5d1d8f674989f15 [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_UPCA_H_
8#define FXBARCODE_CBC_UPCA_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
dsinclaira52ab742016-09-29 13:59:29 -070010#include "core/fxcrt/fx_string.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
15class CBC_UPCA : public CBC_OneCode {
16 public:
17 CBC_UPCA();
thestigfbe14b92016-05-02 13:31:10 -070018 ~CBC_UPCA() override;
19
weili29b8ad02016-06-14 18:20:04 -070020 // CBC_CodeBase
tsepezd19e9122016-11-02 15:43:18 -070021 bool Encode(const CFX_WideStringC& contents,
22 bool isDevice,
23 int32_t& e) override;
24 bool RenderDevice(CFX_RenderDevice* device,
25 const CFX_Matrix* matrix,
26 int32_t& e) override;
Tom Sepezf0799fe2017-03-28 09:31:32 -070027 bool RenderBitmap(CFX_RetainPtr<CFX_DIBitmap>& pOutBitmap,
28 int32_t& e) override;
weili29b8ad02016-06-14 18:20:04 -070029 BC_TYPE GetType() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040030
31 private:
32 CFX_WideString Preprocess(const CFX_WideStringC& contents);
33 CFX_WideString m_renderContents;
34};
35
Dan Sinclaire7786682017-03-29 15:18:41 -040036#endif // FXBARCODE_CBC_UPCA_H_