L_VecDlgRotate

#include "lvdlg.h"

L_LVDLG_API L_INT L_VecDlgRotate(hWnd, pVector, pRotation, pOrigin, dwFlags, pfnCallback, pUserData)

L_HWND hWnd;

window handle

pVECTORHANDLE pVector;

pointer to a vector handle

pVECTORPOINT pRotation;

pointer to a VECTORPOINT structure

const pVECTORPOINT pOrigin;

pointer to a VECTORPOINT structure

L_UINT32 dwFlags;

user interface flags for dialog

LVCOMMDLGHELPCB pfnCallback;

pointer to a help callback function

L_VOID * pUserData;

pointer to more parameters for the callback

Brings up the Vector Rotation dialog.

Parameter Description
hWnd Handle of the window that owns the dialog.
pVector Pointer to the vector handle that references the vector image to be rotated.
pRotation Pointer to a VECTORPOINT structure that contains rotation values. The values present in pRotation when the function is called are used to initialize the dialog. If this parameter is NULL when the function is called, the values used to initialize the dialog will come from the vector handle. When this function returns, this parameter is updated with the values entered through the dialog.
pOrigin Pointer to a VECTORPOINT structure that contains the origin of the rotation. (The point about which the rotation occurs.) If pOrigin is not NULL, rotation occurs around this point. If pOrigin is NULL, the center of rotation is the accumulative center of the objects to be rotated.
dwFlags User interface flags for dialog. Determines the layout and action of the dialog.
  Value Meaning
  VECTOR_DLG_AUTOPROCESS [0x80000000] Process the image on OK.
  VECTOR_DLG_SHOWPREVIEW [0x40000000] Show preview of image in dialog.
  VECTOR_DLG_SELECTED_ONLY [0x00000001] Rotate only selected objects.
  VECTOR_DLG_ENABLE_HELPBUTTON [0x00000002] Enable Help button.
pfnCallback Pointer to an optional help callback function.
  If you do not wish to provide help to this dialog, use NULL as the value of this parameter.
  To provide help to this dialog, use the function pointer as the value of this parameter.
  The callback function must adhere to the prototype described in LVCOMMDLGHELPCB.
pUserData Void pointer that you can use to pass one or more additional parameters that the callback function needs.
  To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure.
  If the additional parameters are not needed, you can pass NULL in this parameter.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

If no objects are currently selected in the source vector handle, all of the objects in the vector handle will be rotated in the dialog.

If there are selected objects inside the source vector handle, only those objects will be rotated in the dialog.

Required DLLs and Libraries

LVDLG

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_VecSetRotation, L_VecGetRotation, L_VecGetOrigin, L_VecSetOrigin, L_VecDlgScale, L_VecDlgTranslate

Example

This example will run the common rotate dialog.

L_INT VecDlgRotateExample( 
HWND hWnd, 
pVECTORHANDLE pVector) 
{ 
   L_INT nRet; 
   VECTORPOINT Point; 
   nRet = L_VecGetRotation(pVector, &Point); 
   if(nRet != SUCCESS) 
      return nRet; 
   nRet = L_VecDlgRotate( 
   hWnd, 
   pVector, 
   &Point, 
   NULL, 
   VECTOR_DLG_AUTO_PROCESS | 
   VECTOR_DLG_SHOW_PREVIEW, 
   NULL, 
   NULL); 
   return nRet; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Vector C API Help