Working with Vector Handles

LEADTOOLS references vector images through an internal VECTORHANDLE structure. Several functions are provided that let you get or set information that pertains to the vector handle itself.

LVectorBase::Empty deletes all vector layers and vector objects from the class object's vector handle. To determine whether a class object's vector handle is empty, call LVectorBase::IsEmpty.

A vector handle can be locked to prevent any changes from being made. LVectorBase::SetLocked locks or unlocks the class object's vector handle. Locking a vector handle has precedence over locking vector layers within the vector handle. Therefore, if a vector handle is locked, the layers within that vector handle cannot be edited, even if the vector layers are not locked. To determine whether a vector handle is locked, use LVectorBase::IsLocked.

Each vector handle has an origin point. To get the current origin, call LVectorBase::GetOrigin. To set the origin, call LVectorBase::SetOrigin. The origin may change when new vector objects are added. To center the vector image around its origin, call LVectorBase::SetOrigin (NULL) after adding new objects.

When a vector object is selected in a vector handle, a marker is used to indicate that the object is selected. The marker settings that indicate how the marker will look can be obtained using LVectorBase::GetMarker. To change these settings call LVectorBase::SetMarker.

For each vector handle a bounding parallelogram exists for the vector objects contained in the vector handle. To get the current bounding parallelogram, call LVectorBase::GetParallelogram. To set the bounding parallelogram, call LVectorBase::SetParallelogram. After adding new vector objects to a vector handle the logical size of the image might change. Call LVectorBase::SetParallelogram with either pMin or pMax set to NULL to have the function calculate the bounding rectangle for the vector handle based on the objects contained in the vector handle.

To copy one vector handle to another vector handle call LVectorBase::Copy.

The display options for a vector handle determine how the vector objects in that vector handle will be displayed. These display characteristics include the clip mode, anti-aliasing and text rendering options. To determine the current display options, call LVectorBase::GetDisplayOptions. To set or change the display options, use the LVectorBase::SetDisplayOptions function.

In addition to modifying the display options, the appearance of the objects within the vector handle may also be changed by inverting the colors. This is done using the LVectorBase::InvertColors function.

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.