Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
PushFixedState Method
See Also  Example
Leadtools.Annotations Namespace > AnnContainer Class : PushFixedState Method




Temporarily disables the fixed state of every AnnObject in the AnnContainer.

Syntax

Visual Basic (Declaration) 
Public Overridable Function PushFixedState() As Integer
Visual Basic (Usage)Copy Code
Dim instance As AnnContainer
Dim value As Integer
 
value = instance.PushFixedState()
C# 
public virtual int PushFixedState()
Managed Extensions for C++ 
public: virtual int PushFixedState(); 
C++/CLI 
public:
virtual int PushFixedState(); 

Return Value

size of the fixed state stack before the call to PushFixedState

Example

Visual BasicCopy Code
' This sample paints annotations (both 'fixed' and non'fixed) at a zoom factor of 2
' on the Graphics object g
Private Sub AnnContainer_PushFixedState(ByVal graphics As Graphics, ByVal annContainer As AnnContainer)
   Dim transformContainer As Matrix = annContainer.Transform
   Dim transformOriginal As Matrix = annContainer.Transform.Clone()
   ' Temporarily disable 'fixed' annotations for painting
   annContainer.PushFixedState()

   ' Paint the container at 2x
   Dim transformZoom2x As Matrix = New Matrix(2, 0, 0, 2, 0, 0)
   transformContainer.Multiply(transformZoom2x)
   annContainer.Draw(graphics)

   ' Restore original container transform
   annContainer.Transform = transformOriginal

   ' Enable 'fixed' annotions
   annContainer.PopFixedState()
End Sub
C#Copy Code
// This sample paints annotations (both 'fixed' and non'fixed) at a zoom factor of 2 
// on the Graphics object g 
private void AnnContainer_PushFixedState(Graphics graphics, AnnContainer annContainer) 

   Matrix transformContainer = annContainer.Transform; 
   Matrix transformOriginal = annContainer.Transform.Clone(); 
   // Temporarily disable 'fixed' annotations for painting 
   annContainer.PushFixedState(); 
 
   // Paint the container at 2x 
   Matrix transformZoom2x = new Matrix(2, 0, 0, 2, 0, 0); 
   transformContainer.Multiply(transformZoom2x); 
   annContainer.Draw(graphics); 
 
   // Restore original container transform 
   annContainer.Transform = transformOriginal; 
 
   // Enable 'fixed' annotions 
   annContainer.PopFixedState(); 
}

Remarks

Calls PushFixedState on all AnnObject in the AnnContainer. Fixed annotations are independent of the Transform. The result is that they do not scroll or move with the underlying image. For more information, refer to PushFixedState.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features