LAnnotation::SetOptions

#include "ltwrappr.h"

L_INT LAnnotation::SetOptions(uOptions)

Sets user interface and other annotation options.

Parameters

L_UINT uOptions

Options to enable. Use a bitwise OR to specify more than one value

Value Meaning
OPTIONS_NEW_STAMP_METAFILES [0x0001] Uses the new rubber stamp styles.
OPTIONS_NEW_TOOLBAR [0x0002] Displays the new XP style annotation toolbar
OPTIONS_NEW_ALPHA [0x0004] Displays new "alpha" option in the Fill mode dialog
OPTIONS_NEW_ROTATE [0x0008] Displays rotate handles on objects in design mode
OPTIONS_NEW_SIDE_HANDLES [0x0010] Displays side handles on rectangular objects in design mode
OPTIONS_NEW_MULTI_SELECT [0x0020] Displays a multi-select outline of multiply selected objects, along with the new multi-select resize behavior
OPTIONS_NEW_CURSORS [0x0040] Displays different cursors for each of the annotation tools, and when hovering over handles in design mode.
OPTIONS_NEW_ESC_CANCEL [0x0080] Allows the user to cancel current action by pressing ESC. Actions include annotation creation and manipulation.
OPTIONS_NEW_CALIBRATE_RULER [0x0100] Enables ruler calibrate feature in design mode
OPTIONS_NEW_DOT_DASH_LINES [0x0200] Draws the dash and dot line styles with line width greater than 1 pixel.
OPTIONS_NEW_TEXT_OPTIONS [0x0400] Enables new text annotation options including show/hide text, show/hide border, and changing text color.
OPTIONS_NEW_MULTILINE_DRAW [0x1000] Two exactly equal points will cancel the object creation.
OPTIONS_NEW_ALL Enables ALL the new options. The value for this constant is the logical "or" of all the above flags.
OPTIONS_NEW_SNAPTOGRID [0x0800] Enables the snap-to-grid feature.

Returns

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

Comments

LEADTOOLS continuously updates annotation features. Some of these features change the way annotations look. Other features change the behavior of the user interface (automated mode). To maintain backward compatibility within the v14 series, the new features were disabled by default. To enable these features, call LAnnotation::SetOptions with the desired flags. To get the current options, call the LAnnotation::GetOptions function. For more information, refer to Key Annotation Features.

Required DLLs and Libraries

Platforms

Win32, x64.

See Also

Functions

Topics

Example

The following example demonstrates how to enable and disable the new
'side handle' annotation feature in version 14.5. To see how this works,
paste this example into the main annotation demo, draw a rectangle,
and select it before calling this function. The example toggles the feature.

L_INT LAnnotation_SetOptionsExample(LAnnRectangle& annrect) 
{ 
   L_TCHAR *pszMsg = NULL; 
   L_INT nRet = SUCCESS; 
   L_UINT uOptions = 0; 
 
   nRet = annrect.GetOptions(&uOptions); 
   if (nRet != SUCCESS) 
      return nRet; 
 
   if (uOptions & OPTIONS_NEW_SIDE_HANDLES) 
   { 
      uOptions &= ~OPTIONS_NEW_SIDE_HANDLES; 
      pszMsg = TEXT("Draw a rectangular object and select it. Note there are no side handles. Run this example again to enable the side handles."); 
   } 
   else 
   { 
      uOptions |= OPTIONS_NEW_SIDE_HANDLES;  
      pszMsg = TEXT("Draw a rectangular object and select it. Note the side handles. Run this example again to disable the side handles."); 
   } 
 
   nRet = annrect.SetOptions(uOptions); 
   if (nRet != SUCCESS) 
      return  nRet; 
	MessageBox( NULL, pszMsg, TEXT("Notice"), MB_OK); 
	 
	return SUCCESS; 
} 

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

LEADTOOLS Raster Imaging C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.