#include "l_bitmap.h"

L_LTANN_API L_INT L_AnnSetTextFixedSize (hObject, bTextFixedSize, uFlags)


handle to the annotation object

L_BOOL bTextFixedSize;

text size flag

L_UINT uFlags;


Sets a value that indicates whether the text size changes with scaling.

Parameter Description
hObject Handle to the annotation object.
bTextFixedSize Flag that indicates whether the text size changes with scaling. Possible values are:
  Value Meaning
  TRUE The text size does not change with scaling.
  FALSE The text size changes with scaling. This is the default value.

uFlags Flags that determine which objects to process. Most of the flags apply only to container objects. You can combine values when appropriate by using a bitwise OR (|). Possible values are:
  Value Meaning
  0 Process only the specified object.
  ANNFLAG_SELECTED [0x0001] Process only objects that have the selected property set to TRUE. For getting and setting the selected property, call the L_AnnGetSelected and L_AnnSetSelected functions.
  ANNFLAG_NOTTHIS [0x0004] Process only one level of objects within the specified container, not the container itself. If there are containers within the container, they are modified, but the objects within them are not.
  ANNFLAG_RECURSE [0x0008] Process objects within a container, and within any sub containers, down to any level.
  ANNFLAG_NOTCONTAINER [0x0002] (Used with ANNFLAG_RECURSE) Process objects within containers, not the containers themselves.
  ANNFLAG_NOINVALIDATE [0x0010] Do not invalidate the affected rectangle in the window. Use this to avoid generating unwanted paint messages.
  ANNFLAG_CHECKMENU [0x0020] Process objects only if the ANNAUTOTEXT_MENU_LINE menu item has been selected.



The function was successful.

< 1

An error occurred. Refer to Return Codes.


The text size of an object is relative to its container object, and the value is interpreted using the container's scaling factors. As a result, when zooming in, the text size increases, and when zooming out, the text size decreases. This is the default behavior.

In some cases it might be preferable to have the text size of an annotation object remain constant, regardless of the scaling (zooming). To do this, call L_AnnSetTextFixedSize function with the bTextFixedSize parameter set to TRUE.

Note that this function has no effect on the ANNOBJECT_RTF object.

This function does not affect objects that do not have this property or that do not let you change the property. For more information on the objects types and their properties, refer to Types of Annotations.

Required DLLs and Libraries


For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.


Win32, x64.

See Also


L_AnnGetTextFixedSize, L_AnnGetLineFixedWidth, L_AnnIsFixedInRect, L_AnnPopFixedState, L_AnnPushFixedState, L_AnnSetFixed, L_AnnSetText, L_AnnSetTextAlign, L_AnnSetTextExpandTokens, L_AnnSetTextOptions, L_AnnSetTextPointerFixed, L_AnnSetTextRotate, L_AnnGetText, L_AnnGetTextAlign, L_AnnGetTextExpandTokens, L_AnnGetTextOptions, L_AnnGetTextPointerFixed, L_AnnGetTextRotate


Annotation Functions: Object Properties


Annotation Functions (Document/Medical only): Implementing Automation


Annotation Functions (Document/Medical only): Getting and Setting the Fixed Property


Annotation Objects - Default Values


Annotation Objects - Automated Features


Implementing an Automated Annotation Program


Implementing a Non-automated Annotation Program


Altering Annotation Object Settings


Annotation Automation Object


Implementing Annotations


Fixed Annotations


This examples toggles the fixed text setting of the annotation object (hObject)

L_INT AnnSetTextFixedSizeExample(HANNOBJECT hObject) 
    L_INT nRet = TRUE; 
   L_BOOL bTextFixedSize = FALSE; 
   L_TCHAR szMsg[200]; 
   nRet = L_AnnGetTextFixedSize(hObject, &bTextFixedSize); 
   if (nRet != SUCCESS) 
      return nRet; 
   bTextFixedSize = !bTextFixedSize; 
   nRet = L_AnnSetTextFixedSize(hObject, bTextFixedSize, 0); 
   if (nRet != SUCCESS) 
      return nRet; 
   wsprintf(szMsg, _T("bTextFixedSize changed from %s to %s"), 
      !bTextFixedSize ? _T("TRUE") : _T("FALSE"), 
      bTextFixedSize ? _T("TRUE") : _T("FALSE")); 
   MessageBox(NULL, szMsg, _T("Notice"), MB_OK); 
   return nRet; 

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

LEADTOOLS Raster Imaging C API Help