⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dmtx.h

📁 Datamatrix二维码库和测试程序,运行于linux,仔细研究可以很容易转化成VC程序,有这就没必要化钱买个控件了,本人libdmtx-0.3版本转化过,的确可行,现在把找到该版本的libdmtx
💻 H
📖 第 1 页 / 共 2 页
字号:
/*libdmtx - Data Matrix Encoding/Decoding LibraryCopyright (c) 2008 Mike LaughtonThis library is free software; you can redistribute it and/ormodify it under the terms of the GNU Lesser General PublicLicense as published by the Free Software Foundation; eitherversion 2.1 of the License, or (at your option) any later version.This library is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNULesser General Public License for more details.You should have received a copy of the GNU Lesser General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USAContact: mike@dragonflylogic.com*//* $Id: dmtx.h 519 2008-11-21 05:27:42Z mblaughton $ *//** * @file dmtx.h * @brief Main libdmtx header */#ifndef __DMTX_H__#define __DMTX_H__#include <time.h>#if defined(HAVE_SYS_TIME_H)#include <sys/time.h>#endif#ifdef __cplusplusextern "C" {#endif#ifndef M_PI#define M_PI       3.14159265358979323846#endif#ifndef M_PI_2#define M_PI_2     1.57079632679489661923#endif#define DMTX_VERSION                   "0.6.0"#define DMTX_FAILURE                   0#define DMTX_SUCCESS                   1#define DMTX_FALSE                     0#define DMTX_TRUE                      1#define DMTX_BAD_OFFSET               -1#define DMTX_STATUS_NOT_SCANNED        0#define DMTX_STATUS_VALID              1#define DMTX_STATUS_INVALID            2#define DMTX_DISPLAY_SQUARE            1#define DMTX_DISPLAY_POINT             2#define DMTX_DISPLAY_CIRCLE            3#define DMTX_REGION_FOUND              0#define DMTX_REGION_NOT_FOUND          1#define DMTX_REGION_TIMEOUT            2#define DMTX_REGION_EOF                3#define DMTX_REGION_DROPPED_EDGE       4#define DMTX_REGION_DROPPED_FINDER     5#define DMTX_REGION_DROPPED_TOP        6#define DMTX_REGION_DROPPED_RIGHT      7#define DMTX_REGION_DROPPED_SIZE       8#define DMTX_MODULE_OFF             0x00#define DMTX_MODULE_ON_RED          0x01#define DMTX_MODULE_ON_GREEN        0x02#define DMTX_MODULE_ON_BLUE         0x04#define DMTX_MODULE_ON_RGB          0x07  /* ON_RED | ON_GREEN | ON_BLUE */#define DMTX_MODULE_ON              0x07#define DMTX_MODULE_UNSURE          0x08#define DMTX_MODULE_ASSIGNED        0x10#define DMTX_MODULE_VISITED         0x20#define DMTX_MODULE_DATA            0x40#define DMTX_FORMAT_MATRIX             0#define DMTX_FORMAT_MOSAIC             1#define DMTX_SYMBOL_SQUARE_COUNT      24#define DMTX_SYMBOL_RECT_COUNT         6typedef enum {   DmtxDirNone       = 0x00,   DmtxDirUp         = 0x01 << 0,   DmtxDirLeft       = 0x01 << 1,   DmtxDirDown       = 0x01 << 2,   DmtxDirRight      = 0x01 << 3,   DmtxDirHorizontal = DmtxDirLeft  | DmtxDirRight,   DmtxDirVertical   = DmtxDirUp    | DmtxDirDown,   DmtxDirRightUp    = DmtxDirRight | DmtxDirUp,   DmtxDirLeftDown   = DmtxDirLeft  | DmtxDirDown} DmtxDirection;typedef enum {   DmtxEncodeAutoBest,   DmtxEncodeAutoFast,   DmtxEncodeSingleScheme} DmtxEncodeMethod;typedef enum {   DmtxSchemeEncodeAscii,   DmtxSchemeEncodeC40,   DmtxSchemeEncodeText,   DmtxSchemeEncodeX12,   DmtxSchemeEncodeEdifact,   DmtxSchemeEncodeBase256,   DmtxSchemeEncodeAutoBest,   DmtxSchemeEncodeAutoFast} DmtxSchemeEncode;typedef enum {   DmtxSchemeDecodeAsciiStd,   DmtxSchemeDecodeAsciiExt,   DmtxSchemeDecodeC40,   DmtxSchemeDecodeText,   DmtxSchemeDecodeX12,   DmtxSchemeDecodeEdifact,   DmtxSchemeDecodeBase256} DmtxSchemeDecode;typedef enum {   DmtxSymAttribSymbolRows,   DmtxSymAttribSymbolCols,   DmtxSymAttribDataRegionRows,   DmtxSymAttribDataRegionCols,   DmtxSymAttribHorizDataRegions,   DmtxSymAttribVertDataRegions,   DmtxSymAttribMappingMatrixRows,   DmtxSymAttribMappingMatrixCols,   DmtxSymAttribInterleavedBlocks,   DmtxSymAttribBlockErrorWords,   DmtxSymAttribBlockMaxCorrectable,   DmtxSymAttribSymbolDataWords,   DmtxSymAttribSymbolErrorWords,   DmtxSymAttribSymbolMaxCorrectable} DmtxSymAttribute;typedef enum {   DmtxCorner00 = 0x01 << 0,   DmtxCorner10 = 0x01 << 1,   DmtxCorner11 = 0x01 << 2,   DmtxCorner01 = 0x01 << 3} DmtxCornerLoc;typedef enum {   DmtxPropEdgeMin,   DmtxPropEdgeMax,   DmtxPropScanGap,   DmtxPropSquareDevn,   DmtxPropSymbolSize,   DmtxPropEdgeThresh,   DmtxPropWidth,   DmtxPropHeight,   DmtxPropArea,   DmtxPropXmin,   DmtxPropXmax,   DmtxPropYmin,   DmtxPropYmax,   DmtxPropShrinkMin,   DmtxPropShrinkMax,   DmtxPropScale,   DmtxPropScaledWidth,   DmtxPropScaledHeight,   DmtxPropScaledArea,   DmtxPropScaledXmin,   DmtxPropScaledXmax,   DmtxPropScaledYmin,   DmtxPropScaledYmax} DmtxDecodeProperty;typedef enum {   DmtxSymbolRectAuto   = -3,   DmtxSymbolSquareAuto = -2,   DmtxSymbolShapeAuto  = -1,   DmtxSymbol10x10      =  0,   DmtxSymbol12x12,   DmtxSymbol14x14,   DmtxSymbol16x16,   DmtxSymbol18x18,   DmtxSymbol20x20,   DmtxSymbol22x22,   DmtxSymbol24x24,   DmtxSymbol26x26,   DmtxSymbol32x32,   DmtxSymbol36x36,   DmtxSymbol40x40,   DmtxSymbol44x44,   DmtxSymbol48x48,   DmtxSymbol52x52,   DmtxSymbol64x64,   DmtxSymbol72x72,   DmtxSymbol80x80,   DmtxSymbol88x88,   DmtxSymbol96x96,   DmtxSymbol104x104,   DmtxSymbol120x120,   DmtxSymbol132x132,   DmtxSymbol144x144,   DmtxSymbol8x18,   DmtxSymbol8x32,   DmtxSymbol12x26,   DmtxSymbol12x36,   DmtxSymbol16x36,   DmtxSymbol16x48} DmtxSymbolSize;typedef double DmtxMatrix3[3][3];typedef unsigned char DmtxRgb[3];/** * @struct DmtxColor3 * @brief DmtxColor3 */typedef struct DmtxColor3_struct {   double R;   double G;   double B;} DmtxColor3;/** * @struct DmtxPixelLoc * @brief DmtxPixelLoc */typedef struct DmtxPixelLoc_struct {   int X;   int Y;   int status;} DmtxPixelLoc;/** * @struct DmtxVector2 * @brief DmtxVector2 */typedef struct DmtxVector2_struct {   double X;   double Y;} DmtxVector2;/** * @struct DmtxRay3 * @brief DmtxRay3 */typedef struct DmtxRay3_struct {   DmtxColor3 p;   DmtxColor3 c;} DmtxRay3;/** * @struct DmtxRay2 * @brief DmtxRay2 */typedef struct DmtxRay2_struct {   char        isDefined;   double      tMin, tMax;   DmtxVector2 p;   DmtxVector2 v;} DmtxRay2;/** * @struct DmtxGradient * @brief DmtxGradient */typedef struct DmtxGradient_struct {   char       isDefined;   double     tMin, tMax;   DmtxRay3   ray;} DmtxGradient;/** * @struct DmtxImage * @brief DmtxImage */typedef struct DmtxImage_struct {   int             width;  /* unscaled */   int             height; /* unscaled */   int             xMin;   /* unscaled */   int             xMax;   /* unscaled */   int             yMin;   /* unscaled */   int             yMax;   /* unscaled */   int             scale;   int             widthScaled;   int             heightScaled;   int             xMinScaled;   int             xMaxScaled;   int             yMinScaled;   int             yMaxScaled;   int             pageCount;   unsigned char   *cache;   DmtxRgb         *pxl;} DmtxImage;/** * @struct DmtxPointFlow * @brief DmtxPointFlow */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -