| Make BestShareware.net your home page | Add BestShareware.net to your favorites |
![]() Homepage |
![]() Help Desk |
![]() Site Map |
![]() |
![]() Popular |
![]() What's New |
![]() Featured |
| MAC Software | Linux Software | Pocket PC | iPod Software |
|
Raster to Vector Converter SDK (DLL) is developed by DWGTool Software . It can convert raster image into vector image,
and output into dxf or text file. The format of raster image include bmp, jpg, tiff, pcx and tga.
Raster to Vector Converter SDK provides one main function and 12 parameter setting functions to complete the task.
Please refer to the VB & VC sample to get the more detail of using method.The follows is the detail of the 13
functions. Can implement all the conversion functions of TraceaRT.
The detail of the functions----------------------------------------------------------- 1. Main function, convert raster file into vector file int TraceRasterFile( HWND OwnerWindow, // handle of owner window LPCTSTR Source, // source raster file name LPCTSTR Dest, // vector file name int DestType, // vector file type int TraceType, // tracing method int Threshold, // threshold of 1-bit image double Straighten, // straighten pixels into beelines int bRecCircle // recognise the circle and arc ); Return Value
if successfully, it return zero, otherwise it return none zero.
Parameters OwnerHanlde
source
Dest
Threshold
Straighten
RecCircle
Remarks The output file formats of .DXF, .SVG, .HP/GL,and .EPS are standard formats, but the text format is defined by us self. The follow is the format of text file: Format of the text file
Line format
Circle format
Arc format
And there is a lisp named "LoadText.lsp" in the package, which can read the text file into AutoCAD. Please load the lisp into AutoCAD first and then type the command "RTT" to read the text file. If you only trace the outline of the raster image, call this function only, because all the parameter are set by this function. The follow parameters are for tracing center line. Setting parameters of tracing center lines functions The follow functions are used to setting parameters of tracing center lines. But these parameters haven't any means to tracing outline. void SetConnectDistance( int Connect, // If connect adjacent vectors int Distance // the maximum distance between adjacent vectors ); Parameters Connect
Distance
void SetDeleteLength( int Delete, // if delete the fixed-up vectors int Length // the maximum length of fixed-up vectors ); Parameters Delete
Length
The follow functions set the parameters about calculating the width of vectors. 1.Set width calculating parameter void SetCalcWidth( int Calc // If calculating width of vectors ); Parameters Calc
2.Clear
the values of width series Remarks
Clear all the values of width series.If
you don't need any width series, you must call this function. Otherwise, if
there are some values which you have added, them will still have effect to the
tracing progress. 3.
Add one value of width series void AddWidthSeriesValueFun( double Width // the width value that will be added ); Parameters Width
Remarks
The width of vector will be rounded
into the width series, For example, the values of width sereies are 0.0, 0.5,
1.0, and 1.5 mm, if the width of a vector is 0.8mm, according to this
width series, the width of this vector will be rounded to 1.0mm, but if the
width of this vector is 0.7mm, it will be rounded to 0.5mm. 4.Set the mode of processing more width void SetMoreWidthMode( int Mode // the mode of processing more width ); Parameters Mode
Remarks Set the method of process the width which is greater than the maximun width in the current width series. It can be the follow values:
void SetDefaultWidthSeries(void); Remarks
set the values of width series into default values, and the default values is:
0.5mm, 1.0mm, 2.0mm, the mode of processing more widht is 1, means no changing. The follow functions set the parameters about adjusting the angle of vectors. 1. Set angle adjusting parameter void SetAdjustAngle( int Adjust ); Parameter
Adjust
2. Clear all the values of angle series void DeleteAllAngleSeries(void); Remarks
int AddAngleSeriesValue( double MinAngle, // minimum angle of angle series, the units is radians double MaxAngle, // maximum angle of angle series, the units is radians double MainAngle // main angle of angle series, the units is radians );
Return Value if successfully, the return valuse is none zero, otherwise is 0.
Parameters MinAngle
MaxAngle
MainAngle
Remarks Call this function continually to add all the values of angle series, before add the first value, you should call the function "DeleteAllAngleSeries".
The rule of angle adjusting is : when the angle of vector is greater than the min angle and is smaller than the max angle, it will be adjusted to main angle.eg:
if the angle series like this:
So, if one vector's angle is 89.5 degrees, its angle will be adjusted to 90.0 degrees. If another vector's angle is 88.5 degrees, its angle will not be adjusted, and still maintain 88.5 degrees. Note MinAngle isn't greater than MainAngle, and MaxAngle isn't smaller than MainAngle. All the angle must be greater or equal to
0 degrees(0 radians), and must be smaller or equal to 180 degrees(PI radians). void SetDefaultAngleSeriesFun(void); Remarks
Set the values of angle series into default values, and the default values is:
void SetOrthoAngleSeries(void); Remarks Set the values of angle series into ortho values, and the ortho values is:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Submit Software |
Privacy Policy |
Terms of Use |
Advertise with Us |
Contact Us
Copyright ©
BestShareware.net. All rights reserved.
|