LVectorBase::LogicalToPhysical
#include "ltwrappr.h"
virtual L_INT LVectorBase::LogicalToPhysical(pDst, pSrc)
POINT L_FAR *pDst; |
/* pointer to a POINT structure */ |
const pVECTORPOINT pSrc; |
/* pointer to a VECTORPOINT structure */ |
Converts a 3D VECTORPOINT into a Windows 2D POINT.
Parameter |
Description |
pDst |
Pointer to a POINT structure to be updated with the physical 2 dimensional point converted from the 3 dimensional vector point in pSrc. |
pSrc |
Pointer to a VECTRPOINT structure that contains a 3 dimensional point to be converted into a 2 dimensional point. |
Returns
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
Comments
Converts a given logical point in the vector drawing (with X, Y, Z coordinates), into a physical 2D point.
Conversion will be based on the current view port and camera set in the VECTORHANDLE.
Not supported in DirectX.
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: |
LVectorBase::GetObjectParallelogram, LVectorBase::GetObjectRect |
Example
L_VOID Example15(HWND hWnd)
{
//This example will obtains drawing physical extents
VECTORPOINT LeftTop, RightBottom;
POINT LeftTop2D, RightBottom2D;
LVectorBase Vector;
Vector.Load(TEXT("s:\\temp\\images\\dxf\\test.dxf"));
// Get drawing logical extents
Vector.GetObjectParallelogram(NULL, FALSE, &LeftTop, &RightBottom );
// Convert to physical to get the rect where the drawing will be painted
Vector.LogicalToPhysical(&LeftTop2D, &LeftTop );
Vector.LogicalToPhysical( &RightBottom2D, &RightBottom );
}