dmtx.h | dmtx.h | |||
---|---|---|---|---|
skipping to change at line 22 | skipping to change at line 22 | |||
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. | |||
You should have received a copy of the GNU Lesser General Public | You should have received a copy of the GNU Lesser General Public | |||
License along with this library; if not, write to the Free Software | License along with this library; if not, write to the Free Software | |||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | |||
Contact: mike@dragonflylogic.com | Contact: mike@dragonflylogic.com | |||
*/ | */ | |||
#include <stdlib.h> | /* $Id: dmtx.h,v 1.10 2006/10/06 05:29:51 mblaughton Exp $ */ | |||
#include <stdio.h> | ||||
#include <string.h> | ||||
#include <math.h> | ||||
#ifndef __DMTX_H__ | #ifndef __DMTX_H__ | |||
#define __DMTX_H__ | #define __DMTX_H__ | |||
#define DMTX_ALMOST_ZERO 0.000001 | ||||
#define DMTX_FALSE 0 | ||||
#define DMTX_TRUE 1 | ||||
#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_MIN_JUMP_COUNT 2 | |||
#define DMTX_MIN_STEP_RANGE 10 | #define DMTX_MIN_STEP_RANGE 10 | |||
#define DMTX_MIN_JUMP_DISTANCE 10.0 // Minimum color difference for step r egion | #define DMTX_MIN_JUMP_DISTANCE 10.0 // Minimum color difference for step r egion | |||
#define DMTX_MAX_COLOR_DEVN 20.0 // Maximum deviation from color gradie nt | #define DMTX_MAX_COLOR_DEVN 20.0 // Maximum deviation from color gradie nt | |||
#define DMTX_FOLLOW_STEPS 5 | #define DMTX_FOLLOW_STEPS 5 | |||
#define DMTX_ENCODING_AUTO 1 | ||||
#define DMTX_ENCODING_ASCII 2 | ||||
#define DMTX_ENCODING_C40 3 | ||||
#define DMTX_ENCODING_TEXT 4 | ||||
#define DMTX_ENCODING_BASE256 5 | ||||
#define DMTX_MODULE_OFF 0x00 | ||||
#define DMTX_MODULE_ON 0x01 | ||||
#define DMTX_MODULE_ASSIGNED 0x02 | ||||
#define DMTX_MODULE_VISITED 0x04 | ||||
/* IMPORTANT: The DmtxDirection enum defines values in a way that facilitat es | /* IMPORTANT: The DmtxDirection enum defines values in a way that facilitat es | |||
turning left or right (x<<1 x>>1). Do not alter this enum unless you | turning left or right (x<<1 x>>1). Do not alter this enum unless you | |||
understand the full implications of doing so. */ | understand the full implications of doing so. */ | |||
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 { | |||
DmtxSingleScanOnly = 0x00 | DmtxSingleScanOnly = 0x01 | |||
} DmtxOptions; | } DmtxOptions; | |||
typedef float DmtxMatrix3[3][3]; | typedef float DmtxMatrix3[3][3]; | |||
typedef struct { | typedef struct { | |||
DmtxMatrix3 m; | DmtxMatrix3 m; | |||
} DmtxMatrix3Struct; | } DmtxMatrix3Struct; | |||
typedef struct { | typedef struct { | |||
float X; | double R; | |||
float Y; | double G; | |||
float Z; | double B; | |||
} DmtxVector3; | } DmtxColor3; | |||
typedef struct { | typedef struct { | |||
float X; | double X; | |||
float Y; | double Y; | |||
} DmtxVector2; | } DmtxVector2; | |||
typedef struct { | typedef struct { | |||
DmtxVector3 p; | DmtxColor3 p; | |||
DmtxVector3 v; | DmtxColor3 c; | |||
} DmtxRay3; | } DmtxRay3; | |||
typedef struct { | typedef 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 { | |||
char isDefined; | char isDefined; | |||
float tMin, tMax, tMid; | float tMin, tMax, tMid; | |||
DmtxRay3 ray; | DmtxRay3 ray; | |||
DmtxVector3 color, colorPrev; // XXX maybe these aren't appropriate vari ables for a gradient? | DmtxColor3 color, colorPrev; // XXX maybe these aren't appropriate varia bles for a gradient? | |||
} DmtxGradient; | } DmtxGradient; | |||
typedef struct { | typedef 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 { | |||
unsigned int width; | unsigned int width; | |||
skipping to change at line 150 | skipping to change at line 131 | |||
} DmtxJumpRegion; | } DmtxJumpRegion; | |||
typedef struct { | typedef struct { | |||
DmtxScanRange range; | DmtxScanRange range; | |||
DmtxJumpRegion region; | DmtxJumpRegion region; | |||
} DmtxJumpScan; | } DmtxJumpScan; | |||
typedef struct { | typedef struct { | |||
int offset; | int offset; | |||
float t; | float t; | |||
DmtxVector3 color; | DmtxColor3 color; | |||
} DmtxEdge; | } DmtxEdge; | |||
typedef struct { | typedef struct { | |||
DmtxScanRange range; | DmtxScanRange range; | |||
DmtxEdge edge; | DmtxEdge edge; | |||
DmtxEdge edgeNext; | DmtxEdge edgeNext; | |||
float subPixelOffset; // XXX implement it this way first, then refactor to offsetFloat (offset + subP..) | float subPixelOffset; // XXX implement it this way first, then refactor to offsetFloat (offset + subP..) | |||
} DmtxEdgeScan; | } DmtxEdgeScan; | |||
typedef struct { | typedef struct { | |||
float tx, ty; | float tx, ty; | |||
float shx, shy; | float phi, shx; | |||
float scx, scy; | float scx, scy; | |||
float bx0, bx1; | float bx0, bx1; | |||
float by0, by1; | float by0, by1; | |||
float sz; | ||||
} DmtxChain; | } DmtxChain; | |||
typedef struct { | typedef struct { | |||
DmtxGradient gradient; | DmtxGradient gradient; | |||
DmtxChain chain; | DmtxChain chain; | |||
DmtxMatrix3 raw2fit; | DmtxMatrix3 raw2fit; | |||
DmtxMatrix3 fit2raw; | DmtxMatrix3 fit2raw; | |||
DmtxVector2 calibTopP0; | DmtxVector2 highHit; | |||
DmtxVector2 calibTopP1; | int gapCount; | |||
int sizeIdx; | int sizeIdx; | |||
int dataRows; | int dataRows; | |||
int dataCols; | int dataCols; | |||
int arraySize; | int arraySize; | |||
int codeSize; | int codeSize; | |||
int dataSize; | int dataSize; | |||
int padSize; | int padSize; | |||
int outputSize; | int outputSize; | |||
int outputIdx; | int outputIdx; | |||
unsigned char *array; | unsigned char *array; | |||
skipping to change at line 205 | skipping to change at line 187 | |||
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 { | |||
DmtxVector2 p0, p1, p2; | DmtxVector2 p0, p1, p2; | |||
} DmtxFinderBar; | } DmtxFinderBar; | |||
typedef struct _DmtxInfo DmtxInfo; | typedef struct _DmtxDecode DmtxDecode; | |||
struct _DmtxInfo { | struct _DmtxDecode { | |||
int option; | int option; | |||
int matrixCount; | int matrixCount; | |||
DmtxMatrixRegion matrix[16]; | DmtxMatrixRegion matrix[16]; | |||
DmtxImage image; | DmtxImage image; | |||
void (* stepScanCallback)(DmtxInfo *, DmtxScanRange *, DmtxJumpScan *); | void (* stepScanCallback)(DmtxDecode *, DmtxScanRange *, DmtxJumpScan *) ; | |||
void (* crossScanCallback)(DmtxScanRange *, DmtxGradient *, DmtxEdgeScan *); | void (* crossScanCallback)(DmtxScanRange *, DmtxGradient *, DmtxEdgeScan *); | |||
void (* followScanCallback)(DmtxEdgeFollower *); | void (* followScanCallback)(DmtxEdgeFollower *); | |||
void (* finderBarCallback)(DmtxRay2 *); | void (* finderBarCallback)(DmtxRay2 *); | |||
void (* buildMatrixCallback2)(DmtxFinderBar *, DmtxMatrixRegion *); | 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)(DmtxMatrixRegion *); | |||
void (* plotModuleCallback)(DmtxInfo *, DmtxMatrixRegion *, int, int, Dm txVector3); | void (* plotModuleCallback)(DmtxDecode *, DmtxMatrixRegion *, int, int, DmtxColor3); | |||
}; | }; | |||
/* encoding structs ******************************************************* | ||||
**/ | ||||
typedef struct { | typedef struct { | |||
int option; | int option; | |||
int scheme; | int scheme; | |||
int moduleSize; | int moduleSize; | |||
int marginSize; | int marginSize; | |||
DmtxImage image; | DmtxImage image; | |||
DmtxMatrix3 xfrm; | DmtxMatrix3 xfrm; | |||
DmtxMatrixRegion matrix; | DmtxMatrixRegion matrix; | |||
} DmtxEncode; | } DmtxEncode; | |||
/************************************************************************** | extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2); | |||
**/ | extern DmtxVector2 *dmtxVector2Add(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx | |||
Vector2 *v2); | ||||
DmtxVector3 *dmtxVector3AddTo(DmtxVector3 *v1, DmtxVector3 *v2); | extern DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, DmtxVector2 *v2); | |||
DmtxVector3 *dmtxVector3Add(DmtxVector3 *vOut, DmtxVector3 *v1, DmtxVector3 | extern DmtxVector2 *dmtxVector2Sub(DmtxVector2 *vOut, DmtxVector2 *v1, Dmtx | |||
*v2); | Vector2 *v2); | |||
DmtxVector3 *dmtxVector3SubFrom(DmtxVector3 *v1, DmtxVector3 *v2); | extern DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, float s); | |||
DmtxVector3 *dmtxVector3Sub(DmtxVector3 *vOut, DmtxVector3 *v1, DmtxVector3 | extern DmtxVector2 *dmtxVector2Scale(DmtxVector2 *vOut, DmtxVector2 *v, flo | |||
*v2); | at s); | |||
DmtxVector3 *dmtxVector3ScaleBy(DmtxVector3 *v, float s); | extern float dmtxVector2Cross(DmtxVector2 *v1, DmtxVector2 *v2); | |||
DmtxVector3 *dmtxVector3Scale(DmtxVector3 *vOut, DmtxVector3 *v, float s); | extern float dmtxVector2Norm(DmtxVector2 *v); | |||
DmtxVector3 *dmtxVector3Cross(DmtxVector3 *vOut, DmtxVector3 *v1, DmtxVecto | extern float dmtxVector2Dot(DmtxVector2 *v1, DmtxVector2 *v2); | |||
r3 *v2); | extern float dmtxVector2Mag(DmtxVector2 *v); | |||
float dmtxVector3Norm(DmtxVector3 *v); | extern float dmtxDistanceFromRay2(DmtxRay2 *r, DmtxVector2 *q); | |||
float dmtxVector3Dot(DmtxVector3 *v1, DmtxVector3 *v2); | extern float dmtxDistanceAlongRay2(DmtxRay2 *r, DmtxVector2 *q); | |||
float dmtxVector3Mag(DmtxVector3 *v); | extern int dmtxRay2Intersect(DmtxVector2 *point, DmtxRay2 *p0, DmtxRay2 *p1 | |||
float dmtxDistanceFromRay3(DmtxRay3 *r, DmtxVector3 *q); | ); | |||
float dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxVector3 *q); | extern int dmtxPointAlongRay2(DmtxVector2 *point, DmtxRay2 *r, float t); | |||
int dmtxPointAlongRay3(DmtxVector3 *point, DmtxRay3 *r, float t); | ||||
extern void dmtxMatrix3Copy(DmtxMatrix3 m0, DmtxMatrix3 m1); | ||||
DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2); | extern void dmtxMatrix3Identity(DmtxMatrix3 m); | |||
DmtxVector2 *dmtxVector2Add(DmtxVector2 *vOut, DmtxVector2 *v1, DmtxVector2 | extern void dmtxMatrix3Translate(DmtxMatrix3 m, float tx, float ty); | |||
*v2); | extern void dmtxMatrix3Rotate(DmtxMatrix3 m, double angle); | |||
DmtxVector2 *dmtxVector2SubFrom(DmtxVector2 *v1, DmtxVector2 *v2); | extern void dmtxMatrix3Scale(DmtxMatrix3 m, float sx, float sy); | |||
DmtxVector2 *dmtxVector2Sub(DmtxVector2 *vOut, DmtxVector2 *v1, DmtxVector2 | extern void dmtxMatrix3Shear(DmtxMatrix3 m, float shx, float shy); | |||
*v2); | extern DmtxVector2 *dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m); | |||
DmtxVector2 *dmtxVector2ScaleBy(DmtxVector2 *v, float s); | extern DmtxVector2 *dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vI | |||
DmtxVector2 *dmtxVector2Scale(DmtxVector2 *vOut, DmtxVector2 *v, float s); | n, DmtxMatrix3 m); | |||
float dmtxVector2Cross(DmtxVector2 *v1, DmtxVector2 *v2); | extern void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatri | |||
float dmtxVector2Norm(DmtxVector2 *v); | x3 m1); | |||
float dmtxVector2Dot(DmtxVector2 *v1, DmtxVector2 *v2); | extern void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1); | |||
float dmtxVector2Mag(DmtxVector2 *v); | extern void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, float b0, float b1, float | |||
float dmtxDistanceFromRay2(DmtxRay2 *r, DmtxVector2 *q); | sz); | |||
float dmtxDistanceAlongRay2(DmtxRay2 *r, DmtxVector2 *q); | extern void dmtxMatrix3LineSkewTopInv(DmtxMatrix3 m, float b0, float b1, fl | |||
int dmtxRay2Intersect(DmtxVector2 *point, DmtxRay2 *p0, DmtxRay2 *p1); | oat sz); | |||
int dmtxPointAlongRay2(DmtxVector2 *point, DmtxRay2 *r, float t); | extern void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, float b0, float b1, floa | |||
t sz); | ||||
void dmtxMatrix3Copy(DmtxMatrix3 m0, DmtxMatrix3 m1); | extern void dmtxMatrix3LineSkewSideInv(DmtxMatrix3 m, float b0, float b1, f | |||
void dmtxMatrix3Identity(DmtxMatrix3 m); | loat sz); | |||
void dmtxMatrix3Transpose(DmtxMatrix3 mIn, DmtxMatrix3 mOut); | extern void dmtxMatrix3Print(DmtxMatrix3 m); | |||
double dmtxMatrix3Determinate(DmtxMatrix3 m); | ||||
int dmtxMatrix3Inverse(DmtxMatrix3 mr, DmtxMatrix3 ma); | extern void dmtxColor3FromImage(DmtxColor3 *color, DmtxImage *image, int x, | |||
void dmtxMatrix3Translate(DmtxMatrix3 m, float tx, float ty); | int y); | |||
void dmtxMatrix3Rotate(DmtxMatrix3 m, float angle); | extern void dmtxColor3FromImage2(DmtxColor3 *color, DmtxImage *image, DmtxV | |||
void dmtxMatrix3Scale(DmtxMatrix3 m, float sx, float sy); | ector2 p); | |||
void dmtxMatrix3Shear(DmtxMatrix3 m, float shx, float shy); | extern void dmtxColor3FromPixel(DmtxColor3 *color, DmtxPixel *pxl); | |||
DmtxVector2 *dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m); | extern void dmtxPixelFromColor3(DmtxPixel *pxl, DmtxColor3 *color); | |||
DmtxVector2 *dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vIn, Dmtx | extern DmtxColor3 dmtxColor3AlongRay3(DmtxRay3 *ray, float dist); | |||
Matrix3 m); | extern DmtxColor3 *dmtxColor3AddTo(DmtxColor3 *v1, DmtxColor3 *v2); | |||
void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatrix3 m1); | extern DmtxColor3 *dmtxColor3Add(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo | |||
void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1); | r3 *v2); | |||
void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, float b0, float b1, float sz); | extern DmtxColor3 *dmtxColor3SubFrom(DmtxColor3 *v1, DmtxColor3 *v2); | |||
void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, float b0, float b1, float sz); | extern DmtxColor3 *dmtxColor3Sub(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxColo | |||
void dmtxMatrix3Print(DmtxMatrix3 m); | r3 *v2); | |||
extern DmtxColor3 *dmtxColor3ScaleBy(DmtxColor3 *v, float s); | ||||
void dmtxColorFromImage(DmtxVector3 *color, DmtxImage *image, int x, int y) | extern DmtxColor3 *dmtxColor3Scale(DmtxColor3 *vOut, DmtxColor3 *v, float s | |||
; | ); | |||
void dmtxColorFromImage2(DmtxVector3 *color, DmtxImage *image, DmtxVector2 | extern DmtxColor3 *dmtxColor3Cross(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxCo | |||
p); | lor3 *v2); | |||
void dmtxColorFromPixel(DmtxVector3 *color, DmtxPixel *pxl); | extern float dmtxColor3Norm(DmtxColor3 *v); | |||
void dmtxPixelFromColor(DmtxPixel *pxl, DmtxVector3 *color); | extern float dmtxColor3Dot(DmtxColor3 *v1, DmtxColor3 *v2); | |||
DmtxVector3 dmtxColorAlongRay3(DmtxRay3 *ray, float dist); | extern float dmtxColor3Mag(DmtxColor3 *v); | |||
extern float dmtxDistanceFromRay3(DmtxRay3 *r, DmtxColor3 *q); | ||||
int dmtxImageInit(DmtxImage *image); | extern float dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxColor3 *q); | |||
int dmtxImageDeInit(DmtxImage *image); | extern int dmtxPointAlongRay3(DmtxColor3 *point, DmtxRay3 *r, float t); | |||
int dmtxImageGetWidth(DmtxImage *image); | ||||
int dmtxImageGetHeight(DmtxImage *image); | extern int dmtxImageInit(DmtxImage *image); | |||
int dmtxImageGetOffset(DmtxImage *image, DmtxDirection dir, int lineNbr, in | extern int dmtxImageDeInit(DmtxImage *image); | |||
t offset); | extern int dmtxImageGetWidth(DmtxImage *image); | |||
int dmtxImageLoadPng(DmtxImage *image, char *filename); | extern int dmtxImageGetHeight(DmtxImage *image); | |||
extern int dmtxImageGetOffset(DmtxImage *image, DmtxDirection dir, int line | ||||
int dmtxScanLine(DmtxInfo *info, DmtxDirection dir, int lineNbr); | Nbr, int offset); | |||
void dmtxMatrixRegionDeInit(DmtxMatrixRegion *matrixRegion); | ||||
int dmtxPatternReadEcc200Modules(DmtxMatrixRegion *matrixRegion); | extern int dmtxScanLine(DmtxDecode *decode, DmtxDirection dir, int lineNbr) | |||
int dmtxGfSum(int a, int b); | ; | |||
int dmtxGfProduct(int a, int b); | extern void dmtxMatrixRegionDeInit(DmtxMatrixRegion *matrixRegion); | |||
DmtxInfo *dmtxInfoStructCreate(void); | extern DmtxDecode *dmtxDecodeStructCreate(void); | |||
void dmtxInfoStructDestroy(DmtxInfo **info); | extern void dmtxDecodeStructDestroy(DmtxDecode **decode); | |||
DmtxMatrixRegion *dmtxInfoGetMatrix(DmtxInfo *info, int index); | extern DmtxMatrixRegion *dmtxDecodeGetMatrix(DmtxDecode *decode, int index) | |||
int dmtxInfoGetMatrixCount(DmtxInfo *info); | ; | |||
void dmtxScanStartNew(DmtxInfo *info); | extern int dmtxDecodeGetMatrixCount(DmtxDecode *decode); | |||
void dmtxSetStepScanCallback(DmtxInfo *info, void (* func)(DmtxInfo *, Dmtx | extern void dmtxScanStartNew(DmtxDecode *decode); | |||
ScanRange *, DmtxJumpScan *)); | ||||
void dmtxSetCrossScanCallback(DmtxInfo *info, void (* func)(DmtxScanRange * | extern DmtxEncode *dmtxEncodeCreate(void); | |||
, DmtxGradient *, DmtxEdgeScan *)); | extern void dmtxEncodeDestroy(DmtxEncode **encode); | |||
void dmtxSetFollowScanCallback(DmtxInfo *info, void (* func)(DmtxEdgeFollow | extern int dmtxEncodeData(DmtxEncode *encode, unsigned char *inputString); | |||
er *)); | ||||
void dmtxSetFinderBarCallback(DmtxInfo *info, void (* func)(DmtxRay2 *)); | extern void dmtxSetStepScanCallback(DmtxDecode *decode, void (* func)(DmtxD | |||
void dmtxSetBuildMatrixCallback2(DmtxInfo *info, void (* func)(DmtxFinderBa | ecode *, DmtxScanRange *, DmtxJumpScan *)); | |||
r *, DmtxMatrixRegion *)); | extern void dmtxSetCrossScanCallback(DmtxDecode *decode, void (* func)(Dmtx | |||
void dmtxSetBuildMatrixCallback3(DmtxInfo *info, void (* func)(DmtxMatrix3) | ScanRange *, DmtxGradient *, DmtxEdgeScan *)); | |||
); | extern void dmtxSetFollowScanCallback(DmtxDecode *decode, void (* func)(Dmt | |||
void dmtxSetBuildMatrixCallback4(DmtxInfo *info, void (* func)(DmtxMatrix3) | xEdgeFollower *)); | |||
); | extern void dmtxSetFinderBarCallback(DmtxDecode *decode, void (* func)(Dmtx | |||
void dmtxSetPlotPointCallback(DmtxInfo *info, void (* func)(DmtxVector2, in | Ray2 *)); | |||
t, int, int)); | extern void dmtxSetBuildMatrixCallback2(DmtxDecode *decode, void (* func)(D | |||
void dmtxSetXfrmPlotPointCallback(DmtxInfo *info, void (* func)(DmtxVector2 | mtxFinderBar *, DmtxMatrixRegion *)); | |||
, DmtxMatrix3, int, int)); | extern void dmtxSetBuildMatrixCallback3(DmtxDecode *decode, void (* func)(D | |||
void dmtxSetFinalCallback(DmtxInfo *info, void (* func)(DmtxMatrixRegion *) | mtxMatrix3)); | |||
); | extern void dmtxSetBuildMatrixCallback4(DmtxDecode *decode, void (* func)(D | |||
void dmtxSetPlotModuleCallback(DmtxInfo *info, void (* func)(DmtxInfo *, Dm | mtxMatrix3)); | |||
txMatrixRegion *, int, int, DmtxVector3)); | extern void dmtxSetPlotPointCallback(DmtxDecode *decode, void (* func)(Dmtx | |||
Vector2, int, int, int)); | ||||
/* encoding functions ***************************************************** | extern void dmtxSetXfrmPlotPointCallback(DmtxDecode *decode, void (* func)( | |||
**/ | DmtxVector2, DmtxMatrix3, int, int)); | |||
extern void dmtxSetFinalCallback(DmtxDecode *decode, void (* func)(DmtxMatr | ||||
DmtxEncode *dmtxEncodeCreate(void); | ixRegion *)); | |||
void dmtxEncodeDestroy(DmtxEncode **encode); | extern void dmtxSetPlotModuleCallback(DmtxDecode *decode, void (* func)(Dmt | |||
int dmtxEncodeData(DmtxEncode *encode, unsigned char *inputString); | xDecode *, DmtxMatrixRegion *, int, int, DmtxColor3)); | |||
/************************************************************************** | ||||
**/ | ||||
#endif | #endif | |||
End of changes. 17 change blocks. | ||||
154 lines changed or deleted | 130 lines changed or added | |||