#include "ltwrappr.h"
virtual L_INT LVectorBase::LogicalToPhysical(pDst, pSrc)
Converts a 3D VECTORPOINT into a Windows 2D POINT.
Pointer to a POINT structure to be updated with the physical 2 dimensional point converted from the 3 dimensional vector point in pSrc.
Pointer to a VECTRPOINT structure that contains a 3 dimensional point to be converted into a 2 dimensional point.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
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
This example will obtains drawing physical extents.
L_INT LVectorBase__LogicalToPhysicalExample()
{
L_INT nRet;
VECTORPOINT LeftTop, RightBottom;
POINT LeftTop2D, RightBottom2D;
LVectorBase Vector;
nRet = Vector.Load(MAKE_IMAGE_PATH(TEXT("random.dxf")));
if(nRet != SUCCESS)
return nRet;
// Get drawing logical extents
nRet = Vector.GetObjectParallelogram( &LeftTop, &RightBottom );
if(nRet != SUCCESS)
return nRet;
// Convert to physical to get the rect where the drawing will be painted
nRet = Vector.LogicalToPhysical(&LeftTop2D, &LeftTop );
if(nRet != SUCCESS)
return nRet;
nRet = Vector.LogicalToPhysical( &RightBottom2D, &RightBottom );
if(nRet != SUCCESS)
return nRet;
return SUCCESS;
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document