blob: d5c5746b3935a5719f3830507c38a735144f8bb0 [file] [log] [blame]
K. Moon832a6942022-10-31 20:11:31 +00001// Copyright 2014 The PDFium Authors
Dan Sinclair1770c022016-03-14 14:14:16 -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_BC_WRITER_H_
8#define FXBARCODE_BC_WRITER_H_
Dan Sinclair1770c022016-03-14 14:14:16 -04009
Tom Sepezcefb38d2020-10-20 19:08:33 +000010#include "core/fxge/dib/fx_dib.h"
Lei Zhang222db472018-09-17 18:54:07 +000011#include "fxbarcode/BC_Library.h"
Dan Sinclair1770c022016-03-14 14:14:16 -040012
13class CBC_Writer {
14 public:
15 CBC_Writer();
16 virtual ~CBC_Writer();
Tom Sepez559dcbb2022-03-25 04:12:33 +000017
Tom Sepez559dcbb2022-03-25 04:12:33 +000018 bool SetModuleHeight(int32_t moduleHeight);
19 bool SetModuleWidth(int32_t moduleWidth);
Tom Sepez1f8b5df2022-03-25 23:07:54 +000020 void SetHeight(int32_t height);
21 void SetWidth(int32_t width);
Tom Sepez559dcbb2022-03-25 04:12:33 +000022
Tom Sepez83f0a432021-08-24 21:09:33 +000023 virtual void SetTextLocation(BC_TEXT_LOC location);
Lei Zhang4c3b4aa2018-09-17 22:22:36 +000024 virtual bool SetWideNarrowRatio(int8_t ratio);
25 virtual bool SetStartChar(char start);
26 virtual bool SetEndChar(char end);
27 virtual bool SetErrorCorrectionLevel(int32_t level);
Dan Sinclair1770c022016-03-14 14:14:16 -040028
29 protected:
Tom Sepezea8d8d82019-11-08 20:31:35 +000030 static const FX_ARGB kBarColor = 0xff000000;
31 static const FX_ARGB kBackgroundColor = 0xffffffff;
32
Tom Sepez1adeee02025-04-02 12:38:52 -070033 int32_t module_height_ = 1;
34 int32_t module_width_ = 1;
35 int32_t height_ = 320;
36 int32_t width_ = 640;
Dan Sinclair1770c022016-03-14 14:14:16 -040037};
38
Dan Sinclaire7786682017-03-29 15:18:41 -040039#endif // FXBARCODE_BC_WRITER_H_