L_LVKRN_API L_INT L_VecSetOrigin(pVector, pOrigin)
Sets new origin for a vector handle.
Pointer to a vector handle.
Pointer to a VECTORPOINT structure that contains the new origin. If this parameter is NULL, the new origin will be calculated based on the objects currently in the vector handle.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
The origin of a vector drawing may change whenever new objects are added. To insure that the drawing is centered around its origin, call L_VecSetOrigin(pVector, NULL) after adding objects.
The origin may be retrieved using L_VecGetOrigin.
L_VecApplyTransformation must be called to make the new origin take effect. If you do not, your changes will not be saved.
Required DLLs and Libraries
This example will recalculate the origin of a vector image.
L_LTVKRNTEX_API L_INT VecSetOriginExample(pVECTORHANDLE pVector)
{
/* re-calculate origin */
return L_VecSetOrigin( pVector, NULL );
}