1 // Copyright 2014 The PDFium Authors 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 7 #include "fxbarcode/BC_Writer.h" 8 9 CBC_Writer::CBC_Writer() = default; 10 11 CBC_Writer::~CBC_Writer() = default; 12 SetCharEncoding(BC_CHAR_ENCODING encoding)13void CBC_Writer::SetCharEncoding(BC_CHAR_ENCODING encoding) { 14 m_CharEncoding = encoding; 15 } 16 SetModuleHeight(int32_t moduleHeight)17bool CBC_Writer::SetModuleHeight(int32_t moduleHeight) { 18 if (moduleHeight > 10 || moduleHeight < 1) 19 return false; 20 21 m_ModuleHeight = moduleHeight; 22 return true; 23 } 24 SetModuleWidth(int32_t moduleWidth)25bool CBC_Writer::SetModuleWidth(int32_t moduleWidth) { 26 if (moduleWidth > 10 || moduleWidth < 1) 27 return false; 28 29 m_ModuleWidth = moduleWidth; 30 return true; 31 } 32 SetHeight(int32_t height)33void CBC_Writer::SetHeight(int32_t height) { 34 m_Height = height; 35 } 36 SetWidth(int32_t width)37void CBC_Writer::SetWidth(int32_t width) { 38 m_Width = width; 39 } 40 SetTextLocation(BC_TEXT_LOC location)41void CBC_Writer::SetTextLocation(BC_TEXT_LOC location) {} 42 SetWideNarrowRatio(int8_t ratio)43bool CBC_Writer::SetWideNarrowRatio(int8_t ratio) { 44 return false; 45 } 46 SetStartChar(char start)47bool CBC_Writer::SetStartChar(char start) { 48 return false; 49 } 50 SetEndChar(char end)51bool CBC_Writer::SetEndChar(char end) { 52 return false; 53 } 54 SetErrorCorrectionLevel(int32_t level)55bool CBC_Writer::SetErrorCorrectionLevel(int32_t level) { 56 return false; 57 } 58