L_VecGetViewport

Summary

Gets the current view port.

Syntax

#include "ltvkrn.h"

L_LVKRN_API L_INT L_VecGetViewport(pVector, pViewport)

Parameters

const pVECTORHANDLE pVector

Pointer to a vector handle.

L_RECT * pViewport

Pointer to a RECT structure to be updated with the current view port data.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

Use this function to get the view port associated with the specified vector handle.

If pVector is attached to a window, you must call this function when processing WM_SIZE messages, since the VECTOR library needs to know when the window size has changed (DirectX), or when the double buffer mode is selected in the current VECTOR engine.

This function and L_VecSetCamera are required to complete the projection process from the vector image onto a 2D surface.

Required DLLs and Libraries

See Also

Functions

Example

This example will get current view port value and shows it in a message box.

L_LTVKRNTEX_API L_INT VecGetViewportExample(pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   RECT rect; 
   L_TCHAR szBuffer[ 80 ]; 
 
   /* Get viewport */ 
   nRet = L_VecGetViewport( pVector, &rect ); 
   if(nRet != SUCCESS) 
      return nRet; 
 
   /* Format in a buffer */ 
   wsprintf( szBuffer, TEXT("%d, %d, %d, %d"), rect.left, rect.top, rect.right, rect.bottom ); 
 
   /* Show in a message box */ 
   MessageBox( NULL, szBuffer, TEXT("Viewport"), 0 ); 
 
   return SUCCESS; 
} 

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Vector C API Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.