L_VecSetOrigin
#include "lvkrn.h"
L_INT EXT_FUNCTION L_VecSetOrigin(pVector, pOrigin)
pVECTORHANDLE pVector; |
/* pointer to a vector handle */ |
const pVECTORPOINT pOrigin; |
/* pointer to a vector point */ |
Sets new origin for a vector handle.
Parameter |
Description |
pVector |
Pointer to a vector handle. |
pOrigin |
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. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
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 don’t your changes will not be saved.
Note for OpenGL and DirectX, this function has no effect.
Required DLLs and Libraries
LVKRN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
L_VecGetOrigin, L_VecApplyTransformationL_VecApplyTransformation |
Topics: |
Example
/* This example will recalculate the origin of a vector image */
void TestVecSetOrigin ( pVECTORHANDLE pVector )
{
/* re-calculate origin */
L_VecSetOrigin( pVector, NULL );
}