blob: 1eb313ff5fa76f79902a28dfa94b313e563b6fc5 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2016 The PDFium Authors
Dan Sinclaira98600a2016-03-21 15:15:56 -04002// 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_ONECODE_H_
8#define FXBARCODE_CBC_ONECODE_H_
Dan Sinclaira98600a2016-03-21 15:15:56 -04009
Tom Sepez1e7fd162021-07-27 20:44:31 +000010#include <stdint.h>
11
Tom Sepezea23e0a2017-05-01 14:24:19 -070012#include <memory>
13
Tom Sepez1e7fd162021-07-27 20:44:31 +000014#include "core/fxge/dib/fx_dib.h"
Dan Sinclaire7786682017-03-29 15:18:41 -040015#include "fxbarcode/cbc_codebase.h"
Dan Sinclaira98600a2016-03-21 15:15:56 -040016
Lei Zhang1badb852017-04-20 15:58:56 -070017class CBC_OneDimWriter;
Dan Sinclaira98600a2016-03-21 15:15:56 -040018class CFX_Font;
Dan Sinclaira98600a2016-03-21 15:15:56 -040019
20class CBC_OneCode : public CBC_CodeBase {
21 public:
Tom Sepezea23e0a2017-05-01 14:24:19 -070022 explicit CBC_OneCode(std::unique_ptr<CBC_Writer> pWriter);
thestigfbe14b92016-05-02 13:31:10 -070023 ~CBC_OneCode() override;
Dan Sinclaira98600a2016-03-21 15:15:56 -040024
Lei Zhang93ea6d42018-12-03 20:16:08 +000025 void SetPrintChecksum(bool checksum);
26 void SetDataLength(int32_t length);
27 void SetCalChecksum(bool calc);
28 bool SetFont(CFX_Font* cFont);
29 void SetFontSize(float size);
30 void SetFontStyle(int32_t style);
31 void SetFontColor(FX_ARGB color);
Lei Zhang1badb852017-04-20 15:58:56 -070032
33 private:
34 CBC_OneDimWriter* GetOneDimWriter();
Dan Sinclaira98600a2016-03-21 15:15:56 -040035};
36
Dan Sinclaire7786682017-03-29 15:18:41 -040037#endif // FXBARCODE_CBC_ONECODE_H_