dmtx.h   dmtx.h 
skipping to change at line 23 skipping to change at line 23
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
*/ */
/* $Id: dmtx.h 124 2008-04-13 01:38:03Z mblaughton $ */ /* $Id: dmtx.h 185 2008-06-17 20:07:47Z mblaughton $ */
/**
* @file dmtx.h
* @brief Main libdmtx header
*/
#ifndef __DMTX_H__ #ifndef __DMTX_H__
#define __DMTX_H__ #define __DMTX_H__
#define DMTX_VERSION "0.5.0" #ifdef __cplusplus
extern "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.5.1"
#define DMTX_FAILURE 0 #define DMTX_FAILURE 0
#define DMTX_SUCCESS 1 #define DMTX_SUCCESS 1
#define DMTX_STATUS_NOT_SCANNED 0 #define DMTX_STATUS_NOT_SCANNED 0
#define DMTX_STATUS_VALID 1 #define DMTX_STATUS_VALID 1
#define DMTX_STATUS_INVALID 2 #define DMTX_STATUS_INVALID 2
#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_REGION_EOF -1 #define DMTX_REGION_FOUND 0
#define DMTX_REGION_NOT_FOUND 0 #define DMTX_REGION_NOT_FOUND 1
#define DMTX_REGION_FOUND 1 #define DMTX_REGION_TIMEOUT 2
#define DMTX_REGION_EOF 3
#define DMTX_MODULE_OFF 0x00 #define DMTX_MODULE_OFF 0x00
#define DMTX_MODULE_ON_RED 0x01 #define DMTX_MODULE_ON_RED 0x01
#define DMTX_MODULE_ON_GREEN 0x02 #define DMTX_MODULE_ON_GREEN 0x02
#define DMTX_MODULE_ON_BLUE 0x04 #define DMTX_MODULE_ON_BLUE 0x04
#define DMTX_MODULE_ON_RGB 0x07 /* ON_RED | ON_GREEN | ON_BLUE */ #define DMTX_MODULE_ON_RGB 0x07 /* ON_RED | ON_GREEN | ON_BLUE */
#define DMTX_MODULE_UNSURE 0x08 /* ON_RED | ON_GREEN | ON_BLUE */ #define DMTX_MODULE_UNSURE 0x08 /* ON_RED | ON_GREEN | ON_BLUE */
#define DMTX_MODULE_ASSIGNED 0x10 #define DMTX_MODULE_ASSIGNED 0x10
#define DMTX_MODULE_VISITED 0x20 #define DMTX_MODULE_VISITED 0x20
#define DMTX_MODULE_DATA 0x40 #define DMTX_MODULE_DATA 0x40
#define DMTX_FORMAT_MATRIX 0
#define DMTX_FORMAT_MOSAIC 1
#define DMTX_SYMBOL_SQUARE_AUTO -1 #define DMTX_SYMBOL_SQUARE_AUTO -1
#define DMTX_SYMBOL_SQUARE_COUNT 24 #define DMTX_SYMBOL_SQUARE_COUNT 24
#define DMTX_SYMBOL_RECT_AUTO -2 #define DMTX_SYMBOL_RECT_AUTO -2
#define DMTX_SYMBOL_RECT_COUNT 6 #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,
skipping to change at line 108 skipping to change at line 129
typedef enum { typedef enum {
DmtxSymAttribSymbolRows, DmtxSymAttribSymbolRows,
DmtxSymAttribSymbolCols, DmtxSymAttribSymbolCols,
DmtxSymAttribDataRegionRows, DmtxSymAttribDataRegionRows,
DmtxSymAttribDataRegionCols, DmtxSymAttribDataRegionCols,
DmtxSymAttribHorizDataRegions, DmtxSymAttribHorizDataRegions,
DmtxSymAttribVertDataRegions, DmtxSymAttribVertDataRegions,
DmtxSymAttribMappingMatrixRows, DmtxSymAttribMappingMatrixRows,
DmtxSymAttribMappingMatrixCols, DmtxSymAttribMappingMatrixCols,
DmtxSymAttribDataWordLength, DmtxSymAttribInterleavedBlocks,
DmtxSymAttribErrorWordLength, DmtxSymAttribBlockDataWords,
DmtxSymAttribInterleavedBlocks DmtxSymAttribBlockErrorWords,
DmtxSymAttribBlockTotalWords,
DmtxSymAttribBlockMaxCorrectable,
DmtxSymAttribSymbolDataWords,
DmtxSymAttribSymbolErrorWords,
DmtxSymAttribSymbolTotalWords,
DmtxSymAttribSymbolMaxCorrectable
} DmtxSymAttribute; } DmtxSymAttribute;
typedef enum { typedef enum {
DmtxCorner00 = 0x01 << 0, DmtxCorner00 = 0x01 << 0,
DmtxCorner10 = 0x01 << 1, DmtxCorner10 = 0x01 << 1,
DmtxCorner11 = 0x01 << 2, DmtxCorner11 = 0x01 << 2,
DmtxCorner01 = 0x01 << 3 DmtxCorner01 = 0x01 << 3
} DmtxCornerLoc; } DmtxCornerLoc;
typedef double DmtxMatrix3[3][3]; typedef double DmtxMatrix3[3][3];
typedef unsigned char DmtxRgb[3];
typedef struct DmtxMatrix3Struct_struct { /**
DmtxMatrix3 m; * @struct DmtxColor3
} DmtxMatrix3Struct; * @brief DmtxColor3
*/
typedef struct DmtxColor3_struct { typedef struct DmtxColor3_struct {
double R; double R;
double G; double G;
double B; double B;
} DmtxColor3; } DmtxColor3;
/**
* @struct DmtxPixelLoc
* @brief DmtxPixelLoc
*/
typedef struct DmtxPixelLoc_struct { typedef struct DmtxPixelLoc_struct {
int X; int X;
int Y; int Y;
} DmtxPixelLoc; } DmtxPixelLoc;
/**
* @struct DmtxVector2
* @brief DmtxVector2
*/
typedef struct DmtxVector2_struct { typedef struct DmtxVector2_struct {
double X; double X;
double Y; double Y;
} DmtxVector2; } DmtxVector2;
/**
* @struct DmtxRay3
* @brief DmtxRay3
*/
typedef struct DmtxRay3_struct { typedef struct DmtxRay3_struct {
DmtxColor3 p; DmtxColor3 p;
DmtxColor3 c; DmtxColor3 c;
} DmtxRay3; } DmtxRay3;
/**
* @struct DmtxRay2
* @brief DmtxRay2
*/
typedef struct DmtxRay2_struct { typedef struct DmtxRay2_struct {
char isDefined; char isDefined;
double tMin, tMax; double tMin, tMax;
DmtxVector2 p; DmtxVector2 p;
DmtxVector2 v; DmtxVector2 v;
} DmtxRay2; } DmtxRay2;
/**
* @struct DmtxGradient
* @brief DmtxGradient
*/
typedef struct DmtxGradient_struct { typedef struct DmtxGradient_struct {
char isDefined; char isDefined;
double tMin, tMax, tMid; double 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 DmtxPixel_struct {
unsigned char R;
unsigned char G;
unsigned char B;
} DmtxPixel;
typedef enum { typedef enum {
DmtxCompassDirNeg45 = 0x01, DmtxCompassDirNeg45 = 0x01,
DmtxCompassDir0 = 0x02, DmtxCompassDir0 = 0x02,
DmtxCompassDir45 = 0x04, DmtxCompassDir45 = 0x04,
DmtxCompassDir90 = 0x08 DmtxCompassDir90 = 0x08
} DmtxCompassDir; } DmtxCompassDir;
/**
* @struct DmtxCompassEdge
* @brief DmtxCompassEdge
*/
typedef struct DmtxCompassEdge_struct { typedef struct DmtxCompassEdge_struct {
char assigned; char assigned;
double magnitude; /* sqrt(R^2 + G^2 + B^2) */ double magnitude; /* sqrt(R^2 + G^2 + B^2) */
DmtxColor3 intensity; DmtxColor3 intensity;
DmtxCompassDir edgeDir; DmtxCompassDir edgeDir;
DmtxCompassDir scanDir; /* DmtxCompassDir0 | DmtxCompassDir90 */ DmtxCompassDir scanDir; /* DmtxCompassDir0 | DmtxCompassDir90 */
} DmtxCompassEdge; } DmtxCompassEdge;
/**
* @struct DmtxImage
* @brief DmtxImage
*/
typedef struct DmtxImage_struct { typedef struct DmtxImage_struct {
unsigned int pageCount; unsigned int pageCount;
unsigned int width; unsigned int width;
unsigned int height; unsigned int height;
DmtxPixel *pxl; DmtxRgb *pxl;
DmtxCompassEdge *compass; DmtxCompassEdge *compass;
} DmtxImage; } DmtxImage;
/**
* @struct DmtxEdge
* @brief DmtxEdge
*/
typedef struct DmtxEdge_struct { typedef struct DmtxEdge_struct {
int offset; int offset;
double t; double t;
DmtxColor3 color; DmtxColor3 color;
} DmtxEdge; } DmtxEdge;
/**
* @struct DmtxChain
* @brief DmtxChain
*/
typedef struct DmtxChain_struct { typedef struct DmtxChain_struct {
double tx, ty; double tx, ty;
double phi, shx; double phi, shx;
double scx, scy; double scx, scy;
double bx0, bx1; double bx0, bx1;
double by0, by1; double by0, by1;
double sz; double sz;
} DmtxChain; } DmtxChain;
/**
* @struct DmtxCorners
* @brief DmtxCorners
*/
typedef struct DmtxCorners_struct { typedef struct DmtxCorners_struct {
DmtxCornerLoc known; /* combination of (DmtxCorner00 | DmtxCorner10 | Dm txCorner11 | DmtxCorner01) */ DmtxCornerLoc known; /* combination of (DmtxCorner00 | DmtxCorner10 | Dm txCorner11 | DmtxCorner01) */
DmtxVector2 c00; DmtxVector2 c00;
DmtxVector2 c10; DmtxVector2 c10;
DmtxVector2 c11; DmtxVector2 c11;
DmtxVector2 c01; DmtxVector2 c01;
} DmtxCorners; } DmtxCorners;
/**
* @struct DmtxRegion
* @brief DmtxRegion
*/
typedef struct DmtxRegion_struct { typedef struct DmtxRegion_struct {
int found; /* DMTX_REGION_FOUND | DMTX_REGION_NOT_FO UND | DMTX_REGION_EOF */ int found; /* DMTX_REGION_FOUND | DMTX_REGION_NOT_FO UND | DMTX_REGION_EOF */
DmtxGradient gradient; /* Linear blend of colors between backgro und and symbol color */ DmtxGradient gradient; /* Linear blend of colors between backgro und and symbol color */
DmtxChain chain; /* List of values that are used to build a transformation matrix */ DmtxChain chain; /* List of values that are used to build a transformation matrix */
DmtxCorners corners; /* Corners of barcode region */ DmtxCorners corners; /* Corners of barcode region */
DmtxMatrix3 raw2fit; /* 3x3 transformation from raw image to f itted barcode grid */ DmtxMatrix3 raw2fit; /* 3x3 transformation from raw image to f itted barcode grid */
DmtxMatrix3 fit2raw; /* 3x3 transformation from fitted barcode grid to raw image */ DmtxMatrix3 fit2raw; /* 3x3 transformation from fitted barcode grid to raw image */
int sizeIdx; /* Index of arrays that store Data Matrix constants */ int sizeIdx; /* Index of arrays that store Data Matrix constants */
int symbolRows; /* Number of total rows in symbol includi ng alignment patterns */ 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 symbolCols; /* Number of total columns in symbol incl uding alignment patterns */
int mappingRows; /* Number of data rows in symbol */ int mappingRows; /* Number of data rows in symbol */
int mappingCols; /* Number of data columns in symbol */ int mappingCols; /* Number of data columns in symbol */
} DmtxRegion; } DmtxRegion;
/**
* @struct DmtxMessage
* @brief DmtxMessage
*/
typedef struct DmtxMessage_struct { typedef struct DmtxMessage_struct {
int arraySize; /* mappingRows * mappingCols */ int arraySize; /* mappingRows * mappingCols */
int codeSize; /* Size of encoded data (data words + err or words) */ int codeSize; /* Size of encoded data (data words + err or words) */
int outputSize; /* Size of buffer used to hold decoded da ta */ int outputSize; /* Size of buffer used to hold decoded da ta */
int outputIdx; /* Internal index used to store output pr ogress */ int outputIdx; /* Internal index used to store output pr ogress */
unsigned char *array; /* Pointer to internal representation of scanned Data Matrix modules */ 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 *code; /* Pointer to internal storage of code wo rds (data and error) */
unsigned char *output; /* Pointer to internal storage of decoded output */ unsigned char *output; /* Pointer to internal storage of decoded output */
} DmtxMessage; } DmtxMessage;
typedef struct DmtxEdgeFollower_struct { /**
int slope; * @struct DmtxScanGrid
int turnCount; * @brief DmtxScanGrid
int paraOffset; */
double perpOffset;
double tMin, tMid, tMax;
DmtxRay3 ray;
DmtxRay2 line0, line1;
DmtxDirection dir;
} DmtxEdgeFollower;
typedef struct DmtxScanGrid_struct { typedef struct DmtxScanGrid_struct {
/* set once */ /* set once */
int minExtent; /* Smallest cross size used in scan */ int minExtent; /* Smallest cross size used in scan */
int maxExtent; /* Size of bounding grid region (2^N - 1) */ int maxExtent; /* Size of bounding grid region (2^N - 1) */
int xOffset; /* Offset to obtain image X coordinate */ int xOffset; /* Offset to obtain image X coordinate */
int yOffset; /* Offset to obtain image Y coordinate */ int yOffset; /* Offset to obtain image Y coordinate */
/* reset for each level */ /* reset for each level */
int total; /* Total number of crosses at this size */ int total; /* Total number of crosses at this size */
int extent; /* Length/width of cross in pixels */ int extent; /* Length/width of cross in pixels */
int jumpSize; /* Distance in pixels between cross centers */ int jumpSize; /* Distance in pixels between cross centers */
int pixelTotal; /* Total pixel count within an individual cross path */ int pixelTotal; /* Total pixel count within an individual cross path */
int startPos; /* X and Y coordinate of first cross center in pattern * / int startPos; /* X and Y coordinate of first cross center in pattern * /
/* reset for each cross */ /* reset for each cross */
int pixelCount; /* Progress (pixel count) within current cross pattern * / int pixelCount; /* Progress (pixel count) within current cross pattern * /
int xCenter; /* X center of current cross pattern */ int xCenter; /* X center of current cross pattern */
int yCenter; /* Y center of current cross pattern */ int yCenter; /* Y center of current cross pattern */
} DmtxScanGrid; } DmtxScanGrid;
typedef struct DmtxDecode_struct DmtxDecode; /**
struct DmtxDecode_struct { * @struct DmtxDecode
* @brief DmtxDecode
*/
typedef struct DmtxDecode_struct {
DmtxImage *image; DmtxImage *image;
DmtxScanGrid grid; DmtxScanGrid grid;
}; } DmtxDecode;
/**
* @struct DmtxTime
* @brief DmtxTime
*/
typedef struct DmtxTime_struct {
time_t sec;
unsigned long usec;
} DmtxTime;
/**
* @struct DmtxEncode
* @brief DmtxEncode
*/
typedef struct DmtxEncode_struct { typedef struct DmtxEncode_struct {
int moduleSize; int moduleSize;
int marginSize; int marginSize;
DmtxEncodeMethod method; DmtxEncodeMethod method;
DmtxSchemeEncode scheme; DmtxSchemeEncode scheme;
DmtxMessage *message; DmtxMessage *message;
DmtxImage *image; DmtxImage *image;
DmtxRegion region; DmtxRegion region;
DmtxMatrix3 xfrm; /* XXX still necessary? */ DmtxMatrix3 xfrm; /* XXX still necessary? */
DmtxMatrix3 rxfrm; /* XXX still necessary? */ DmtxMatrix3 rxfrm; /* XXX still necessary? */
} DmtxEncode; } DmtxEncode;
/**
* @struct DmtxChannel
* @brief DmtxChannel
*/
typedef struct DmtxChannel_struct { typedef struct DmtxChannel_struct {
DmtxSchemeEncode encScheme; /* current encodation scheme */ DmtxSchemeEncode encScheme; /* current encodation scheme */
int invalid; /* channel status (invalid if non- zero) */ int invalid; /* channel status (invalid if non- zero) */
unsigned char *inputPtr; /* pointer to current input charac ter */ unsigned char *inputPtr; /* pointer to current input charac ter */
unsigned char *inputStop; /* pointer to position after final input character */ unsigned char *inputStop; /* pointer to position after final input character */
int encodedLength; /* encoded length (units of 2/3 bi ts) */ int encodedLength; /* encoded length (units of 2/3 bi ts) */
int currentLength; /* current 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 */ int firstCodeWord; /* */
unsigned char encodedWords[1558]; /* array of encoded codewords */ unsigned char encodedWords[1558]; /* array of encoded codewords */
} DmtxChannel; } DmtxChannel;
/* Wrap in a struct for fast copies */ /* Wrap in a struct for fast copies */
/**
* @struct DmtxChannelGroup
* @brief DmtxChannelGroup
*/
typedef struct DmtxChannelGroup_struct { typedef struct DmtxChannelGroup_struct {
DmtxChannel channel[6]; DmtxChannel channel[6];
} DmtxChannelGroup; } DmtxChannelGroup;
/**
* @struct DmtxTriplet
* @brief DmtxTriplet
*/
typedef struct DmtxTriplet_struct { typedef struct DmtxTriplet_struct {
unsigned char value[3]; unsigned char value[3];
} DmtxTriplet; } DmtxTriplet;
/**
* @struct DmtxQuadruplet
* @brief DmtxQuadruplet
*/
typedef struct DmtxQuadruplet_struct { typedef struct DmtxQuadruplet_struct {
unsigned char value[4]; unsigned char value[4];
} DmtxQuadruplet; } DmtxQuadruplet;
/* dmtxtime.c */
extern DmtxTime dmtxTimeNow(void);
extern DmtxTime dmtxTimeAdd(DmtxTime t, long msec);
extern int dmtxTimeExceeded(DmtxTime timeout);
/* dmtxencode.c */ /* dmtxencode.c */
extern DmtxEncode dmtxEncodeStructInit(void); extern DmtxEncode dmtxEncodeStructInit(void);
extern void dmtxEncodeStructDeInit(DmtxEncode *enc); extern void dmtxEncodeStructDeInit(DmtxEncode *enc);
extern int dmtxEncodeDataMatrix(DmtxEncode *enc, int n, unsigned char *s, i nt sizeIdxRequest); extern int dmtxEncodeDataMatrix(DmtxEncode *enc, int n, unsigned char *s, i nt sizeIdxRequest);
extern int dmtxEncodeDataMosaic(DmtxEncode *enc, int n, unsigned char *s, i nt sizeIdxRequest); extern int dmtxEncodeDataMosaic(DmtxEncode *enc, int n, unsigned char *s, i nt sizeIdxRequest);
/* dmtxdecode.c */ /* dmtxdecode.c */
extern DmtxDecode dmtxDecodeStructInit(DmtxImage *img, DmtxPixelLoc p0, Dmt xPixelLoc p1, int gap); extern DmtxDecode dmtxDecodeStructInit(DmtxImage *img, DmtxPixelLoc p0, Dmt xPixelLoc p1, int gap);
extern void dmtxDecodeStructDeInit(DmtxDecode *dec); extern void dmtxDecodeStructDeInit(DmtxDecode *dec);
extern DmtxMessage *dmtxDecodeMatrixRegion(DmtxDecode *dec, DmtxRegion *reg , int fix); extern DmtxMessage *dmtxDecodeMatrixRegion(DmtxDecode *dec, DmtxRegion *reg , int fix);
extern DmtxMessage *dmtxMessageMalloc(int sizeIdx); extern DmtxMessage *dmtxDecodeMosaicRegion(DmtxDecode *dec, DmtxRegion *reg
, int fix);
extern DmtxMessage *dmtxMessageMalloc(int sizeIdx, int symbolFormat);
extern void dmtxMessageFree(DmtxMessage **mesg); extern void dmtxMessageFree(DmtxMessage **mesg);
/* dmtxregion.c */ /* dmtxregion.c */
extern DmtxRegion dmtxDecodeFindNextRegion(DmtxDecode *decode); extern DmtxRegion dmtxDecodeFindNextRegion(DmtxDecode *decode, DmtxTime *ti meout);
extern DmtxRegion dmtxScanPixel(DmtxDecode *decode, DmtxPixelLoc loc); extern DmtxRegion dmtxScanPixel(DmtxDecode *decode, DmtxPixelLoc loc);
/* dmtximage.c */ /* dmtximage.c */
extern DmtxImage *dmtxImageMalloc(int width, int height); extern DmtxImage *dmtxImageMalloc(int width, int height);
extern int dmtxImageFree(DmtxImage **img); extern int dmtxImageFree(DmtxImage **img);
extern int dmtxImageGetWidth(DmtxImage *img); extern int dmtxImageGetWidth(DmtxImage *img);
extern int dmtxImageGetHeight(DmtxImage *img); extern int dmtxImageGetHeight(DmtxImage *img);
extern int dmtxImageGetOffset(DmtxImage *img, DmtxDirection dir, int lineNb r, int offset); extern int dmtxImageGetOffset(DmtxImage *img, DmtxDirection dir, int lineNb r, int offset);
extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2); extern DmtxVector2 *dmtxVector2AddTo(DmtxVector2 *v1, DmtxVector2 *v2);
skipping to change at line 355 skipping to change at line 456
extern double dmtxDistanceAlongRay2(DmtxRay2 *r, DmtxVector2 *q); extern double dmtxDistanceAlongRay2(DmtxRay2 *r, DmtxVector2 *q);
extern int dmtxRay2Intersect(DmtxVector2 *point, DmtxRay2 *p0, DmtxRay2 *p1 ); extern int dmtxRay2Intersect(DmtxVector2 *point, DmtxRay2 *p0, DmtxRay2 *p1 );
extern int dmtxPointAlongRay2(DmtxVector2 *point, DmtxRay2 *r, double t); extern int dmtxPointAlongRay2(DmtxVector2 *point, DmtxRay2 *r, double t);
extern void dmtxMatrix3Copy(DmtxMatrix3 m0, DmtxMatrix3 m1); extern void dmtxMatrix3Copy(DmtxMatrix3 m0, DmtxMatrix3 m1);
extern void dmtxMatrix3Identity(DmtxMatrix3 m); extern void dmtxMatrix3Identity(DmtxMatrix3 m);
extern void dmtxMatrix3Translate(DmtxMatrix3 m, double tx, double ty); extern void dmtxMatrix3Translate(DmtxMatrix3 m, double tx, double ty);
extern void dmtxMatrix3Rotate(DmtxMatrix3 m, double angle); extern void dmtxMatrix3Rotate(DmtxMatrix3 m, double angle);
extern void dmtxMatrix3Scale(DmtxMatrix3 m, double sx, double sy); extern void dmtxMatrix3Scale(DmtxMatrix3 m, double sx, double sy);
extern void dmtxMatrix3Shear(DmtxMatrix3 m, double shx, double shy); extern void dmtxMatrix3Shear(DmtxMatrix3 m, double shx, double shy);
extern int dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m);
extern int dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vIn, DmtxMa
trix3 m);
extern void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatri
x3 m1);
extern void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1);
extern void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, double b0, double b1, dou ble sz); extern void dmtxMatrix3LineSkewTop(DmtxMatrix3 m, double b0, double b1, dou ble sz);
extern void dmtxMatrix3LineSkewTopInv(DmtxMatrix3 m, double b0, double b1, double sz); extern void dmtxMatrix3LineSkewTopInv(DmtxMatrix3 m, double b0, double b1, double sz);
extern void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, double b0, double b1, do uble sz); extern void dmtxMatrix3LineSkewSide(DmtxMatrix3 m, double b0, double b1, do uble sz);
extern void dmtxMatrix3LineSkewSideInv(DmtxMatrix3 m, double b0, double b1, double sz); extern void dmtxMatrix3LineSkewSideInv(DmtxMatrix3 m, double b0, double b1, double sz);
extern void dmtxMatrix3Multiply(DmtxMatrix3 mOut, DmtxMatrix3 m0, DmtxMatri
x3 m1);
extern void dmtxMatrix3MultiplyBy(DmtxMatrix3 m0, DmtxMatrix3 m1);
extern int dmtxMatrix3VMultiply(DmtxVector2 *vOut, DmtxVector2 *vIn, DmtxMa
trix3 m);
extern int dmtxMatrix3VMultiplyBy(DmtxVector2 *v, DmtxMatrix3 m);
extern void dmtxMatrix3Print(DmtxMatrix3 m); extern void dmtxMatrix3Print(DmtxMatrix3 m);
extern DmtxPixel dmtxPixelFromImage(DmtxImage *img, int x, int y); extern void dmtxPixelFromImage(DmtxRgb rgb, DmtxImage *img, int x, int y);
extern void dmtxColor3FromImage2(DmtxColor3 *color, DmtxImage *img, DmtxVec tor2 p); extern void dmtxColor3FromImage2(DmtxColor3 *color, DmtxImage *img, DmtxVec tor2 p);
extern DmtxColor3 *dmtxColor3FromPixel(DmtxColor3 *color, DmtxPixel *pxl); extern DmtxColor3 *dmtxColor3FromPixel(DmtxColor3 *color, DmtxRgb rgb);
extern void dmtxPixelFromColor3(DmtxPixel *pxl, DmtxColor3 *color); extern void dmtxPixelFromColor3(DmtxRgb rgb, DmtxColor3 *color);
extern DmtxColor3 dmtxColor3AlongRay3(DmtxRay3 *ray, double dist); extern DmtxColor3 dmtxColor3AlongRay3(DmtxRay3 *ray, double 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, double s); extern DmtxColor3 *dmtxColor3ScaleBy(DmtxColor3 *v, double s);
extern DmtxColor3 *dmtxColor3Scale(DmtxColor3 *vOut, DmtxColor3 *v, double s); extern DmtxColor3 *dmtxColor3Scale(DmtxColor3 *vOut, DmtxColor3 *v, double s);
extern DmtxColor3 *dmtxColor3Cross(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxCo lor3 *v2); extern DmtxColor3 *dmtxColor3Cross(DmtxColor3 *vOut, DmtxColor3 *v1, DmtxCo lor3 *v2);
extern int dmtxColor3Norm(DmtxColor3 *v); extern int dmtxColor3Norm(DmtxColor3 *v);
extern double dmtxColor3Dot(DmtxColor3 *v1, DmtxColor3 *v2); extern double dmtxColor3Dot(DmtxColor3 *v1, DmtxColor3 *v2);
extern double dmtxColor3Mag(DmtxColor3 *v); extern double dmtxColor3Mag(DmtxColor3 *v);
extern double dmtxDistanceFromRay3(DmtxRay3 *r, DmtxColor3 *q); extern double dmtxDistanceFromRay3(DmtxRay3 *r, DmtxColor3 *q);
extern double dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxColor3 *q); extern double dmtxDistanceAlongRay3(DmtxRay3 *r, DmtxColor3 *q);
extern int dmtxPointAlongRay3(DmtxColor3 *point, DmtxRay3 *r, double t); extern int dmtxPointAlongRay3(DmtxColor3 *point, DmtxRay3 *r, double t);
extern int dmtxSymbolModuleStatus(DmtxMessage *mapping, int sizeIdx, int ro w, int col); extern int dmtxSymbolModuleStatus(DmtxMessage *mapping, int sizeIdx, int ro w, int col);
extern int dmtxGetSymbolAttribute(int attribute, int sizeIdx); extern int dmtxGetSymbolAttribute(int attribute, int sizeIdx);
extern char *dmtxVersion(void); extern char *dmtxVersion(void);
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 39 change blocks. 
48 lines changed or deleted 154 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/