Leadtools.Windows.Annotations Requires Document/Medical license. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
Flip Method
See Also  Example
Leadtools.Windows.Annotations Namespace > AnnAutomation Class : Flip Method



horizontal
true to flip the object horizontally (reverse); false to flip the object vertically.
horizontal
true to flip the object horizontally (reverse); false to flip the object vertically.
Flips the objects that are currently being edited (selected) in this AnnAutomation.

Syntax

Visual Basic (Declaration) 
Public Overridable Sub Flip( _
   ByVal horizontal As Boolean _
) 
Visual Basic (Usage)Copy Code
Dim instance As AnnAutomation
Dim horizontal As Boolean
 
instance.Flip(horizontal)
C# 
public virtual void Flip( 
   bool horizontal
)
C++/CLI 
public:
virtual void Flip( 
   bool horizontal
) 

Parameters

horizontal
true to flip the object horizontally (reverse); false to flip the object vertically.

Example

Visual BasicCopy Code
Private Sub AnnAutomation_Flip(ByVal automation As AnnAutomation)
   ' make sure no objects are selected
   automation.SelectNone()
   ' see if we can flip? (should say no)
   If (Not automation.CanFlip) Then
      MessageBox.Show("Cannot flip objects because no objects are selected")
   End If

   ' add a text object and select it
   Dim text As AnnTextObject = New AnnTextObject()
   text.FontFamily = New FontFamily("Arial")
   text.FontSize = 20
   text.FontWeight = FontWeights.Bold
   text.TextBrush = Brushes.Red
   text.Text = "Flip Me!"
   text.Left = 100
   text.Top = 100
   text.Width = 200
   text.Height = 200

   automation.Container.Children.Add(text)
   automation.StartEditing(text, False)

   ' flip this object vertically
   MessageBox.Show("Now we are going to flip this text vertically")
   If automation.CanFlip Then
      automation.Flip(False)
   End If

   ' flip this object horizontally (reverse)
   MessageBox.Show("Now we are going to flip this text horizontally (reverse it)")
   If automation.CanFlip Then
      automation.Flip(True)
   End If
End Sub
C#Copy Code
private void AnnAutomation_Flip(AnnAutomation automation) 

   // make sure no objects are selected 
   automation.SelectNone(); 
   // see if we can flip? (should say no) 
   if(!automation.CanFlip) 
      MessageBox.Show("Cannot flip objects because no objects are selected"); 
 
   // add a text object and select it 
   AnnTextObject text = new AnnTextObject(); 
   text.FontFamily = new FontFamily("Arial"); 
   text.FontSize = 20; 
   text.FontWeight = FontWeights.Bold; 
   text.TextBrush = Brushes.Red; 
   text.Text = "Flip Me!"; 
   text.Left = 100; 
   text.Top = 100; 
   text.Width = 200; 
   text.Height = 200; 
 
   automation.Container.Children.Add(text); 
   automation.StartEditing(text, false); 
 
   // flip this object vertically 
   MessageBox.Show("Now we are going to flip this text vertically"); 
   if(automation.CanFlip) 
      automation.Flip(false); 
 
   // flip this object horizontally (reverse) 
   MessageBox.Show("Now we are going to flip this text horizontally (reverse it)"); 
   if(automation.CanFlip) 
      automation.Flip(true); 
}

Remarks

AnnAutomation can flip one or more AnnObjectBase if they are currently in edit mode (selected) and these objects are not locked.

If objects are grouped togeter, the group is flipped as a unit.

Call the CanFlip property to determine whether you can call this method.

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family

See Also

Flip requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.