#include "ltwrappr.h"
virtual L_INT LVectorBase::PhysicalToLogical(pDst, pSrc)
Converts a Windows 2D POINT into a 3D VECTORPOINT.
Pointer to a VECTORPOINT structure to be updated with the logical 3 dimensional point converted from the 2 dimensional point in pSrc.
Pointer to a POINT structure that contains a 2 dimensional point to be converted into a 3 dimensional point.
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
Converts a given 2D physical point into a logical (with X, Y, Z coordinates), 3D point.
The Z value of the destination 3D point will not be changed.
Conversion will be based on the current view port and camera values set in the VECTORHANDLE.
Required DLLs and Libraries
This example will obtains drawing logical extents.
L_INT LVectorBase__PhysicalToLogicalExample(HWND hWnd)
{
RECT rect;
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 physical extent of the all objects inside drawing
nRet = Vector.AttachToWindow(hWnd);
if(nRet != SUCCESS)
return nRet;
GetClientRect(hWnd, &rect);
nRet = Vector.SetViewport(&rect);
if(nRet != SUCCESS)
return nRet;
// Get the rectangle of entire object
nRet = Vector.GetObjectRect(&rect);
if(nRet != SUCCESS)
return nRet;
LeftTop2D.x = rect.left;
LeftTop2D.y = rect.top;
RightBottom2D.x = rect.right;
RightBottom2D.y = rect.bottom;
nRet = Vector.PhysicalToLogical( &LeftTop, &LeftTop2D );
if(nRet != SUCCESS)
return nRet;
nRet = Vector.PhysicalToLogical( &RightBottom, &RightBottom2D );
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.