From 6cf5e3e1d833b65051cb585039c526d2752420dd Mon Sep 17 00:00:00 2001 From: BenLand100 Date: Sat, 23 Jan 2010 23:50:05 +0000 Subject: [PATCH] Adding an index for reversing data out of the TocrData record git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@455 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- trunk/Units/MMLCore/ocrutil.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/trunk/Units/MMLCore/ocrutil.pas b/trunk/Units/MMLCore/ocrutil.pas index e8d2573..3154839 100644 --- a/trunk/Units/MMLCore/ocrutil.pas +++ b/trunk/Units/MMLCore/ocrutil.pas @@ -19,6 +19,7 @@ type TocrGlyphMetric = record xoff,yoff: integer; width,height: integer; + index: integer; //stores the internal TocrData index for this char end; TocrData = record ascii: array[0..255] of TocrGlyphMetric; @@ -240,6 +241,7 @@ begin if pos = 0 then result.neg_adj[i]:= 1 else result.neg_adj[i]:= 1 / pos; if pos = 0 then result.pos_adj[i]:= 0 else result.pos_adj[i]:= 1 / pos; result.map[i]:= ascii; + result.ascii[ord(ascii)].index:= i; result.ascii[ord(ascii)].xoff:= masks[i].l; result.ascii[ord(ascii)].yoff:= masks[i].t; result.ascii[ord(ascii)].width:= masks[i].width;