tesseract_bin 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.document +5 -0
- data/Gemfile +14 -0
- data/Gemfile.lock +23 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +46 -0
- data/VERSION +1 -0
- data/ext/tesseract_bin/extconf.rb +17 -0
- data/lib/tesseract_bin.rb +12 -0
- data/tesseract_bin.gemspec +660 -0
- data/test/helper.rb +18 -0
- data/test/test_tesseract_bin.rb +7 -0
- data/vendor/tesseract-2.04/AUTHORS +8 -0
- data/vendor/tesseract-2.04/COPYING +23 -0
- data/vendor/tesseract-2.04/ChangeLog +71 -0
- data/vendor/tesseract-2.04/INSTALL +229 -0
- data/vendor/tesseract-2.04/Makefile.am +20 -0
- data/vendor/tesseract-2.04/Makefile.in +641 -0
- data/vendor/tesseract-2.04/NEWS +1 -0
- data/vendor/tesseract-2.04/README +138 -0
- data/vendor/tesseract-2.04/ReleaseNotes +213 -0
- data/vendor/tesseract-2.04/StdAfx.cpp +8 -0
- data/vendor/tesseract-2.04/StdAfx.h +24 -0
- data/vendor/tesseract-2.04/ccmain/Makefile.am +63 -0
- data/vendor/tesseract-2.04/ccmain/Makefile.in +735 -0
- data/vendor/tesseract-2.04/ccmain/adaptions.cpp +1082 -0
- data/vendor/tesseract-2.04/ccmain/adaptions.h +109 -0
- data/vendor/tesseract-2.04/ccmain/applybox.cpp +891 -0
- data/vendor/tesseract-2.04/ccmain/applybox.h +73 -0
- data/vendor/tesseract-2.04/ccmain/baseapi.cpp +1105 -0
- data/vendor/tesseract-2.04/ccmain/baseapi.h +256 -0
- data/vendor/tesseract-2.04/ccmain/blobcmp.cpp +76 -0
- data/vendor/tesseract-2.04/ccmain/blobcmp.h +29 -0
- data/vendor/tesseract-2.04/ccmain/callnet.cpp +93 -0
- data/vendor/tesseract-2.04/ccmain/callnet.h +32 -0
- data/vendor/tesseract-2.04/ccmain/charcut.cpp +704 -0
- data/vendor/tesseract-2.04/ccmain/charcut.h +120 -0
- data/vendor/tesseract-2.04/ccmain/charsample.cpp +699 -0
- data/vendor/tesseract-2.04/ccmain/control.cpp +1842 -0
- data/vendor/tesseract-2.04/ccmain/control.h +198 -0
- data/vendor/tesseract-2.04/ccmain/docqual.cpp +1481 -0
- data/vendor/tesseract-2.04/ccmain/docqual.h +155 -0
- data/vendor/tesseract-2.04/ccmain/expandblob.cpp +82 -0
- data/vendor/tesseract-2.04/ccmain/expandblob.h +13 -0
- data/vendor/tesseract-2.04/ccmain/fixspace.cpp +989 -0
- data/vendor/tesseract-2.04/ccmain/fixspace.h +72 -0
- data/vendor/tesseract-2.04/ccmain/fixxht.cpp +825 -0
- data/vendor/tesseract-2.04/ccmain/fixxht.h +93 -0
- data/vendor/tesseract-2.04/ccmain/imgscale.cpp +154 -0
- data/vendor/tesseract-2.04/ccmain/imgscale.h +32 -0
- data/vendor/tesseract-2.04/ccmain/matmatch.cpp +391 -0
- data/vendor/tesseract-2.04/ccmain/matmatch.h +48 -0
- data/vendor/tesseract-2.04/ccmain/output.cpp +1273 -0
- data/vendor/tesseract-2.04/ccmain/output.h +116 -0
- data/vendor/tesseract-2.04/ccmain/pagewalk.cpp +666 -0
- data/vendor/tesseract-2.04/ccmain/pagewalk.h +155 -0
- data/vendor/tesseract-2.04/ccmain/paircmp.cpp +107 -0
- data/vendor/tesseract-2.04/ccmain/paircmp.h +43 -0
- data/vendor/tesseract-2.04/ccmain/pgedit.cpp +1867 -0
- data/vendor/tesseract-2.04/ccmain/pgedit.h +181 -0
- data/vendor/tesseract-2.04/ccmain/reject.cpp +1775 -0
- data/vendor/tesseract-2.04/ccmain/reject.h +181 -0
- data/vendor/tesseract-2.04/ccmain/scaleimg.cpp +366 -0
- data/vendor/tesseract-2.04/ccmain/scaleimg.h +35 -0
- data/vendor/tesseract-2.04/ccmain/tessbox.cpp +375 -0
- data/vendor/tesseract-2.04/ccmain/tessbox.h +110 -0
- data/vendor/tesseract-2.04/ccmain/tessedit.cpp +278 -0
- data/vendor/tesseract-2.04/ccmain/tessedit.h +49 -0
- data/vendor/tesseract-2.04/ccmain/tessembedded.cpp +110 -0
- data/vendor/tesseract-2.04/ccmain/tessembedded.h +38 -0
- data/vendor/tesseract-2.04/ccmain/tesseractfull.cc +37 -0
- data/vendor/tesseract-2.04/ccmain/tesseractmain.cpp +387 -0
- data/vendor/tesseract-2.04/ccmain/tesseractmain.h +58 -0
- data/vendor/tesseract-2.04/ccmain/tessio.h +110 -0
- data/vendor/tesseract-2.04/ccmain/tessvars.cpp +38 -0
- data/vendor/tesseract-2.04/ccmain/tessvars.h +48 -0
- data/vendor/tesseract-2.04/ccmain/tfacep.h +62 -0
- data/vendor/tesseract-2.04/ccmain/tfacepp.cpp +443 -0
- data/vendor/tesseract-2.04/ccmain/tfacepp.h +85 -0
- data/vendor/tesseract-2.04/ccmain/tstruct.cpp +549 -0
- data/vendor/tesseract-2.04/ccmain/tstruct.h +108 -0
- data/vendor/tesseract-2.04/ccmain/varabled.cpp +346 -0
- data/vendor/tesseract-2.04/ccmain/varabled.h +125 -0
- data/vendor/tesseract-2.04/ccmain/werdit.cpp +193 -0
- data/vendor/tesseract-2.04/ccmain/werdit.h +67 -0
- data/vendor/tesseract-2.04/ccstruct/Makefile.am +25 -0
- data/vendor/tesseract-2.04/ccstruct/Makefile.in +650 -0
- data/vendor/tesseract-2.04/ccstruct/blckerr.h +29 -0
- data/vendor/tesseract-2.04/ccstruct/blobbox.cpp +778 -0
- data/vendor/tesseract-2.04/ccstruct/blobbox.h +381 -0
- data/vendor/tesseract-2.04/ccstruct/blobs.cpp +247 -0
- data/vendor/tesseract-2.04/ccstruct/blobs.h +119 -0
- data/vendor/tesseract-2.04/ccstruct/blread.cpp +537 -0
- data/vendor/tesseract-2.04/ccstruct/blread.h +63 -0
- data/vendor/tesseract-2.04/ccstruct/callcpp.cpp +252 -0
- data/vendor/tesseract-2.04/ccstruct/coutln.cpp +650 -0
- data/vendor/tesseract-2.04/ccstruct/coutln.h +186 -0
- data/vendor/tesseract-2.04/ccstruct/crakedge.h +39 -0
- data/vendor/tesseract-2.04/ccstruct/genblob.cpp +133 -0
- data/vendor/tesseract-2.04/ccstruct/genblob.h +52 -0
- data/vendor/tesseract-2.04/ccstruct/hpddef.h +39 -0
- data/vendor/tesseract-2.04/ccstruct/hpdsizes.h +8 -0
- data/vendor/tesseract-2.04/ccstruct/ipoints.h +479 -0
- data/vendor/tesseract-2.04/ccstruct/labls.cpp +188 -0
- data/vendor/tesseract-2.04/ccstruct/labls.h +38 -0
- data/vendor/tesseract-2.04/ccstruct/linlsq.cpp +249 -0
- data/vendor/tesseract-2.04/ccstruct/linlsq.h +102 -0
- data/vendor/tesseract-2.04/ccstruct/lmedsq.cpp +453 -0
- data/vendor/tesseract-2.04/ccstruct/lmedsq.h +84 -0
- data/vendor/tesseract-2.04/ccstruct/mod128.cpp +100 -0
- data/vendor/tesseract-2.04/ccstruct/mod128.h +85 -0
- data/vendor/tesseract-2.04/ccstruct/normalis.cpp +176 -0
- data/vendor/tesseract-2.04/ccstruct/normalis.h +108 -0
- data/vendor/tesseract-2.04/ccstruct/ocrblock.cpp +369 -0
- data/vendor/tesseract-2.04/ccstruct/ocrblock.h +235 -0
- data/vendor/tesseract-2.04/ccstruct/ocrrow.cpp +216 -0
- data/vendor/tesseract-2.04/ccstruct/ocrrow.h +133 -0
- data/vendor/tesseract-2.04/ccstruct/pageblk.cpp +879 -0
- data/vendor/tesseract-2.04/ccstruct/pageblk.h +318 -0
- data/vendor/tesseract-2.04/ccstruct/pageres.cpp +330 -0
- data/vendor/tesseract-2.04/ccstruct/pageres.h +313 -0
- data/vendor/tesseract-2.04/ccstruct/pdblock.cpp +361 -0
- data/vendor/tesseract-2.04/ccstruct/pdblock.h +181 -0
- data/vendor/tesseract-2.04/ccstruct/pdclass.h +54 -0
- data/vendor/tesseract-2.04/ccstruct/points.cpp +102 -0
- data/vendor/tesseract-2.04/ccstruct/points.h +299 -0
- data/vendor/tesseract-2.04/ccstruct/polyaprx.cpp +588 -0
- data/vendor/tesseract-2.04/ccstruct/polyaprx.h +51 -0
- data/vendor/tesseract-2.04/ccstruct/polyblk.cpp +398 -0
- data/vendor/tesseract-2.04/ccstruct/polyblk.h +122 -0
- data/vendor/tesseract-2.04/ccstruct/polyblob.cpp +357 -0
- data/vendor/tesseract-2.04/ccstruct/polyblob.h +102 -0
- data/vendor/tesseract-2.04/ccstruct/polyvert.cpp +23 -0
- data/vendor/tesseract-2.04/ccstruct/polyvert.h +58 -0
- data/vendor/tesseract-2.04/ccstruct/poutline.cpp +441 -0
- data/vendor/tesseract-2.04/ccstruct/poutline.h +125 -0
- data/vendor/tesseract-2.04/ccstruct/quadlsq.cpp +147 -0
- data/vendor/tesseract-2.04/ccstruct/quadlsq.h +67 -0
- data/vendor/tesseract-2.04/ccstruct/quadratc.cpp +21 -0
- data/vendor/tesseract-2.04/ccstruct/quadratc.h +63 -0
- data/vendor/tesseract-2.04/ccstruct/quspline.cpp +382 -0
- data/vendor/tesseract-2.04/ccstruct/quspline.h +113 -0
- data/vendor/tesseract-2.04/ccstruct/ratngs.cpp +372 -0
- data/vendor/tesseract-2.04/ccstruct/ratngs.h +198 -0
- data/vendor/tesseract-2.04/ccstruct/rect.cpp +229 -0
- data/vendor/tesseract-2.04/ccstruct/rect.h +320 -0
- data/vendor/tesseract-2.04/ccstruct/rejctmap.cpp +545 -0
- data/vendor/tesseract-2.04/ccstruct/rejctmap.h +284 -0
- data/vendor/tesseract-2.04/ccstruct/rwpoly.cpp +89 -0
- data/vendor/tesseract-2.04/ccstruct/rwpoly.h +45 -0
- data/vendor/tesseract-2.04/ccstruct/statistc.cpp +905 -0
- data/vendor/tesseract-2.04/ccstruct/statistc.h +135 -0
- data/vendor/tesseract-2.04/ccstruct/stepblob.cpp +296 -0
- data/vendor/tesseract-2.04/ccstruct/stepblob.h +88 -0
- data/vendor/tesseract-2.04/ccstruct/txtregn.cpp +230 -0
- data/vendor/tesseract-2.04/ccstruct/txtregn.h +155 -0
- data/vendor/tesseract-2.04/ccstruct/vecfuncs.cpp +63 -0
- data/vendor/tesseract-2.04/ccstruct/vecfuncs.h +91 -0
- data/vendor/tesseract-2.04/ccstruct/werd.cpp +967 -0
- data/vendor/tesseract-2.04/ccstruct/werd.h +277 -0
- data/vendor/tesseract-2.04/ccutil/Makefile.am +19 -0
- data/vendor/tesseract-2.04/ccutil/Makefile.in +626 -0
- data/vendor/tesseract-2.04/ccutil/basedir.cpp +118 -0
- data/vendor/tesseract-2.04/ccutil/basedir.h +32 -0
- data/vendor/tesseract-2.04/ccutil/bits16.cpp +30 -0
- data/vendor/tesseract-2.04/ccutil/bits16.h +61 -0
- data/vendor/tesseract-2.04/ccutil/boxread.cpp +105 -0
- data/vendor/tesseract-2.04/ccutil/boxread.h +44 -0
- data/vendor/tesseract-2.04/ccutil/clst.cpp +626 -0
- data/vendor/tesseract-2.04/ccutil/clst.h +1085 -0
- data/vendor/tesseract-2.04/ccutil/debugwin.cpp +500 -0
- data/vendor/tesseract-2.04/ccutil/debugwin.h +103 -0
- data/vendor/tesseract-2.04/ccutil/elst.cpp +593 -0
- data/vendor/tesseract-2.04/ccutil/elst.h +1125 -0
- data/vendor/tesseract-2.04/ccutil/elst2.cpp +606 -0
- data/vendor/tesseract-2.04/ccutil/elst2.h +1121 -0
- data/vendor/tesseract-2.04/ccutil/errcode.cpp +104 -0
- data/vendor/tesseract-2.04/ccutil/errcode.h +104 -0
- data/vendor/tesseract-2.04/ccutil/fileerr.h +34 -0
- data/vendor/tesseract-2.04/ccutil/globaloc.cpp +115 -0
- data/vendor/tesseract-2.04/ccutil/globaloc.h +40 -0
- data/vendor/tesseract-2.04/ccutil/hashfn.cpp +57 -0
- data/vendor/tesseract-2.04/ccutil/hashfn.h +30 -0
- data/vendor/tesseract-2.04/ccutil/host.h +180 -0
- data/vendor/tesseract-2.04/ccutil/hosthplb.h +1 -0
- data/vendor/tesseract-2.04/ccutil/lsterr.h +43 -0
- data/vendor/tesseract-2.04/ccutil/mainblk.cpp +126 -0
- data/vendor/tesseract-2.04/ccutil/mainblk.h +39 -0
- data/vendor/tesseract-2.04/ccutil/memblk.cpp +1106 -0
- data/vendor/tesseract-2.04/ccutil/memblk.h +189 -0
- data/vendor/tesseract-2.04/ccutil/memry.cpp +532 -0
- data/vendor/tesseract-2.04/ccutil/memry.h +192 -0
- data/vendor/tesseract-2.04/ccutil/memryerr.h +38 -0
- data/vendor/tesseract-2.04/ccutil/mfcpch.cpp +5 -0
- data/vendor/tesseract-2.04/ccutil/mfcpch.h +37 -0
- data/vendor/tesseract-2.04/ccutil/ndminx.h +31 -0
- data/vendor/tesseract-2.04/ccutil/notdll.h +28 -0
- data/vendor/tesseract-2.04/ccutil/nwmain.h +176 -0
- data/vendor/tesseract-2.04/ccutil/ocrclass.h +345 -0
- data/vendor/tesseract-2.04/ccutil/ocrshell.cpp +772 -0
- data/vendor/tesseract-2.04/ccutil/ocrshell.h +191 -0
- data/vendor/tesseract-2.04/ccutil/platform.h +18 -0
- data/vendor/tesseract-2.04/ccutil/scanutils.cpp +543 -0
- data/vendor/tesseract-2.04/ccutil/scanutils.h +55 -0
- data/vendor/tesseract-2.04/ccutil/secname.h +9 -0
- data/vendor/tesseract-2.04/ccutil/serialis.cpp +117 -0
- data/vendor/tesseract-2.04/ccutil/serialis.h +93 -0
- data/vendor/tesseract-2.04/ccutil/stderr.h +26 -0
- data/vendor/tesseract-2.04/ccutil/strngs.cpp +495 -0
- data/vendor/tesseract-2.04/ccutil/strngs.h +138 -0
- data/vendor/tesseract-2.04/ccutil/tessclas.h +135 -0
- data/vendor/tesseract-2.04/ccutil/tessopt.cpp +61 -0
- data/vendor/tesseract-2.04/ccutil/tessopt.h +30 -0
- data/vendor/tesseract-2.04/ccutil/tprintf.cpp +122 -0
- data/vendor/tesseract-2.04/ccutil/tprintf.h +35 -0
- data/vendor/tesseract-2.04/ccutil/unichar.cpp +144 -0
- data/vendor/tesseract-2.04/ccutil/unichar.h +84 -0
- data/vendor/tesseract-2.04/ccutil/unicharmap.cpp +172 -0
- data/vendor/tesseract-2.04/ccutil/unicharmap.h +82 -0
- data/vendor/tesseract-2.04/ccutil/unicharset.cpp +307 -0
- data/vendor/tesseract-2.04/ccutil/unicharset.h +267 -0
- data/vendor/tesseract-2.04/ccutil/varable.cpp +672 -0
- data/vendor/tesseract-2.04/ccutil/varable.h +419 -0
- data/vendor/tesseract-2.04/classify/Makefile.am +24 -0
- data/vendor/tesseract-2.04/classify/Makefile.in +647 -0
- data/vendor/tesseract-2.04/classify/adaptive.cpp +535 -0
- data/vendor/tesseract-2.04/classify/adaptive.h +199 -0
- data/vendor/tesseract-2.04/classify/adaptmatch.cpp +2958 -0
- data/vendor/tesseract-2.04/classify/adaptmatch.h +86 -0
- data/vendor/tesseract-2.04/classify/baseline.cpp +58 -0
- data/vendor/tesseract-2.04/classify/baseline.h +91 -0
- data/vendor/tesseract-2.04/classify/blobclass.cpp +123 -0
- data/vendor/tesseract-2.04/classify/blobclass.h +49 -0
- data/vendor/tesseract-2.04/classify/chartoname.cpp +74 -0
- data/vendor/tesseract-2.04/classify/chartoname.h +21 -0
- data/vendor/tesseract-2.04/classify/cluster.cpp +2834 -0
- data/vendor/tesseract-2.04/classify/cluster.h +158 -0
- data/vendor/tesseract-2.04/classify/clusttool.cpp +507 -0
- data/vendor/tesseract-2.04/classify/clusttool.h +70 -0
- data/vendor/tesseract-2.04/classify/cutoffs.cpp +73 -0
- data/vendor/tesseract-2.04/classify/cutoffs.h +49 -0
- data/vendor/tesseract-2.04/classify/extern.h +32 -0
- data/vendor/tesseract-2.04/classify/extract.cpp +100 -0
- data/vendor/tesseract-2.04/classify/extract.h +36 -0
- data/vendor/tesseract-2.04/classify/featdefs.cpp +244 -0
- data/vendor/tesseract-2.04/classify/featdefs.h +71 -0
- data/vendor/tesseract-2.04/classify/flexfx.cpp +87 -0
- data/vendor/tesseract-2.04/classify/flexfx.h +34 -0
- data/vendor/tesseract-2.04/classify/float2int.cpp +126 -0
- data/vendor/tesseract-2.04/classify/float2int.h +65 -0
- data/vendor/tesseract-2.04/classify/fpoint.cpp +73 -0
- data/vendor/tesseract-2.04/classify/fpoint.h +63 -0
- data/vendor/tesseract-2.04/classify/fxdefs.cpp +74 -0
- data/vendor/tesseract-2.04/classify/fxdefs.h +93 -0
- data/vendor/tesseract-2.04/classify/fxid.h +69 -0
- data/vendor/tesseract-2.04/classify/hideedge.cpp +35 -0
- data/vendor/tesseract-2.04/classify/hideedge.h +76 -0
- data/vendor/tesseract-2.04/classify/intfx.cpp +608 -0
- data/vendor/tesseract-2.04/classify/intfx.h +63 -0
- data/vendor/tesseract-2.04/classify/intmatcher.cpp +1524 -0
- data/vendor/tesseract-2.04/classify/intmatcher.h +199 -0
- data/vendor/tesseract-2.04/classify/intproto.cpp +1823 -0
- data/vendor/tesseract-2.04/classify/intproto.h +320 -0
- data/vendor/tesseract-2.04/classify/kdtree.cpp +884 -0
- data/vendor/tesseract-2.04/classify/kdtree.h +118 -0
- data/vendor/tesseract-2.04/classify/mf.cpp +106 -0
- data/vendor/tesseract-2.04/classify/mf.h +43 -0
- data/vendor/tesseract-2.04/classify/mfdefs.cpp +58 -0
- data/vendor/tesseract-2.04/classify/mfdefs.h +60 -0
- data/vendor/tesseract-2.04/classify/mfoutline.cpp +1087 -0
- data/vendor/tesseract-2.04/classify/mfoutline.h +277 -0
- data/vendor/tesseract-2.04/classify/mfx.cpp +436 -0
- data/vendor/tesseract-2.04/classify/mfx.h +52 -0
- data/vendor/tesseract-2.04/classify/normfeat.cpp +132 -0
- data/vendor/tesseract-2.04/classify/normfeat.h +63 -0
- data/vendor/tesseract-2.04/classify/normmatch.cpp +305 -0
- data/vendor/tesseract-2.04/classify/normmatch.h +38 -0
- data/vendor/tesseract-2.04/classify/ocrfeatures.cpp +310 -0
- data/vendor/tesseract-2.04/classify/ocrfeatures.h +148 -0
- data/vendor/tesseract-2.04/classify/outfeat.cpp +262 -0
- data/vendor/tesseract-2.04/classify/outfeat.h +76 -0
- data/vendor/tesseract-2.04/classify/picofeat.cpp +297 -0
- data/vendor/tesseract-2.04/classify/picofeat.h +65 -0
- data/vendor/tesseract-2.04/classify/protos.cpp +472 -0
- data/vendor/tesseract-2.04/classify/protos.h +258 -0
- data/vendor/tesseract-2.04/classify/sigmenu.cpp +225 -0
- data/vendor/tesseract-2.04/classify/sigmenu.h +39 -0
- data/vendor/tesseract-2.04/classify/speckle.cpp +127 -0
- data/vendor/tesseract-2.04/classify/speckle.h +69 -0
- data/vendor/tesseract-2.04/classify/xform2d.cpp +120 -0
- data/vendor/tesseract-2.04/classify/xform2d.h +60 -0
- data/vendor/tesseract-2.04/config/config.guess +1466 -0
- data/vendor/tesseract-2.04/config/config.h.in +188 -0
- data/vendor/tesseract-2.04/config/config.sub +1579 -0
- data/vendor/tesseract-2.04/config/depcomp +530 -0
- data/vendor/tesseract-2.04/config/install-sh +269 -0
- data/vendor/tesseract-2.04/config/missing +198 -0
- data/vendor/tesseract-2.04/config/mkinstalldirs +40 -0
- data/vendor/tesseract-2.04/config/stamp-h.in +0 -0
- data/vendor/tesseract-2.04/configure +10424 -0
- data/vendor/tesseract-2.04/cutil/Makefile.am +14 -0
- data/vendor/tesseract-2.04/cutil/Makefile.in +612 -0
- data/vendor/tesseract-2.04/cutil/bitvec.cpp +115 -0
- data/vendor/tesseract-2.04/cutil/bitvec.h +100 -0
- data/vendor/tesseract-2.04/cutil/callcpp.h +190 -0
- data/vendor/tesseract-2.04/cutil/const.h +108 -0
- data/vendor/tesseract-2.04/cutil/cutil.cpp +92 -0
- data/vendor/tesseract-2.04/cutil/cutil.h +159 -0
- data/vendor/tesseract-2.04/cutil/danerror.cpp +144 -0
- data/vendor/tesseract-2.04/cutil/danerror.h +41 -0
- data/vendor/tesseract-2.04/cutil/debug.cpp +97 -0
- data/vendor/tesseract-2.04/cutil/debug.h +348 -0
- data/vendor/tesseract-2.04/cutil/efio.cpp +62 -0
- data/vendor/tesseract-2.04/cutil/efio.h +32 -0
- data/vendor/tesseract-2.04/cutil/emalloc.cpp +91 -0
- data/vendor/tesseract-2.04/cutil/emalloc.h +44 -0
- data/vendor/tesseract-2.04/cutil/freelist.cpp +75 -0
- data/vendor/tesseract-2.04/cutil/freelist.h +45 -0
- data/vendor/tesseract-2.04/cutil/funcdefs.h +35 -0
- data/vendor/tesseract-2.04/cutil/general.h +33 -0
- data/vendor/tesseract-2.04/cutil/globals.cpp +69 -0
- data/vendor/tesseract-2.04/cutil/globals.h +70 -0
- data/vendor/tesseract-2.04/cutil/listio.cpp +68 -0
- data/vendor/tesseract-2.04/cutil/listio.h +43 -0
- data/vendor/tesseract-2.04/cutil/minmax.h +40 -0
- data/vendor/tesseract-2.04/cutil/oldheap.cpp +337 -0
- data/vendor/tesseract-2.04/cutil/oldheap.h +126 -0
- data/vendor/tesseract-2.04/cutil/oldlist.cpp +393 -0
- data/vendor/tesseract-2.04/cutil/oldlist.h +350 -0
- data/vendor/tesseract-2.04/cutil/structures.cpp +66 -0
- data/vendor/tesseract-2.04/cutil/structures.h +112 -0
- data/vendor/tesseract-2.04/cutil/tessarray.cpp +115 -0
- data/vendor/tesseract-2.04/cutil/tessarray.h +166 -0
- data/vendor/tesseract-2.04/cutil/tordvars.cpp +95 -0
- data/vendor/tesseract-2.04/cutil/tordvars.h +61 -0
- data/vendor/tesseract-2.04/cutil/variables.cpp +317 -0
- data/vendor/tesseract-2.04/cutil/variables.h +170 -0
- data/vendor/tesseract-2.04/dict/Makefile.am +13 -0
- data/vendor/tesseract-2.04/dict/Makefile.in +609 -0
- data/vendor/tesseract-2.04/dict/choicearr.h +96 -0
- data/vendor/tesseract-2.04/dict/choices.cpp +210 -0
- data/vendor/tesseract-2.04/dict/choices.h +241 -0
- data/vendor/tesseract-2.04/dict/context.cpp +270 -0
- data/vendor/tesseract-2.04/dict/context.h +82 -0
- data/vendor/tesseract-2.04/dict/dawg.cpp +363 -0
- data/vendor/tesseract-2.04/dict/dawg.h +394 -0
- data/vendor/tesseract-2.04/dict/hyphen.cpp +84 -0
- data/vendor/tesseract-2.04/dict/hyphen.h +125 -0
- data/vendor/tesseract-2.04/dict/lookdawg.cpp +228 -0
- data/vendor/tesseract-2.04/dict/lookdawg.h +76 -0
- data/vendor/tesseract-2.04/dict/makedawg.cpp +449 -0
- data/vendor/tesseract-2.04/dict/makedawg.h +83 -0
- data/vendor/tesseract-2.04/dict/matchdefs.h +145 -0
- data/vendor/tesseract-2.04/dict/permdawg.cpp +415 -0
- data/vendor/tesseract-2.04/dict/permdawg.h +98 -0
- data/vendor/tesseract-2.04/dict/permngram.cpp +358 -0
- data/vendor/tesseract-2.04/dict/permngram.h +33 -0
- data/vendor/tesseract-2.04/dict/permnum.cpp +522 -0
- data/vendor/tesseract-2.04/dict/permnum.h +83 -0
- data/vendor/tesseract-2.04/dict/permute.cpp +1704 -0
- data/vendor/tesseract-2.04/dict/permute.h +93 -0
- data/vendor/tesseract-2.04/dict/reduce.cpp +424 -0
- data/vendor/tesseract-2.04/dict/reduce.h +112 -0
- data/vendor/tesseract-2.04/dict/states.cpp +382 -0
- data/vendor/tesseract-2.04/dict/states.h +111 -0
- data/vendor/tesseract-2.04/dict/stopper.cpp +1458 -0
- data/vendor/tesseract-2.04/dict/stopper.h +103 -0
- data/vendor/tesseract-2.04/dict/trie.cpp +683 -0
- data/vendor/tesseract-2.04/dict/trie.h +190 -0
- data/vendor/tesseract-2.04/dlltest/Makefile.am +2 -0
- data/vendor/tesseract-2.04/dlltest/Makefile.in +388 -0
- data/vendor/tesseract-2.04/dlltest/dlltest.cpp +163 -0
- data/vendor/tesseract-2.04/dlltest/dlltest.dsp +186 -0
- data/vendor/tesseract-2.04/dlltest/dlltest.vcproj +637 -0
- data/vendor/tesseract-2.04/eurotext.tif +0 -0
- data/vendor/tesseract-2.04/image/Makefile.am +10 -0
- data/vendor/tesseract-2.04/image/Makefile.in +596 -0
- data/vendor/tesseract-2.04/image/bitstrm.cpp +157 -0
- data/vendor/tesseract-2.04/image/bitstrm.h +73 -0
- data/vendor/tesseract-2.04/image/img.h +336 -0
- data/vendor/tesseract-2.04/image/imgbmp.cpp +223 -0
- data/vendor/tesseract-2.04/image/imgbmp.h +50 -0
- data/vendor/tesseract-2.04/image/imgerrs.h +35 -0
- data/vendor/tesseract-2.04/image/imgio.cpp +321 -0
- data/vendor/tesseract-2.04/image/imgio.h +22 -0
- data/vendor/tesseract-2.04/image/imgs.cpp +1764 -0
- data/vendor/tesseract-2.04/image/imgs.h +102 -0
- data/vendor/tesseract-2.04/image/imgtiff.cpp +723 -0
- data/vendor/tesseract-2.04/image/imgtiff.h +89 -0
- data/vendor/tesseract-2.04/image/imgunpk.h +1377 -0
- data/vendor/tesseract-2.04/image/svshowim.cpp +40 -0
- data/vendor/tesseract-2.04/image/svshowim.h +25 -0
- data/vendor/tesseract-2.04/java/Makefile.am +4 -0
- data/vendor/tesseract-2.04/java/Makefile.in +473 -0
- data/vendor/tesseract-2.04/java/com/Makefile.am +1 -0
- data/vendor/tesseract-2.04/java/com/Makefile.in +470 -0
- data/vendor/tesseract-2.04/java/com/google/Makefile.am +1 -0
- data/vendor/tesseract-2.04/java/com/google/Makefile.in +470 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/Makefile.am +4 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/Makefile.in +473 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ScrollView.java +421 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/events/Makefile.am +5 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/events/Makefile.in +474 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/events/SVEvent.java +87 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/events/SVEventHandler.java +296 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/events/SVEventType.java +31 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/Makefile.am +7 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/Makefile.in +476 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVAbstractMenuItem.java +58 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVCheckboxMenuItem.java +60 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVEmptyMenuItem.java +48 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVImageHandler.java +228 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVMenuBar.java +130 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVMenuItem.java +61 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVPopupMenu.java +142 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVSubMenuItem.java +41 -0
- data/vendor/tesseract-2.04/java/com/google/scrollview/ui/SVWindow.java +643 -0
- data/vendor/tesseract-2.04/java/makefile +55 -0
- data/vendor/tesseract-2.04/pageseg/Makefile.am +13 -0
- data/vendor/tesseract-2.04/pageseg/Makefile.in +596 -0
- data/vendor/tesseract-2.04/pageseg/leptonica_pageseg.cpp +363 -0
- data/vendor/tesseract-2.04/pageseg/leptonica_pageseg.h +90 -0
- data/vendor/tesseract-2.04/pageseg/leptonica_pageseg_interface.cpp +82 -0
- data/vendor/tesseract-2.04/pageseg/leptonica_pageseg_interface.h +30 -0
- data/vendor/tesseract-2.04/pageseg/pageseg.cpp +170 -0
- data/vendor/tesseract-2.04/pageseg/pageseg.h +29 -0
- data/vendor/tesseract-2.04/phototest.tif +0 -0
- data/vendor/tesseract-2.04/tessdata/Makefile.am +31 -0
- data/vendor/tesseract-2.04/tessdata/Makefile.in +529 -0
- data/vendor/tesseract-2.04/tessdata/configs/Makefile.am +3 -0
- data/vendor/tesseract-2.04/tessdata/configs/Makefile.in +344 -0
- data/vendor/tesseract-2.04/tessdata/configs/api_config +1 -0
- data/vendor/tesseract-2.04/tessdata/configs/box.train +19 -0
- data/vendor/tesseract-2.04/tessdata/configs/box.train.stderr +18 -0
- data/vendor/tesseract-2.04/tessdata/configs/inter +4 -0
- data/vendor/tesseract-2.04/tessdata/configs/kannada +4 -0
- data/vendor/tesseract-2.04/tessdata/configs/makebox +1 -0
- data/vendor/tesseract-2.04/tessdata/configs/unlv +3 -0
- data/vendor/tesseract-2.04/tessdata/confsets +3 -0
- data/vendor/tesseract-2.04/tessdata/eng.DangAmbigs +39 -0
- data/vendor/tesseract-2.04/tessdata/eng.freq-dawg +0 -0
- data/vendor/tesseract-2.04/tessdata/eng.inttemp +0 -0
- data/vendor/tesseract-2.04/tessdata/eng.normproto +1247 -0
- data/vendor/tesseract-2.04/tessdata/eng.pffmtable +111 -0
- data/vendor/tesseract-2.04/tessdata/eng.unicharset +113 -0
- data/vendor/tesseract-2.04/tessdata/eng.user-words +921 -0
- data/vendor/tesseract-2.04/tessdata/eng.word-dawg +0 -0
- data/vendor/tesseract-2.04/tessdata/makedummies +8 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/Makefile.am +3 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/Makefile.in +344 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/batch +2 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/batch.nochop +2 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/matdemo +7 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/msdemo +13 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/nobatch +2 -0
- data/vendor/tesseract-2.04/tessdata/tessconfigs/segdemo +9 -0
- data/vendor/tesseract-2.04/tessdll.cpp +351 -0
- data/vendor/tesseract-2.04/tessdll.dsp +2050 -0
- data/vendor/tesseract-2.04/tessdll.h +143 -0
- data/vendor/tesseract-2.04/tessdll.vcproj +5495 -0
- data/vendor/tesseract-2.04/tesseract.dsp +2124 -0
- data/vendor/tesseract-2.04/tesseract.dsw +116 -0
- data/vendor/tesseract-2.04/tesseract.sln +59 -0
- data/vendor/tesseract-2.04/tesseract.spec +188 -0
- data/vendor/tesseract-2.04/tesseract.vcproj +5859 -0
- data/vendor/tesseract-2.04/testing/Makefile.am +2 -0
- data/vendor/tesseract-2.04/testing/Makefile.in +312 -0
- data/vendor/tesseract-2.04/testing/README +43 -0
- data/vendor/tesseract-2.04/testing/counttestset.sh +61 -0
- data/vendor/tesseract-2.04/testing/reorgdata.sh +44 -0
- data/vendor/tesseract-2.04/testing/reports/1995.bus.3B.sum +1 -0
- data/vendor/tesseract-2.04/testing/reports/1995.doe3.3B.sum +1 -0
- data/vendor/tesseract-2.04/testing/reports/1995.mag.3B.sum +1 -0
- data/vendor/tesseract-2.04/testing/reports/1995.news.3B.sum +1 -0
- data/vendor/tesseract-2.04/testing/reports/2.03.summary +9 -0
- data/vendor/tesseract-2.04/testing/reports/2.04.summary +9 -0
- data/vendor/tesseract-2.04/testing/runalltests.sh +110 -0
- data/vendor/tesseract-2.04/testing/runtestset.sh +61 -0
- data/vendor/tesseract-2.04/textord/Makefile.am +20 -0
- data/vendor/tesseract-2.04/textord/Makefile.in +624 -0
- data/vendor/tesseract-2.04/textord/blkocc.cpp +809 -0
- data/vendor/tesseract-2.04/textord/blkocc.h +327 -0
- data/vendor/tesseract-2.04/textord/blobcmpl.h +31 -0
- data/vendor/tesseract-2.04/textord/drawedg.cpp +77 -0
- data/vendor/tesseract-2.04/textord/drawedg.h +34 -0
- data/vendor/tesseract-2.04/textord/drawtord.cpp +469 -0
- data/vendor/tesseract-2.04/textord/drawtord.h +107 -0
- data/vendor/tesseract-2.04/textord/edgblob.cpp +412 -0
- data/vendor/tesseract-2.04/textord/edgblob.h +100 -0
- data/vendor/tesseract-2.04/textord/edgloop.cpp +211 -0
- data/vendor/tesseract-2.04/textord/edgloop.h +66 -0
- data/vendor/tesseract-2.04/textord/fpchop.cpp +1641 -0
- data/vendor/tesseract-2.04/textord/fpchop.h +238 -0
- data/vendor/tesseract-2.04/textord/gap_map.cpp +166 -0
- data/vendor/tesseract-2.04/textord/gap_map.h +40 -0
- data/vendor/tesseract-2.04/textord/makerow.cpp +2628 -0
- data/vendor/tesseract-2.04/textord/makerow.h +295 -0
- data/vendor/tesseract-2.04/textord/oldbasel.cpp +1761 -0
- data/vendor/tesseract-2.04/textord/oldbasel.h +195 -0
- data/vendor/tesseract-2.04/textord/pithsync.cpp +696 -0
- data/vendor/tesseract-2.04/textord/pithsync.h +134 -0
- data/vendor/tesseract-2.04/textord/pitsync1.cpp +425 -0
- data/vendor/tesseract-2.04/textord/pitsync1.h +135 -0
- data/vendor/tesseract-2.04/textord/scanedg.cpp +452 -0
- data/vendor/tesseract-2.04/textord/scanedg.h +74 -0
- data/vendor/tesseract-2.04/textord/sortflts.cpp +80 -0
- data/vendor/tesseract-2.04/textord/sortflts.h +64 -0
- data/vendor/tesseract-2.04/textord/tessout.h +76 -0
- data/vendor/tesseract-2.04/textord/topitch.cpp +2019 -0
- data/vendor/tesseract-2.04/textord/topitch.h +195 -0
- data/vendor/tesseract-2.04/textord/tordmain.cpp +907 -0
- data/vendor/tesseract-2.04/textord/tordmain.h +132 -0
- data/vendor/tesseract-2.04/textord/tospace.cpp +1939 -0
- data/vendor/tesseract-2.04/textord/tospace.h +193 -0
- data/vendor/tesseract-2.04/textord/tovars.cpp +87 -0
- data/vendor/tesseract-2.04/textord/tovars.h +94 -0
- data/vendor/tesseract-2.04/textord/underlin.cpp +312 -0
- data/vendor/tesseract-2.04/textord/underlin.h +53 -0
- data/vendor/tesseract-2.04/textord/wordseg.cpp +620 -0
- data/vendor/tesseract-2.04/textord/wordseg.h +70 -0
- data/vendor/tesseract-2.04/training/Makefile.am +54 -0
- data/vendor/tesseract-2.04/training/Makefile.in +720 -0
- data/vendor/tesseract-2.04/training/cnTraining.cpp +855 -0
- data/vendor/tesseract-2.04/training/cntraining.dsp +243 -0
- data/vendor/tesseract-2.04/training/cntraining.vcproj +950 -0
- data/vendor/tesseract-2.04/training/mergenf.cpp +451 -0
- data/vendor/tesseract-2.04/training/mergenf.h +106 -0
- data/vendor/tesseract-2.04/training/mfTraining.cpp +1341 -0
- data/vendor/tesseract-2.04/training/mftraining.dsp +285 -0
- data/vendor/tesseract-2.04/training/mftraining.vcproj +1055 -0
- data/vendor/tesseract-2.04/training/name2char.cpp +166 -0
- data/vendor/tesseract-2.04/training/name2char.h +38 -0
- data/vendor/tesseract-2.04/training/training.cpp +190 -0
- data/vendor/tesseract-2.04/training/training.h +130 -0
- data/vendor/tesseract-2.04/training/unicharset_extractor.cpp +140 -0
- data/vendor/tesseract-2.04/training/unicharset_extractor.dsp +335 -0
- data/vendor/tesseract-2.04/training/unicharset_extractor.vcproj +769 -0
- data/vendor/tesseract-2.04/training/wordlist2dawg.cpp +69 -0
- data/vendor/tesseract-2.04/training/wordlist2dawg.dsp +319 -0
- data/vendor/tesseract-2.04/training/wordlist2dawg.vcproj +1113 -0
- data/vendor/tesseract-2.04/viewer/Makefile.am +9 -0
- data/vendor/tesseract-2.04/viewer/Makefile.in +591 -0
- data/vendor/tesseract-2.04/viewer/scrollview.cpp +825 -0
- data/vendor/tesseract-2.04/viewer/scrollview.h +414 -0
- data/vendor/tesseract-2.04/viewer/svmnode.cpp +140 -0
- data/vendor/tesseract-2.04/viewer/svmnode.h +94 -0
- data/vendor/tesseract-2.04/viewer/svpaint.cpp +220 -0
- data/vendor/tesseract-2.04/viewer/svutil.cpp +347 -0
- data/vendor/tesseract-2.04/viewer/svutil.h +138 -0
- data/vendor/tesseract-2.04/wordrec/Makefile.am +23 -0
- data/vendor/tesseract-2.04/wordrec/Makefile.in +641 -0
- data/vendor/tesseract-2.04/wordrec/associate.cpp +62 -0
- data/vendor/tesseract-2.04/wordrec/associate.h +93 -0
- data/vendor/tesseract-2.04/wordrec/badwords.cpp +106 -0
- data/vendor/tesseract-2.04/wordrec/badwords.h +51 -0
- data/vendor/tesseract-2.04/wordrec/bestfirst.cpp +526 -0
- data/vendor/tesseract-2.04/wordrec/bestfirst.h +203 -0
- data/vendor/tesseract-2.04/wordrec/charsample.h +208 -0
- data/vendor/tesseract-2.04/wordrec/chop.cpp +458 -0
- data/vendor/tesseract-2.04/wordrec/chop.h +153 -0
- data/vendor/tesseract-2.04/wordrec/chopper.cpp +750 -0
- data/vendor/tesseract-2.04/wordrec/chopper.h +104 -0
- data/vendor/tesseract-2.04/wordrec/closed.cpp +136 -0
- data/vendor/tesseract-2.04/wordrec/closed.h +65 -0
- data/vendor/tesseract-2.04/wordrec/djmenus.cpp +118 -0
- data/vendor/tesseract-2.04/wordrec/djmenus.h +33 -0
- data/vendor/tesseract-2.04/wordrec/drawfx.cpp +92 -0
- data/vendor/tesseract-2.04/wordrec/drawfx.h +33 -0
- data/vendor/tesseract-2.04/wordrec/findseam.cpp +566 -0
- data/vendor/tesseract-2.04/wordrec/findseam.h +69 -0
- data/vendor/tesseract-2.04/wordrec/gradechop.cpp +226 -0
- data/vendor/tesseract-2.04/wordrec/gradechop.h +91 -0
- data/vendor/tesseract-2.04/wordrec/heuristic.cpp +194 -0
- data/vendor/tesseract-2.04/wordrec/heuristic.h +120 -0
- data/vendor/tesseract-2.04/wordrec/makechop.cpp +281 -0
- data/vendor/tesseract-2.04/wordrec/makechop.h +69 -0
- data/vendor/tesseract-2.04/wordrec/matchtab.cpp +191 -0
- data/vendor/tesseract-2.04/wordrec/matchtab.h +45 -0
- data/vendor/tesseract-2.04/wordrec/matrix.cpp +118 -0
- data/vendor/tesseract-2.04/wordrec/matrix.h +104 -0
- data/vendor/tesseract-2.04/wordrec/measure.h +135 -0
- data/vendor/tesseract-2.04/wordrec/metrics.cpp +363 -0
- data/vendor/tesseract-2.04/wordrec/metrics.h +130 -0
- data/vendor/tesseract-2.04/wordrec/mfvars.cpp +51 -0
- data/vendor/tesseract-2.04/wordrec/mfvars.h +27 -0
- data/vendor/tesseract-2.04/wordrec/msmenus.cpp +110 -0
- data/vendor/tesseract-2.04/wordrec/msmenus.h +45 -0
- data/vendor/tesseract-2.04/wordrec/olutil.cpp +153 -0
- data/vendor/tesseract-2.04/wordrec/olutil.h +128 -0
- data/vendor/tesseract-2.04/wordrec/outlines.cpp +172 -0
- data/vendor/tesseract-2.04/wordrec/outlines.h +148 -0
- data/vendor/tesseract-2.04/wordrec/pieces.cpp +410 -0
- data/vendor/tesseract-2.04/wordrec/pieces.h +154 -0
- data/vendor/tesseract-2.04/wordrec/plotedges.cpp +134 -0
- data/vendor/tesseract-2.04/wordrec/plotedges.h +71 -0
- data/vendor/tesseract-2.04/wordrec/plotseg.cpp +116 -0
- data/vendor/tesseract-2.04/wordrec/plotseg.h +73 -0
- data/vendor/tesseract-2.04/wordrec/render.cpp +152 -0
- data/vendor/tesseract-2.04/wordrec/render.h +58 -0
- data/vendor/tesseract-2.04/wordrec/seam.cpp +482 -0
- data/vendor/tesseract-2.04/wordrec/seam.h +136 -0
- data/vendor/tesseract-2.04/wordrec/split.cpp +182 -0
- data/vendor/tesseract-2.04/wordrec/split.h +115 -0
- data/vendor/tesseract-2.04/wordrec/tally.cpp +68 -0
- data/vendor/tesseract-2.04/wordrec/tally.h +94 -0
- data/vendor/tesseract-2.04/wordrec/tessinit.cpp +108 -0
- data/vendor/tesseract-2.04/wordrec/tessinit.h +46 -0
- data/vendor/tesseract-2.04/wordrec/tface.cpp +272 -0
- data/vendor/tesseract-2.04/wordrec/tface.h +35 -0
- data/vendor/tesseract-2.04/wordrec/wordclass.cpp +284 -0
- data/vendor/tesseract-2.04/wordrec/wordclass.h +64 -0
- metadata +708 -0
|
@@ -0,0 +1,469 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
* File: drawtord.cpp (Formerly drawto.c)
|
|
3
|
+
* Description: Draw things to do with textord.
|
|
4
|
+
* Author: Ray Smith
|
|
5
|
+
* Created: Thu Jul 30 15:40:57 BST 1992
|
|
6
|
+
*
|
|
7
|
+
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
|
8
|
+
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
** you may not use this file except in compliance with the License.
|
|
10
|
+
** You may obtain a copy of the License at
|
|
11
|
+
** http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
** Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
** See the License for the specific language governing permissions and
|
|
16
|
+
** limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
**********************************************************************/
|
|
19
|
+
|
|
20
|
+
#include "mfcpch.h"
|
|
21
|
+
#include "pithsync.h"
|
|
22
|
+
#include "topitch.h"
|
|
23
|
+
#include "drawtord.h"
|
|
24
|
+
#include "debugwin.h"
|
|
25
|
+
|
|
26
|
+
#define TO_WIN_XPOS -1 //default window pos
|
|
27
|
+
#define TO_WIN_YPOS 0
|
|
28
|
+
#define TO_WIN_NAME "Textord"
|
|
29
|
+
//title of window
|
|
30
|
+
#define DEBUG_WIN_NAME "TODebug"
|
|
31
|
+
#define DEBUG_XPOS 0
|
|
32
|
+
#define DEBUG_YPOS 120
|
|
33
|
+
#define DEBUG_XSIZE 80
|
|
34
|
+
#define DEBUG_YSIZE 32
|
|
35
|
+
#define YMAX 3508
|
|
36
|
+
#define XMAX 2550
|
|
37
|
+
|
|
38
|
+
#define EXTERN
|
|
39
|
+
|
|
40
|
+
EXTERN BOOL_VAR (textord_show_fixed_cuts, FALSE,
|
|
41
|
+
"Draw fixed pitch cell boundaries");
|
|
42
|
+
EXTERN STRING_VAR (to_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
|
|
43
|
+
EXTERN STRING_VAR (to_smdfile, NO_SMD, "Name of SMD file");
|
|
44
|
+
|
|
45
|
+
EXTERN ScrollView* to_win = NULL;
|
|
46
|
+
EXTERN FILE *to_debug = NULL;
|
|
47
|
+
|
|
48
|
+
/**********************************************************************
|
|
49
|
+
* create_to_win
|
|
50
|
+
*
|
|
51
|
+
* Create the to window used to show the fit.
|
|
52
|
+
**********************************************************************/
|
|
53
|
+
#ifndef GRAPHICS_DISABLED
|
|
54
|
+
|
|
55
|
+
void create_to_win( //make features win
|
|
56
|
+
ICOORD page_tr //size of page
|
|
57
|
+
) {
|
|
58
|
+
if (strcmp (to_smdfile.string (), NO_SMD)) {
|
|
59
|
+
to_win = new ScrollView (to_smdfile.string (),
|
|
60
|
+
0, 0, page_tr.x () + 1, page_tr.y () + 1,
|
|
61
|
+
page_tr.x (), page_tr.y ());
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
to_win = new ScrollView (TO_WIN_NAME,
|
|
65
|
+
TO_WIN_XPOS, TO_WIN_YPOS, 0, 0,
|
|
66
|
+
page_tr.x (), page_tr.y ());
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
void close_to_win() { //make features win
|
|
72
|
+
if (to_win != NULL && strcmp (to_smdfile.string (), NO_SMD)) {
|
|
73
|
+
delete to_win;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
/**********************************************************************
|
|
79
|
+
* create_todebug_win
|
|
80
|
+
*
|
|
81
|
+
* Create the to window used to show the fit.
|
|
82
|
+
**********************************************************************/
|
|
83
|
+
|
|
84
|
+
void create_todebug_win() { //make gradients win
|
|
85
|
+
if (strcmp (to_debugfile.string (), DEBUG_WIN_NAME) != 0)
|
|
86
|
+
// create_debug_window();
|
|
87
|
+
// else
|
|
88
|
+
to_debug = fopen (to_debugfile.string (), "w");
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**********************************************************************
|
|
92
|
+
* plot_blob_list
|
|
93
|
+
*
|
|
94
|
+
* Draw a list of blobs.
|
|
95
|
+
**********************************************************************/
|
|
96
|
+
|
|
97
|
+
void plot_blob_list( //make gradients win
|
|
98
|
+
ScrollView* win, //window to draw in
|
|
99
|
+
BLOBNBOX_LIST *list, //blob list
|
|
100
|
+
ScrollView::Color body_colour, //colour to draw
|
|
101
|
+
ScrollView::Color child_colour //colour of child
|
|
102
|
+
) {
|
|
103
|
+
BLOBNBOX_IT it = list; //iterator
|
|
104
|
+
|
|
105
|
+
for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
|
|
106
|
+
it.data ()->plot (win, body_colour, child_colour);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
/**********************************************************************
|
|
112
|
+
* plot_box_list
|
|
113
|
+
*
|
|
114
|
+
* Draw a list of blobs.
|
|
115
|
+
**********************************************************************/
|
|
116
|
+
|
|
117
|
+
void plot_box_list( //make gradients win
|
|
118
|
+
ScrollView* win, //window to draw in
|
|
119
|
+
BLOBNBOX_LIST *list, //blob list
|
|
120
|
+
ScrollView::Color body_colour //colour to draw
|
|
121
|
+
) {
|
|
122
|
+
BLOBNBOX_IT it = list; //iterator
|
|
123
|
+
|
|
124
|
+
win->Pen(body_colour);
|
|
125
|
+
for (it.mark_cycle_pt (); !it.cycled_list (); it.forward ()) {
|
|
126
|
+
it.data ()->bounding_box ().plot (win);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
/**********************************************************************
|
|
132
|
+
* plot_to_row
|
|
133
|
+
*
|
|
134
|
+
* Draw the blobs of a row in a given colour and draw the line fit.
|
|
135
|
+
**********************************************************************/
|
|
136
|
+
|
|
137
|
+
void plot_to_row( //draw a row
|
|
138
|
+
TO_ROW *row, //row to draw
|
|
139
|
+
ScrollView::Color colour, //colour to draw in
|
|
140
|
+
FCOORD rotation //rotation for line
|
|
141
|
+
) {
|
|
142
|
+
FCOORD plot_pt; //point to plot
|
|
143
|
+
//blobs
|
|
144
|
+
BLOBNBOX_IT it = row->blob_list ();
|
|
145
|
+
float left, right; //end of row
|
|
146
|
+
|
|
147
|
+
if (it.empty ()) {
|
|
148
|
+
tprintf ("No blobs in row at %g\n", row->parallel_c ());
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
151
|
+
left = it.data ()->bounding_box ().left ();
|
|
152
|
+
it.move_to_last ();
|
|
153
|
+
right = it.data ()->bounding_box ().right ();
|
|
154
|
+
plot_blob_list (to_win, row->blob_list (), colour, ScrollView::BROWN);
|
|
155
|
+
to_win->Pen(colour);
|
|
156
|
+
plot_pt = FCOORD (left, row->line_m () * left + row->line_c ());
|
|
157
|
+
plot_pt.rotate (rotation);
|
|
158
|
+
to_win->SetCursor(plot_pt.x (), plot_pt.y ());
|
|
159
|
+
plot_pt = FCOORD (right, row->line_m () * right + row->line_c ());
|
|
160
|
+
plot_pt.rotate (rotation);
|
|
161
|
+
to_win->DrawTo(plot_pt.x (), plot_pt.y ());
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
/**********************************************************************
|
|
166
|
+
* plot_parallel_row
|
|
167
|
+
*
|
|
168
|
+
* Draw the blobs of a row in a given colour and draw the line fit.
|
|
169
|
+
**********************************************************************/
|
|
170
|
+
|
|
171
|
+
void plot_parallel_row( //draw a row
|
|
172
|
+
TO_ROW *row, //row to draw
|
|
173
|
+
float gradient, //gradients of lines
|
|
174
|
+
inT32 left, //edge of block
|
|
175
|
+
ScrollView::Color colour, //colour to draw in
|
|
176
|
+
FCOORD rotation //rotation for line
|
|
177
|
+
) {
|
|
178
|
+
FCOORD plot_pt; //point to plot
|
|
179
|
+
//blobs
|
|
180
|
+
BLOBNBOX_IT it = row->blob_list ();
|
|
181
|
+
float fleft = (float) left; //floating version
|
|
182
|
+
float right; //end of row
|
|
183
|
+
|
|
184
|
+
// left=it.data()->bounding_box().left();
|
|
185
|
+
it.move_to_last ();
|
|
186
|
+
right = it.data ()->bounding_box ().right ();
|
|
187
|
+
plot_blob_list (to_win, row->blob_list (), colour, ScrollView::BROWN);
|
|
188
|
+
to_win->Pen(colour);
|
|
189
|
+
plot_pt = FCOORD (fleft, gradient * left + row->max_y ());
|
|
190
|
+
plot_pt.rotate (rotation);
|
|
191
|
+
to_win->SetCursor(plot_pt.x (), plot_pt.y ());
|
|
192
|
+
plot_pt = FCOORD (fleft, gradient * left + row->min_y ());
|
|
193
|
+
plot_pt.rotate (rotation);
|
|
194
|
+
to_win->DrawTo(plot_pt.x (), plot_pt.y ());
|
|
195
|
+
plot_pt = FCOORD (fleft, gradient * left + row->parallel_c ());
|
|
196
|
+
plot_pt.rotate (rotation);
|
|
197
|
+
to_win->SetCursor(plot_pt.x (), plot_pt.y ());
|
|
198
|
+
plot_pt = FCOORD (right, gradient * right + row->parallel_c ());
|
|
199
|
+
plot_pt.rotate (rotation);
|
|
200
|
+
to_win->DrawTo(plot_pt.x (), plot_pt.y ());
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
/**********************************************************************
|
|
205
|
+
* draw_occupation
|
|
206
|
+
*
|
|
207
|
+
* Draw the row occupation with points above the threshold in white
|
|
208
|
+
* and points below the threshold in black.
|
|
209
|
+
**********************************************************************/
|
|
210
|
+
|
|
211
|
+
void
|
|
212
|
+
draw_occupation ( //draw projection
|
|
213
|
+
inT32 xleft, //edge of block
|
|
214
|
+
inT32 ybottom, //bottom of block
|
|
215
|
+
inT32 min_y, //coordinate limits
|
|
216
|
+
inT32 max_y, inT32 occupation[], //projection counts
|
|
217
|
+
inT32 thresholds[] //for drop out
|
|
218
|
+
) {
|
|
219
|
+
inT32 line_index; //pixel coord
|
|
220
|
+
ScrollView::Color colour; //of histogram
|
|
221
|
+
float fleft = (float) xleft; //float version
|
|
222
|
+
|
|
223
|
+
colour = ScrollView::WHITE;
|
|
224
|
+
to_win->Pen(colour);
|
|
225
|
+
to_win->SetCursor(fleft, (float) ybottom);
|
|
226
|
+
for (line_index = min_y; line_index <= max_y; line_index++) {
|
|
227
|
+
if (occupation[line_index - min_y] < thresholds[line_index - min_y]) {
|
|
228
|
+
if (colour != ScrollView::BLUE) {
|
|
229
|
+
colour = ScrollView::BLUE;
|
|
230
|
+
to_win->Pen(colour);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
else {
|
|
234
|
+
if (colour != ScrollView::WHITE) {
|
|
235
|
+
colour = ScrollView::WHITE;
|
|
236
|
+
to_win->Pen(colour);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
to_win->DrawTo(fleft + occupation[line_index - min_y] / 10.0, (float) line_index);
|
|
240
|
+
}
|
|
241
|
+
colour=ScrollView::STEEL_BLUE;
|
|
242
|
+
to_win->Pen(colour);
|
|
243
|
+
to_win->SetCursor(fleft, (float) ybottom);
|
|
244
|
+
for (line_index = min_y; line_index <= max_y; line_index++) {
|
|
245
|
+
to_win->DrawTo(fleft + thresholds[line_index - min_y] / 10.0, (float) line_index);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
/**********************************************************************
|
|
251
|
+
* draw_meanlines
|
|
252
|
+
*
|
|
253
|
+
* Draw the meanlines of the given block in the given colour.
|
|
254
|
+
**********************************************************************/
|
|
255
|
+
|
|
256
|
+
void draw_meanlines( //draw a block
|
|
257
|
+
TO_BLOCK *block, //block to draw
|
|
258
|
+
float gradient, //gradients of lines
|
|
259
|
+
inT32 left, //edge of block
|
|
260
|
+
ScrollView::Color colour, //colour to draw in
|
|
261
|
+
FCOORD rotation //rotation for line
|
|
262
|
+
) {
|
|
263
|
+
FCOORD plot_pt; //point to plot
|
|
264
|
+
//rows
|
|
265
|
+
TO_ROW_IT row_it = block->get_rows ();
|
|
266
|
+
TO_ROW *row; //current row
|
|
267
|
+
BLOBNBOX_IT blob_it; //blobs
|
|
268
|
+
float right; //end of row
|
|
269
|
+
to_win->Pen(colour);
|
|
270
|
+
for (row_it.mark_cycle_pt (); !row_it.cycled_list (); row_it.forward ()) {
|
|
271
|
+
row = row_it.data ();
|
|
272
|
+
blob_it.set_to_list (row->blob_list ());
|
|
273
|
+
blob_it.move_to_last ();
|
|
274
|
+
right = blob_it.data ()->bounding_box ().right ();
|
|
275
|
+
plot_pt =
|
|
276
|
+
FCOORD ((float) left,
|
|
277
|
+
gradient * left + row->parallel_c () + row->xheight);
|
|
278
|
+
plot_pt.rotate (rotation);
|
|
279
|
+
to_win->SetCursor(plot_pt.x (), plot_pt.y ());
|
|
280
|
+
plot_pt =
|
|
281
|
+
FCOORD ((float) right,
|
|
282
|
+
gradient * right + row->parallel_c () + row->xheight);
|
|
283
|
+
plot_pt.rotate (rotation);
|
|
284
|
+
to_win->DrawTo (plot_pt.x (), plot_pt.y ());
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
/**********************************************************************
|
|
290
|
+
* plot_word_decisions
|
|
291
|
+
*
|
|
292
|
+
* Plot a row with words in different colours and fuzzy spaces
|
|
293
|
+
* highlighted.
|
|
294
|
+
**********************************************************************/
|
|
295
|
+
|
|
296
|
+
void plot_word_decisions( //draw words
|
|
297
|
+
ScrollView* win, //window tro draw in
|
|
298
|
+
inT16 pitch, //of block
|
|
299
|
+
TO_ROW *row //row to draw
|
|
300
|
+
) {
|
|
301
|
+
ScrollView::Color colour = ScrollView::MAGENTA; //current colour
|
|
302
|
+
ScrollView::Color rect_colour; //fuzzy colour
|
|
303
|
+
inT32 prev_x; //end of prev blob
|
|
304
|
+
inT16 blob_count; //blobs in word
|
|
305
|
+
BLOBNBOX *blob; //current blob
|
|
306
|
+
TBOX blob_box; //bounding box
|
|
307
|
+
//iterator
|
|
308
|
+
BLOBNBOX_IT blob_it = row->blob_list ();
|
|
309
|
+
BLOBNBOX_IT start_it = blob_it;//word start
|
|
310
|
+
|
|
311
|
+
rect_colour = ScrollView::BLACK;
|
|
312
|
+
prev_x = -MAX_INT16;
|
|
313
|
+
blob_count = 0;
|
|
314
|
+
for (blob_it.mark_cycle_pt (); !blob_it.cycled_list (); blob_it.forward ()) {
|
|
315
|
+
blob = blob_it.data ();
|
|
316
|
+
blob_box = blob->bounding_box ();
|
|
317
|
+
if (!blob->joined_to_prev ()
|
|
318
|
+
&& blob_box.left () - prev_x > row->max_nonspace) {
|
|
319
|
+
if ((blob_box.left () - prev_x >= row->min_space
|
|
320
|
+
|| blob_box.left () - prev_x > row->space_threshold)
|
|
321
|
+
&& blob_count > 0) {
|
|
322
|
+
if (pitch > 0 && textord_show_fixed_cuts)
|
|
323
|
+
plot_fp_cells (win, colour, &start_it, pitch, blob_count,
|
|
324
|
+
&row->projection, row->projection_left,
|
|
325
|
+
row->projection_right,
|
|
326
|
+
row->xheight * textord_projection_scale);
|
|
327
|
+
blob_count = 0;
|
|
328
|
+
start_it = blob_it;
|
|
329
|
+
}
|
|
330
|
+
if (colour == ScrollView::MAGENTA)
|
|
331
|
+
colour = ScrollView::RED;
|
|
332
|
+
else
|
|
333
|
+
colour = (ScrollView::Color) (colour + 1);
|
|
334
|
+
if (blob_box.left () - prev_x < row->min_space) {
|
|
335
|
+
if (blob_box.left () - prev_x > row->space_threshold)
|
|
336
|
+
rect_colour = ScrollView::GOLDENROD;
|
|
337
|
+
else
|
|
338
|
+
rect_colour = ScrollView::CORAL;
|
|
339
|
+
//fill_color_index(win, rect_colour);
|
|
340
|
+
win->Brush(rect_colour);
|
|
341
|
+
win->Rectangle (prev_x, blob_box.bottom (),
|
|
342
|
+
blob_box.left (), blob_box.top ());
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
if (!blob->joined_to_prev ())
|
|
346
|
+
prev_x = blob_box.right ();
|
|
347
|
+
if (blob->blob () != NULL)
|
|
348
|
+
//draw it
|
|
349
|
+
blob->blob ()->plot (win, colour, colour);
|
|
350
|
+
if (blob->cblob () != NULL)
|
|
351
|
+
blob->cblob ()->plot (win, colour, colour);
|
|
352
|
+
if (!blob->joined_to_prev ()
|
|
353
|
+
&& (blob->blob () != NULL || blob->cblob () != NULL))
|
|
354
|
+
blob_count++;
|
|
355
|
+
}
|
|
356
|
+
if (pitch > 0 && textord_show_fixed_cuts && blob_count > 0)
|
|
357
|
+
plot_fp_cells (win, colour, &start_it, pitch, blob_count,
|
|
358
|
+
&row->projection, row->projection_left,
|
|
359
|
+
row->projection_right,
|
|
360
|
+
row->xheight * textord_projection_scale);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
/**********************************************************************
|
|
365
|
+
* plot_fp_cells
|
|
366
|
+
*
|
|
367
|
+
* Make a list of fixed pitch cuts and draw them.
|
|
368
|
+
**********************************************************************/
|
|
369
|
+
|
|
370
|
+
void plot_fp_cells( //draw words
|
|
371
|
+
ScrollView* win, //window tro draw in
|
|
372
|
+
ScrollView::Color colour, //colour of lines
|
|
373
|
+
BLOBNBOX_IT *blob_it, //blobs
|
|
374
|
+
inT16 pitch, //of block
|
|
375
|
+
inT16 blob_count, //no of real blobs
|
|
376
|
+
STATS *projection, //vertical
|
|
377
|
+
inT16 projection_left, //edges //scale factor
|
|
378
|
+
inT16 projection_right,
|
|
379
|
+
float projection_scale) {
|
|
380
|
+
inT16 occupation; //occupied cells
|
|
381
|
+
TBOX word_box; //bounding box
|
|
382
|
+
FPSEGPT_LIST seg_list; //list of cuts
|
|
383
|
+
FPSEGPT_IT seg_it;
|
|
384
|
+
FPSEGPT *segpt; //current point
|
|
385
|
+
|
|
386
|
+
if (pitsync_linear_version)
|
|
387
|
+
check_pitch_sync2 (blob_it, blob_count, pitch, 2, projection,
|
|
388
|
+
projection_left, projection_right,
|
|
389
|
+
projection_scale, occupation, &seg_list, 0, 0);
|
|
390
|
+
else
|
|
391
|
+
check_pitch_sync (blob_it, blob_count, pitch, 2, projection, &seg_list);
|
|
392
|
+
word_box = blob_it->data ()->bounding_box ();
|
|
393
|
+
for (; blob_count > 0; blob_count--)
|
|
394
|
+
word_box += box_next (blob_it);
|
|
395
|
+
seg_it.set_to_list (&seg_list);
|
|
396
|
+
for (seg_it.mark_cycle_pt (); !seg_it.cycled_list (); seg_it.forward ()) {
|
|
397
|
+
segpt = seg_it.data ();
|
|
398
|
+
if (segpt->faked) {
|
|
399
|
+
colour = ScrollView::WHITE;
|
|
400
|
+
win->Pen(colour); }
|
|
401
|
+
else {
|
|
402
|
+
win->Pen(colour); }
|
|
403
|
+
win->Line(segpt->position (), word_box.bottom (),segpt->position (), word_box.top ());
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
/**********************************************************************
|
|
409
|
+
* plot_fp_cells2
|
|
410
|
+
*
|
|
411
|
+
* Make a list of fixed pitch cuts and draw them.
|
|
412
|
+
**********************************************************************/
|
|
413
|
+
|
|
414
|
+
void plot_fp_cells2( //draw words
|
|
415
|
+
ScrollView* win, //window tro draw in
|
|
416
|
+
ScrollView::Color colour, //colour of lines
|
|
417
|
+
TO_ROW *row, //for location
|
|
418
|
+
FPSEGPT_LIST *seg_list //segments to plot
|
|
419
|
+
) {
|
|
420
|
+
TBOX word_box; //bounding box
|
|
421
|
+
FPSEGPT_IT seg_it = seg_list;
|
|
422
|
+
//blobs in row
|
|
423
|
+
BLOBNBOX_IT blob_it = row->blob_list ();
|
|
424
|
+
FPSEGPT *segpt; //current point
|
|
425
|
+
|
|
426
|
+
word_box = blob_it.data ()->bounding_box ();
|
|
427
|
+
for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();)
|
|
428
|
+
word_box += box_next (&blob_it);
|
|
429
|
+
for (seg_it.mark_cycle_pt (); !seg_it.cycled_list (); seg_it.forward ()) {
|
|
430
|
+
segpt = seg_it.data ();
|
|
431
|
+
if (segpt->faked) {
|
|
432
|
+
colour = ScrollView::WHITE;
|
|
433
|
+
win->Pen(colour); }
|
|
434
|
+
else {
|
|
435
|
+
win->Pen(colour); }
|
|
436
|
+
win->Line(segpt->position (), word_box.bottom (),segpt->position (), word_box.top ());
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
/**********************************************************************
|
|
442
|
+
* plot_row_cells
|
|
443
|
+
*
|
|
444
|
+
* Make a list of fixed pitch cuts and draw them.
|
|
445
|
+
**********************************************************************/
|
|
446
|
+
|
|
447
|
+
void plot_row_cells( //draw words
|
|
448
|
+
ScrollView* win, //window tro draw in
|
|
449
|
+
ScrollView::Color colour, //colour of lines
|
|
450
|
+
TO_ROW *row, //for location
|
|
451
|
+
float xshift, //amount of shift
|
|
452
|
+
ICOORDELT_LIST *cells //cells to draw
|
|
453
|
+
) {
|
|
454
|
+
TBOX word_box; //bounding box
|
|
455
|
+
ICOORDELT_IT cell_it = cells;
|
|
456
|
+
//blobs in row
|
|
457
|
+
BLOBNBOX_IT blob_it = row->blob_list ();
|
|
458
|
+
ICOORDELT *cell; //current cell
|
|
459
|
+
|
|
460
|
+
word_box = blob_it.data ()->bounding_box ();
|
|
461
|
+
for (blob_it.mark_cycle_pt (); !blob_it.cycled_list ();)
|
|
462
|
+
word_box += box_next (&blob_it);
|
|
463
|
+
win->Pen(colour);
|
|
464
|
+
for (cell_it.mark_cycle_pt (); !cell_it.cycled_list (); cell_it.forward ()) {
|
|
465
|
+
cell = cell_it.data ();
|
|
466
|
+
win->Line(cell->x () + xshift, word_box.bottom (), cell->x () + xshift, word_box.top ());
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
#endif // GRAPHICS_DISABLED
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
/**********************************************************************
|
|
2
|
+
* File: drawtord.h (Formerly drawto.h)
|
|
3
|
+
* Description: Draw things to do with textord.
|
|
4
|
+
* Author: Ray Smith
|
|
5
|
+
* Created: Thu Jul 30 15:40:57 BST 1992
|
|
6
|
+
*
|
|
7
|
+
* (C) Copyright 1992, Hewlett-Packard Ltd.
|
|
8
|
+
** Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
** you may not use this file except in compliance with the License.
|
|
10
|
+
** You may obtain a copy of the License at
|
|
11
|
+
** http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
** Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
** distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
** See the License for the specific language governing permissions and
|
|
16
|
+
** limitations under the License.
|
|
17
|
+
*
|
|
18
|
+
**********************************************************************/
|
|
19
|
+
|
|
20
|
+
#ifndef DRAWTORD_H
|
|
21
|
+
#define DRAWTORD_H
|
|
22
|
+
|
|
23
|
+
#include "varable.h"
|
|
24
|
+
#include "scrollview.h"
|
|
25
|
+
#include "pitsync1.h"
|
|
26
|
+
#include "blobbox.h"
|
|
27
|
+
#include "notdll.h"
|
|
28
|
+
|
|
29
|
+
#define NO_SMD "none"
|
|
30
|
+
|
|
31
|
+
extern BOOL_VAR_H (textord_show_fixed_cuts, FALSE,
|
|
32
|
+
"Draw fixed pitch cell boundaries");
|
|
33
|
+
extern STRING_VAR_H (to_debugfile, DEBUG_WIN_NAME, "Name of debugfile");
|
|
34
|
+
extern STRING_VAR_H (to_smdfile, NO_SMD, "Name of SMD file");
|
|
35
|
+
extern ScrollView* to_win;
|
|
36
|
+
extern FILE *to_debug;
|
|
37
|
+
void create_to_win( //make features win
|
|
38
|
+
ICOORD page_tr //size of page
|
|
39
|
+
);
|
|
40
|
+
void close_to_win(); //make features win
|
|
41
|
+
void create_todebug_win(); //make gradients win
|
|
42
|
+
void plot_blob_list( //make gradients win
|
|
43
|
+
ScrollView* win, //window to draw in
|
|
44
|
+
BLOBNBOX_LIST *list, //blob list
|
|
45
|
+
ScrollView::Color body_colour, //colour to draw
|
|
46
|
+
ScrollView::Color child_colour //colour of child
|
|
47
|
+
);
|
|
48
|
+
void plot_box_list( //make gradients win
|
|
49
|
+
ScrollView* win, //window to draw in
|
|
50
|
+
BLOBNBOX_LIST *list, //blob list
|
|
51
|
+
ScrollView::Color body_colour //colour to draw
|
|
52
|
+
);
|
|
53
|
+
void plot_to_row( //draw a row
|
|
54
|
+
TO_ROW *row, //row to draw
|
|
55
|
+
ScrollView::Color colour, //colour to draw in
|
|
56
|
+
FCOORD rotation //rotation for line
|
|
57
|
+
);
|
|
58
|
+
void plot_parallel_row( //draw a row
|
|
59
|
+
TO_ROW *row, //row to draw
|
|
60
|
+
float gradient, //gradients of lines
|
|
61
|
+
inT32 left, //edge of block
|
|
62
|
+
ScrollView::Color colour, //colour to draw in
|
|
63
|
+
FCOORD rotation //rotation for line
|
|
64
|
+
);
|
|
65
|
+
void draw_occupation ( //draw projection
|
|
66
|
+
inT32 xleft, //edge of block
|
|
67
|
+
inT32 ybottom, //bottom of block
|
|
68
|
+
inT32 min_y, //coordinate limits
|
|
69
|
+
inT32 max_y, inT32 occupation[], //projection counts
|
|
70
|
+
inT32 thresholds[] //for drop out
|
|
71
|
+
);
|
|
72
|
+
void draw_meanlines( //draw a block
|
|
73
|
+
TO_BLOCK *block, //block to draw
|
|
74
|
+
float gradient, //gradients of lines
|
|
75
|
+
inT32 left, //edge of block
|
|
76
|
+
ScrollView::Color colour, //colour to draw in
|
|
77
|
+
FCOORD rotation //rotation for line
|
|
78
|
+
);
|
|
79
|
+
void plot_word_decisions( //draw words
|
|
80
|
+
ScrollView* win, //window tro draw in
|
|
81
|
+
inT16 pitch, //of block
|
|
82
|
+
TO_ROW *row //row to draw
|
|
83
|
+
);
|
|
84
|
+
void plot_fp_cells( //draw words
|
|
85
|
+
ScrollView* win, //window tro draw in
|
|
86
|
+
ScrollView::Color colour, //colour of lines
|
|
87
|
+
BLOBNBOX_IT *blob_it, //blobs
|
|
88
|
+
inT16 pitch, //of block
|
|
89
|
+
inT16 blob_count, //no of real blobs
|
|
90
|
+
STATS *projection, //vertical
|
|
91
|
+
inT16 projection_left, //edges //scale factor
|
|
92
|
+
inT16 projection_right,
|
|
93
|
+
float projection_scale);
|
|
94
|
+
void plot_fp_cells2( //draw words
|
|
95
|
+
ScrollView* win, //window tro draw in
|
|
96
|
+
ScrollView::Color colour, //colour of lines
|
|
97
|
+
TO_ROW *row, //for location
|
|
98
|
+
FPSEGPT_LIST *seg_list //segments to plot
|
|
99
|
+
);
|
|
100
|
+
void plot_row_cells( //draw words
|
|
101
|
+
ScrollView* win, //window tro draw in
|
|
102
|
+
ScrollView::Color colour, //colour of lines
|
|
103
|
+
TO_ROW *row, //for location
|
|
104
|
+
float xshift, //amount of shift
|
|
105
|
+
ICOORDELT_LIST *cells //cells to draw
|
|
106
|
+
);
|
|
107
|
+
#endif
|