Vector Images

LEADTOOLS provides support for working with vector images in both the Vector Imaging Pro and the Main C DLL toolkits. The most extensive support is available in Vector Imaging Pro. For more information about that toolkit's functions, refer to the Vector Imaging help file.

 If you use the Main C DLL for loading (using the standard loading functions), you can modify the bits per pixel, background color, viewport (the physical size up to which the drawing can be rendered) and view mode by using the following functions:

L_GetVectorOptions

L_SetVectorOptions

Both functions use the VECTOROPTIONS structure. Set the height and width for the viewport with the VEC2DOPTIONS structure.

To customize rasterizing a vector image, fill the properties of the VECTOROPTIONS, VEC2DOPTIONS, AND VECTORVIEWMODE structures with the desired values, and then call the L_SetVectorOptions function. Then fill the properties of the FILEINFO and VECTORPARALLELOGRAM structures and call the L_LoadFile function.

The viewport and view mode can also be modified by the following functions:

L_2DGetViewMode

L_2DSetViewMode

L_2DGetViewport

L_2DSetViewport

Information about the vector file is stored in the VECTORPARALLELOGRAM structure. The structure is used by the FILEINFO structure which is used by functions such as L_LoadFile and L_FileInfo.

LEADTOOLS lets you set the color scheme  when loading AutoCAD files (DXF and DWG). These files can be loaded as either Black on White or White on Black. To determine which color scheme is currently being used by LEADTOOLS, call the L_GetAutoCADFilesColorScheme function. To set the color scheme, call the L_SetAutoCADFilesColorScheme function.