dmtx.h | dmtx.h | |||
---|---|---|---|---|
/* | /* | |||
libdmtx - Data Matrix Encoding/Decoding Library | libdmtx - Data Matrix Encoding/Decoding Library | |||
Copyright (C) 2006 Mike Laughton | ||||
Copyright (c) 2007 Mike Laughton | ||||
This library is free software; you can redistribute it and/or | This library is free software; you can redistribute it and/or | |||
modify it under the terms of the GNU Lesser General Public | modify it under the terms of the GNU Lesser General Public | |||
License as published by the Free Software Foundation; either | License as published by the Free Software Foundation; either | |||
version 2.1 of the License, or (at your option) any later version. | version 2.1 of the License, or (at your option) any later version. | |||
This library is distributed in the hope that it will be useful, | This library is distributed in the hope that it will be useful, | |||
but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |||
Lesser General Public License for more details. | Lesser General Public License for more details. | |||
skipping to change at line 34 | skipping to change at line 35 | |||
#ifndef __DMTX_H__ | #ifndef __DMTX_H__ | |||
#define __DMTX_H__ | #define __DMTX_H__ | |||
#define DMTX_FAILURE 0 | #define DMTX_FAILURE 0 | |||
#define DMTX_SUCCESS 1 | #define DMTX_SUCCESS 1 | |||
#define DMTX_DISPLAY_SQUARE 1 | #define DMTX_DISPLAY_SQUARE 1 | |||
#define DMTX_DISPLAY_POINT 2 | #define DMTX_DISPLAY_POINT 2 | |||
#define DMTX_DISPLAY_CIRCLE 3 | #define DMTX_DISPLAY_CIRCLE 3 | |||
#define DMTX_MIN_JUMP_COUNT 2 | #define DMTX_MODULE_ON_RGB 0x07 /* ON_RED | ON_GREEN | ON_BLUE */ | |||
#define DMTX_MIN_STEP_RANGE 10 | #define DMTX_MODULE_ON_RED 0x01 | |||
#define DMTX_MIN_JUMP_DISTANCE 10.0 // Minimum color difference for step r | #define DMTX_MODULE_ON_GREEN 0x02 | |||
egion | #define DMTX_MODULE_ON_BLUE 0x04 | |||
#define DMTX_MAX_COLOR_DEVN 20.0 // Maximum deviation from color gradie | #define DMTX_MODULE_ASSIGNED 0x10 | |||
nt | #define DMTX_MODULE_VISITED 0x20 | |||
#define DMTX_FOLLOW_STEPS 5 | #define DMTX_MODULE_DATA 0x40 | |||
/* IMPORTANT: The DmtxDirection enum defines values in a way that facilitat | #define DMTX_SYMBOL_SQUARE_AUTO -1 | |||
es | #define DMTX_SYMBOL_SQUARE_COUNT 24 | |||
turning left or right (x<<1 x>>1). Do not alter this enum unless you | #define DMTX_SYMBOL_RECT_AUTO -2 | |||
understand the full implications of doing so. */ | #define DMTX_SYMBOL_RECT_COUNT 6 | |||
typedef enum { | typedef enum { | |||
DmtxDirNone = 0x00, | DmtxDirNone = 0x00, | |||
DmtxDirUp = 0x01 << 0, | DmtxDirUp = 0x01 << 0, | |||
DmtxDirLeft = 0x01 << 1, | DmtxDirLeft = 0x01 << 1, | |||
DmtxDirDown = 0x01 << 2, | DmtxDirDown = 0x01 << 2, | |||
DmtxDirRight = 0x01 << 3, | DmtxDirRight = 0x01 << 3, | |||
DmtxDirHorizontal = DmtxDirLeft | DmtxDirRight, | DmtxDirHorizontal = DmtxDirLeft | DmtxDirRight, | |||
DmtxDirVertical = DmtxDirUp | DmtxDirDown, | DmtxDirVertical = DmtxDirUp | DmtxDirDown, | |||
DmtxDirRightUp = DmtxDirRight | DmtxDirUp, | DmtxDirRightUp = DmtxDirRight | DmtxDirUp, | |||
DmtxDirLeftDown = DmtxDirLeft | DmtxDirDown | DmtxDirLeftDown = DmtxDirLeft | DmtxDirDown | |||
} DmtxDirection; | } DmtxDirection; | |||
typedef enum { | 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 { | ||||
DmtxSingleScanOnly = 0x01 | DmtxSingleScanOnly = 0x01 | |||
} DmtxOptions; | } DmtxDecodeOptions; | |||
typedef enum { | ||||
DmtxSymAttribSymbolRows, | ||||
DmtxSymAttribSymbolCols, | ||||
DmtxSymAttribDataRegionRows, | ||||
DmtxSymAttribDataRegionCols, | ||||
DmtxSymAttribHorizDataRegions, | ||||
DmtxSymAttribVertDataRegions, | ||||
DmtxSymAttribMappingMatrixRows, | ||||
DmtxSymAttribMappingMatrixCols, | ||||
DmtxSymAttribDataWordLength, | ||||
DmtxSymAttribErrorWordLength, | ||||
DmtxSymAttribInterleavedBlocks | ||||
} DmtxSymAttribute; | ||||
typedef enum { | ||||
DmtxCorner00 = 0x01 << 0, | ||||
DmtxCorner10 = 0x01 << 1, | ||||
DmtxCorner11 = 0x01 << 2, | ||||
DmtxCorner01 = 0x01 << 3 | ||||
} DmtxCornerLoc; | ||||
typedef float DmtxMatrix3[3][3]; | typedef float DmtxMatrix3[3][3]; | |||
typedef struct { | typedef struct DmtxMatrix3Struct_struct { | |||
DmtxMatrix3 m; | DmtxMatrix3 m; | |||
} DmtxMatrix3Struct; | } DmtxMatrix3Struct; | |||
typedef struct { | typedef struct DmtxColor3_struct { | |||
double R; | double R; | |||
double G; | double G; | |||
double B; | double B; | |||
} DmtxColor3; | } DmtxColor3; | |||
typedef struct { | typedef struct DmtxVector2_struct { | |||
double X; | double X; | |||
double Y; | double Y; | |||
} DmtxVector2; | } DmtxVector2; | |||
typedef struct { | typedef struct DmtxRay3_struct { | |||
DmtxColor3 p; | DmtxColor3 p; | |||
DmtxColor3 c; | DmtxColor3 c; | |||
} DmtxRay3; | } DmtxRay3; | |||
typedef struct { | typedef struct DmtxRay2_struct { | |||
char isDefined; | char isDefined; | |||
float tMin, tMax; | float tMin, tMax; | |||
DmtxVector2 p; | DmtxVector2 p; | |||
DmtxVector2 v; | DmtxVector2 v; | |||
} DmtxRay2; | } DmtxRay2; | |||
typedef struct { | typedef struct DmtxGradient_struct { | |||
char isDefined; | char isDefined; | |||
float tMin, tMax, tMid; | float tMin, tMax, tMid; | |||
DmtxRay3 ray; | DmtxRay3 ray; | |||
DmtxColor3 color, colorPrev; // XXX maybe these aren't appropriate varia bles for a gradient? | DmtxColor3 color, colorPrev; /* XXX maybe these aren't appropriate varia bles for a gradient? */ | |||
} DmtxGradient; | } DmtxGradient; | |||
typedef struct { | typedef struct DmtxPixel_struct { | |||
unsigned char R; | unsigned char R; | |||
unsigned char G; | unsigned char G; | |||
unsigned char B; | unsigned char B; | |||
} DmtxPixel; | } DmtxPixel; | |||
typedef struct { | typedef struct DmtxImage_struct { | |||
unsigned int width; | unsigned int width; | |||
unsigned int height; | unsigned int height; | |||
DmtxPixel *pxl; | DmtxPixel *pxl; | |||
} DmtxImage; | } DmtxImage; | |||
typedef struct { | typedef struct DmtxEdge_struct { | |||
DmtxDirection dir; | ||||
int lineNbr; | ||||
int firstPos; | ||||
int lastPos; | ||||
} DmtxScanRange; | ||||
typedef struct { | ||||
DmtxScanRange range; | ||||
DmtxGradient gradient; | ||||
int jumpCount; | ||||
int anchor1; | ||||
int anchor2; | ||||
int lastJump; | ||||
} DmtxJumpRegion; | ||||
typedef struct { | ||||
DmtxScanRange range; | ||||
DmtxJumpRegion region; | ||||
} DmtxJumpScan; | ||||
typedef struct { | ||||
int offset; | int offset; | |||
float t; | float t; | |||
DmtxColor3 color; | DmtxColor3 color; | |||
} DmtxEdge; | } DmtxEdge; | |||
typedef struct { | typedef struct DmtxChain_struct { | |||
DmtxScanRange range; | ||||
DmtxEdge edge; | ||||
DmtxEdge edgeNext; | ||||
float subPixelOffset; // XXX implement it this way first, then | ||||
refactor to offsetFloat (offset + subP..) | ||||
} DmtxEdgeScan; | ||||
typedef struct { | ||||
float tx, ty; | float tx, ty; | |||
float phi, shx; | float phi, shx; | |||
float scx, scy; | float scx, scy; | |||
float bx0, bx1; | float bx0, bx1; | |||
float by0, by1; | float by0, by1; | |||
float sz; | float sz; | |||
} DmtxChain; | } DmtxChain; | |||
typedef struct { | typedef struct DmtxCorners_struct { | |||
DmtxGradient gradient; | DmtxCornerLoc known; /* combination of (DmtxCorner00 | DmtxCorner10 | Dm | |||
DmtxChain chain; | txCorner11 | DmtxCorner01) */ | |||
DmtxMatrix3 raw2fit; | DmtxVector2 c00; | |||
DmtxMatrix3 fit2raw; | DmtxVector2 c10; | |||
DmtxVector2 highHit; | DmtxVector2 c11; | |||
int gapCount; | DmtxVector2 c01; | |||
int sizeIdx; | } DmtxCorners; | |||
int dataRows; | ||||
int dataCols; | typedef struct DmtxMatrixRegion_struct { | |||
int arraySize; | DmtxGradient gradient; /* Linear blend of colors between backgro | |||
int codeSize; | und and symbol color */ | |||
int dataSize; | DmtxChain chain; /* List of values that are used to build | |||
int padSize; | a transformation matrix */ | |||
int outputSize; | DmtxCorners corners; /* Corners of barcode region */ | |||
int outputIdx; | DmtxMatrix3 raw2fit; /* 3x3 transformation from raw image to f | |||
unsigned char *array; | itted barcode grid */ | |||
unsigned char *code; | DmtxMatrix3 fit2raw; /* 3x3 transformation from fitted barcode | |||
unsigned char *error; | grid to raw image */ | |||
unsigned char *output; | int sizeIdx; /* Index of arrays that store Data Matrix | |||
constants */ | ||||
int symbolRows; /* Number of total rows in symbol includi | ||||
ng alignment patterns */ | ||||
int symbolCols; /* Number of total columns in symbol incl | ||||
uding alignment patterns */ | ||||
int mappingRows; /* Number of data rows in symbol */ | ||||
int mappingCols; /* Number of data columns in symbol */ | ||||
int arraySize; /* mappingRows * mappingCols */ | ||||
int codeSize; /* Size of encoded data (data words + err | ||||
or words) */ | ||||
int outputSize; /* Size of buffer used to hold decoded da | ||||
ta */ | ||||
int outputIdx; /* Internal index used to store output pr | ||||
ogress */ | ||||
unsigned char *array; /* Pointer to internal representation of | ||||
scanned Data Matrix modules */ | ||||
unsigned char *code; /* Pointer to internal storage of code wo | ||||
rds (data and error) */ | ||||
unsigned char *output; /* Pointer to internal storage of decoded | ||||
output */ | ||||
} DmtxMatrixRegion; | } DmtxMatrixRegion; | |||
typedef struct { | typedef struct DmtxEdgeFollower_struct { | |||
int slope; | int slope; | |||
int turnCount; | int turnCount; | |||
int paraOffset; | int paraOffset; | |||
float perpOffset; | float perpOffset; | |||
float tMin, tMid, tMax; | float tMin, tMid, tMax; | |||
DmtxRay3 ray; | DmtxRay3 ray; | |||
DmtxRay2 line0, line1; | DmtxRay2 line0, line1; | |||
DmtxDirection dir; | DmtxDirection dir; | |||
} DmtxEdgeFollower; | } DmtxEdgeFollower; | |||
typedef struct { | typedef struct DmtxDecode_struct DmtxDecode; | |||
DmtxVector2 p0, p1, p2; | struct DmtxDecode_struct { | |||
} DmtxFinderBar; | ||||
typedef struct _DmtxDecode DmtxDecode; | ||||
struct _DmtxDecode { | ||||
int option; | int option; | |||
int mosaic; | ||||
int matrixCount; | int matrixCount; | |||
DmtxMatrixRegion matrix[16]; | DmtxMatrixRegion matrix[16]; | |||
DmtxImage image; | DmtxImage image; | |||
void (* stepScanCallback)(DmtxDecode *, DmtxScanRange *, DmtxJumpScan *) | void (* buildMatrixCallback2)(DmtxMatrixRegion *); | |||
; | ||||
void (* crossScanCallback)(DmtxScanRange *, DmtxGradient *, DmtxEdgeScan | ||||
*); | ||||
void (* followScanCallback)(DmtxEdgeFollower *); | ||||
void (* finderBarCallback)(DmtxRay2 *); | ||||
void (* buildMatrixCallback2)(DmtxFinderBar *, DmtxMatrixRegion *); | ||||
void (* buildMatrixCallback3)(DmtxMatrix3); | void (* buildMatrixCallback3)(DmtxMatrix3); | |||
void (* buildMatrixCallback4)(DmtxMatrix3); | void (* buildMatrixCallback4)(DmtxMatrix3); | |||
void (* plotPointCallback)(DmtxVector2, int, int, int); | void (* plotPointCallback)(DmtxVector2, int, int, int); | |||
void (* xfrmPlotPointCallback)(DmtxVector2, DmtxMatrix3, int, int); | void (* xfrmPlotPointCallback)(DmtxVector2, DmtxMatrix3, int, int); | |||
void (* finalCallback)(DmtxMatrixRegion *); | void (* finalCallback)(DmtxDecode *, DmtxMatrixRegion *); | |||
void (* plotModuleCallback)(DmtxDecode *, DmtxMatrixRegion *, int, int, DmtxColor3); | void (* plotModuleCallback)(DmtxDecode *, DmtxMatrixRegion *, int, int, DmtxColor3); | |||
}; | }; | |||
typedef struct { | typedef struct DmtxEncode_struct { | |||
int option; | ||||
int scheme; | ||||
int moduleSize; | int moduleSize; | |||
int marginSize; | int marginSize; | |||
DmtxEncodeMethod method; | ||||
DmtxSchemeEncode scheme; | ||||
DmtxImage image; | DmtxImage image; | |||
DmtxMatrix3 xfrm; | DmtxMatrix3 xfrm; | |||
DmtxMatrix3 rxfrm; | ||||
DmtxMatrixRegion matrix; | DmtxMatrixRegion matrix; | |||
} DmtxEncode; | } DmtxEncode; | |||
typedef struct DmtxChannel_struct { | ||||
DmtxSchemeEncode encScheme; /* current encodation scheme */ | ||||
int invalid; /* channel status (invalid if non- | ||||
zero) */ | ||||
unsigned char *inputPtr; /* pointer to current input charac | ||||
ter */ | ||||
unsigned char *inputStop; /* pointer to position after final | ||||
input character */ | ||||
int encodedLength; /* encoded length (units of 2/3 bi | ||||
ts) */ | ||||
int currentLength; /* current length (units of 2/3 bi | ||||
ts) */ | ||||
int schemeStart; /* currentLength value before writ | ||||
ing 1st encoded word in current scheme */ | ||||
unsigned char encodedWords[1558]; /* array of encoded codewords */ | ||||
} DmtxChannel; | ||||
/* Wrap in a struct for fast copies */ | ||||
typedef struct DmtxChannelGroup_struct { | ||||
DmtxChannel channel[6]; | ||||
} DmtxChannelGroup; | ||||
typedef struct DmtxTriplet_struct { | ||||
unsigned char value[3]; | ||||
} DmtxTriplet; | ||||
typedef struct DmtxQuadruplet_struct { | ||||
unsigned char value[4]; | ||||
} DmtxQuadruplet; | ||||
extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2); | extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2); | |||
extern DmtxVector2 *dmtxVector2Add(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx Vector2 *v2); | extern DmtxVector2 *dmtxVector2Add(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx Vector2 *v2); | |||
extern DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, DmtxVector2 *v2); | extern DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, DmtxVector2 *v2); | |||
extern DmtxVector2 *dmtxVector2Sub(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx Vector2 *v2); | extern DmtxVector2 *dmtxVector2Sub(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx Vector2 *v2); | |||
extern DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, float s); | extern DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, float s); | |||
extern DmtxVector2 *dmtxVector2Scale(DmtxVector2 *vOut, DmtxVector2 *v, flo at s); | extern DmtxVector2 *dmtxVector2Scale(DmtxVector2 *vOut, DmtxVector2 *v, flo at s); | |||
extern float dmtxVector2Cross(DmtxVector2 *v1, DmtxVector2 *v2); | extern float dmtxVector2Cross(DmtxVector2 *v1, DmtxVector2 *v2); | |||
extern float dmtxVector2Norm(DmtxVector2 *v); | extern float dmtxVector2Norm(DmtxVector2 *v); | |||
extern float dmtxVector2Dot(DmtxVector2 *v1, DmtxVector2 *v2); | extern float dmtxVector2Dot(DmtxVector2 *v1, DmtxVector2 *v2); | |||
extern float dmtxVector2Mag(DmtxVector2 *v); | extern float dmtxVector2Mag(DmtxVector2 *v); | |||
skipping to change at line 247 | skipping to change at line 296 | |||
extern DmtxVector2 *dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m); | extern DmtxVector2 *dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m); | |||
extern DmtxVector2 *dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vI n, DmtxMatrix3 m); | extern DmtxVector2 *dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vI n, DmtxMatrix3 m); | |||
extern void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatri x3 m1); | extern void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatri x3 m1); | |||
extern void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1); | extern void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1); | |||
extern void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, float b0, float b1, float sz); | extern void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, float b0, float b1, float sz); | |||
extern void dmtxMatrix3LineSkewTopInv(DmtxMatrix3 m, float b0, float b1, fl oat sz); | extern void dmtxMatrix3LineSkewTopInv(DmtxMatrix3 m, float b0, float b1, fl oat sz); | |||
extern void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, float b0, float b1, floa t sz); | extern void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, float b0, float b1, floa t sz); | |||
extern void dmtxMatrix3LineSkewSideInv(DmtxMatrix3 m, float b0, float b1, f loat sz); | extern void dmtxMatrix3LineSkewSideInv(DmtxMatrix3 m, float b0, float b1, f loat sz); | |||
extern void dmtxMatrix3Print(DmtxMatrix3 m); | extern void dmtxMatrix3Print(DmtxMatrix3 m); | |||
extern void dmtxColor3FromImage(DmtxColor3 *color, DmtxImage *image, int x, int y); | extern DmtxPixel dmtxPixelFromImage(DmtxImage *image, int x, int y); | |||
extern void dmtxColor3FromImage2(DmtxColor3 *color, DmtxImage *image, DmtxV ector2 p); | extern void dmtxColor3FromImage2(DmtxColor3 *color, DmtxImage *image, DmtxV ector2 p); | |||
extern void dmtxColor3FromPixel(DmtxColor3 *color, DmtxPixel *pxl); | extern DmtxColor3 *dmtxColor3FromPixel(DmtxColor3 *color, DmtxPixel *pxl); | |||
extern void dmtxPixelFromColor3(DmtxPixel *pxl, DmtxColor3 *color); | extern void dmtxPixelFromColor3(DmtxPixel *pxl, DmtxColor3 *color); | |||
extern DmtxColor3 dmtxColor3AlongRay3(DmtxRay3 *ray, float dist); | extern DmtxColor3 dmtxColor3AlongRay3(DmtxRay3 *ray, float dist); | |||
extern DmtxColor3 *dmtxColor3AddTo(DmtxColor3 *v1, DmtxColor3 *v2); | extern DmtxColor3 *dmtxColor3AddTo(DmtxColor3 *v1, DmtxColor3 *v2); | |||
extern DmtxColor3 *dmtxColor3Add(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo r3 *v2); | extern DmtxColor3 *dmtxColor3Add(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo r3 *v2); | |||
extern DmtxColor3 *dmtxColor3SubFrom(DmtxColor3 *v1, DmtxColor3 *v2); | extern DmtxColor3 *dmtxColor3SubFrom(DmtxColor3 *v1, DmtxColor3 *v2); | |||
extern DmtxColor3 *dmtxColor3Sub(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo r3 *v2); | extern DmtxColor3 *dmtxColor3Sub(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo r3 *v2); | |||
extern DmtxColor3 *dmtxColor3ScaleBy(DmtxColor3 *v, float s); | extern DmtxColor3 *dmtxColor3ScaleBy(DmtxColor3 *v, float s); | |||
extern DmtxColor3 *dmtxColor3Scale(DmtxColor3 *vOut, DmtxColor3 *v, float s ); | extern DmtxColor3 *dmtxColor3Scale(DmtxColor3 *vOut, DmtxColor3 *v, float s ); | |||
extern DmtxColor3 *dmtxColor3Cross(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxCo lor3 *v2); | extern DmtxColor3 *dmtxColor3Cross(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxCo lor3 *v2); | |||
extern float dmtxColor3Norm(DmtxColor3 *v); | extern float dmtxColor3Norm(DmtxColor3 *v); | |||
skipping to change at line 273 | skipping to change at line 322 | |||
extern float dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxColor3 *q); | extern float dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxColor3 *q); | |||
extern int dmtxPointAlongRay3(DmtxColor3 *point, DmtxRay3 *r, float t); | extern int dmtxPointAlongRay3(DmtxColor3 *point, DmtxRay3 *r, float t); | |||
extern int dmtxImageInit(DmtxImage *image); | extern int dmtxImageInit(DmtxImage *image); | |||
extern int dmtxImageDeInit(DmtxImage *image); | extern int dmtxImageDeInit(DmtxImage *image); | |||
extern int dmtxImageGetWidth(DmtxImage *image); | extern int dmtxImageGetWidth(DmtxImage *image); | |||
extern int dmtxImageGetHeight(DmtxImage *image); | extern int dmtxImageGetHeight(DmtxImage *image); | |||
extern int dmtxImageGetOffset(DmtxImage *image, DmtxDirection dir, int line Nbr, int offset); | extern int dmtxImageGetOffset(DmtxImage *image, DmtxDirection dir, int line Nbr, int offset); | |||
extern int dmtxScanLine(DmtxDecode *decode, DmtxDirection dir, int lineNbr) ; | extern int dmtxScanLine(DmtxDecode *decode, DmtxDirection dir, int lineNbr) ; | |||
extern void dmtxMatrixRegionDeInit(DmtxMatrixRegion *matrixRegion); | extern void dmtxMatrixRegionDeInit(DmtxMatrixRegion *region); | |||
extern DmtxDecode *dmtxDecodeStructCreate(void); | extern DmtxDecode *dmtxDecodeStructCreate(void); | |||
extern void dmtxDecodeStructDestroy(DmtxDecode **decode); | extern void dmtxDecodeStructDestroy(DmtxDecode **decode); | |||
extern DmtxMatrixRegion *dmtxDecodeGetMatrix(DmtxDecode *decode, int index) ; | extern DmtxMatrixRegion *dmtxDecodeGetMatrix(DmtxDecode *decode, int index) ; | |||
extern int dmtxDecodeGetMatrixCount(DmtxDecode *decode); | extern int dmtxDecodeGetMatrixCount(DmtxDecode *decode); | |||
extern void dmtxScanStartNew(DmtxDecode *decode); | extern void dmtxScanStartNew(DmtxDecode *decode); | |||
extern DmtxEncode *dmtxEncodeCreate(void); | extern DmtxEncode *dmtxEncodeStructCreate(void); | |||
extern void dmtxEncodeDestroy(DmtxEncode **encode); | extern void dmtxEncodeStructDestroy(DmtxEncode **encode); | |||
extern int dmtxEncodeData(DmtxEncode *encode, unsigned char *inputString); | extern int dmtxEncodeDataMatrix(DmtxEncode *encode, int inputSize, unsigned | |||
char *inputString, int sizeIdxRequest); | ||||
extern void dmtxSetStepScanCallback(DmtxDecode *decode, void (* func)(DmtxD | extern int dmtxEncodeDataMosaic(DmtxEncode *encode, int inputSize, unsigned | |||
ecode *, DmtxScanRange *, DmtxJumpScan *)); | char *inputString, int sizeIdxRequest); | |||
extern void dmtxSetCrossScanCallback(DmtxDecode *decode, void (* func)(Dmtx | ||||
ScanRange *, DmtxGradient *, DmtxEdgeScan *)); | extern void dmtxSetBuildMatrixCallback2(DmtxDecode *decode, void (* func)(D | |||
extern void dmtxSetFollowScanCallback(DmtxDecode *decode, void (* func)(Dmt | mtxMatrixRegion *)); | |||
xEdgeFollower *)); | ||||
extern void dmtxSetFinderBarCallback(DmtxDecode *decode, void (* func)(Dmtx | ||||
Ray2 *)); | ||||
extern void dmtxSetBuildMatrixCallback2(DmtxDecode *decode, void (* func)(D | ||||
mtxFinderBar *, DmtxMatrixRegion *)); | ||||
extern void dmtxSetBuildMatrixCallback3(DmtxDecode *decode, void (* func)(D mtxMatrix3)); | extern void dmtxSetBuildMatrixCallback3(DmtxDecode *decode, void (* func)(D mtxMatrix3)); | |||
extern void dmtxSetBuildMatrixCallback4(DmtxDecode *decode, void (* func)(D mtxMatrix3)); | extern void dmtxSetBuildMatrixCallback4(DmtxDecode *decode, void (* func)(D mtxMatrix3)); | |||
extern void dmtxSetPlotPointCallback(DmtxDecode *decode, void (* func)(Dmtx Vector2, int, int, int)); | extern void dmtxSetPlotPointCallback(DmtxDecode *decode, void (* func)(Dmtx Vector2, int, int, int)); | |||
extern void dmtxSetXfrmPlotPointCallback(DmtxDecode *decode, void (* func)( DmtxVector2, DmtxMatrix3, int, int)); | extern void dmtxSetXfrmPlotPointCallback(DmtxDecode *decode, void (* func)( DmtxVector2, DmtxMatrix3, int, int)); | |||
extern void dmtxSetFinalCallback(DmtxDecode *decode, void (* func)(DmtxMatr ixRegion *)); | extern void dmtxSetFinalCallback(DmtxDecode *decode, void (* func)(DmtxDeco de *, DmtxMatrixRegion *)); | |||
extern void dmtxSetPlotModuleCallback(DmtxDecode *decode, void (* func)(Dmt xDecode *, DmtxMatrixRegion *, int, int, DmtxColor3)); | extern void dmtxSetPlotModuleCallback(DmtxDecode *decode, void (* func)(Dmt xDecode *, DmtxMatrixRegion *, int, int, DmtxColor3)); | |||
extern int dmtxSymbolModuleStatus(DmtxMatrixRegion *region, int row, int co | ||||
l); | ||||
extern int dmtxGetSymbolAttribute(int attribute, int sizeIdx); | ||||
#endif | #endif | |||
End of changes. 31 change blocks. | ||||
110 lines changed or deleted | 172 lines changed or added | |||