========================================================================
       A Sample User Interface for Algolab Raster to Vector SDK
========================================================================

A) General Information.

 This is a sample application UItoSDK that calls functions of dlls of r2v 
 SDK. This SDK implements the functionality of Algolab Raster to Vector 
 Conversion Toolkit. Download and install Toolkit for references.

 UItoSDK opens raster files, processes and saves them and also vectorizes 
 these raster files. 

 ATTENTION! 
 UItoSDK does not draw the result vector graphics on the screen but only
 provides output in the output file specified in the settings.

 The functions of SDK use hBmp DIB with 1 bit per pixel as input. The class
 Bmp of the project UItoSDK contains source code to load bmp files and create
 such hBmp DIBs that can be passed into interfaces of the functions of SDK.
 The method CnvToDibSec1 of that class supports conversion of an arbitrary
 DIB into the format compatible with SDK functions. This may be useful when
 an application has its own functions to load raster images and there is only
 need to convert these loaded images into a DIB format compatible with SDK. 

 
B) SDK Content
 SDK includes 3 dll (without source code) and a Sample UI application with 
 the source code: 
 fio.dll  - to open and save some raster files;
 imgs.dll - to process raster images before vectorization;
 vec.dll  - the vectorization dll.
 UItoSDK.exe - UI application.

 The directory Dev/Include contains the header files for these dlls. These
 header files may contain some additional information which regards the functions.

 Call of the dll functions are located in the files UItoSDKDoc.cpp and
 UItoSDKView.cpp.
 The dlls are located in the directory Dev/r2vsdk and lib files to
 link the dlls are located in the directory Dev/lib.

C) The vectorization function uses the parameters. These parameters are
passed in text format. Here the specifications of that format are discussed.

 All settings including output file name should be defined in the text file
 settings.txt located in the same directory where vec.dll is located. The 
 text is case sensitive. In this sample application the executable and dlls 
 are located in the directory Dev/r2vsdk. If some or all parameters are not 
 set in settings.txt then their default values are used. The default values 
 of the mode "Curves" are chosen as default ( see: Toolkit for the values. 
 This means: start Toolkit, then open "Recognition Parameters" dialog box.
 To reach that dialog use Recognition=>Settings=>Edit ). 
 SDK supports the same raster and vector formats that Toolkit does. The 
 default directory for vector operations is that directory where the file 
 vec.dll is located. If no output file is specified then the default 
 value = stdOutput.dxf is used.

 The error messages are written in the file Log.txt located in the same 
 directory where the vec.dll is located. If there is no errors then the log file
 may not exist. The log file is erased before each vectorization. To force
 the program to write all the parameters put the line 
 writeSettings=1 
 in the file settings.txt. The output text for parameters found in log.txt 
 is suitable for use in the file settings.txt. The syntax's for the file 
 settings.txt is:
 parameter=value\n
 where the new line symbol \n is used as a delimiter for lines. 

 To read a text file settings.txt from disk is not the only way to define parameters.
 One may want to generate a null terminated string with parameters in his/her 
 code "on fly".


********* The values for settings ****************
If a parameter is boolean then 0 is used for "no" and 1 for "yes". Below the 
parameters are indicated with their default values. The range of the parameters 
is shown as well. To learn more about these parameters start Algolab Raster to Vector 
Conversion Toolkit and reach the settings by selecting Recognition=>Settings=>Edit.

Boolean parameters:

writeSettings=0
outlines=0
recognize45DegreeLines=0
recognizeHorizontalVerticalLines=0
recognizeLines=0
recognizeArcs=0
recognizeCurves=1
smootherShiftConstrained=1 
intersectAlongTangents=1



Text parameters:

ouputFile=stdOutput.dxf


Integer parameters:
                             range
		
gapJump=7                 // 0 - 20
minPixelLen=4             // 4 - 1000
representedBy=1 	  // 0 - 2:   0 - lines; 1 - splines(beziers); 2 - poly lines/arcs
toleranceInPixels=1       // 1 - 20
conjugationTolerance=5    // 0 - 10
polyArcTolerance=5        // 0 - 10
angleSensitivity=1        // 0 - 20
smootherIterationNumber=3 // 0 - 100 
smootherShiftTolerance=0  // 0 - 1


******************************************************

Contact: support@algolab.com
http://www.algolab.com
/////////////////////////////////////////////////////////////////////////////
