Flips the objects that are currently being edited (selected) in this AnnAutomation.
public virtual void Flip(
bool horizontal
)
Public Overridable Sub Flip( _
ByVal horizontal As Boolean _
)
public:
virtual void Flip(
bool horizontal
)
horizontal
true to flip the object horizontally (reverse); false to flip the object vertically.
AnnAutomation can flip one or more AnnObject if they are currently in edit mode (selected) and these objects are not locked.
If objects are grouped together the group is flipped as a unit.
Call the CanFlip property to determine whether you can call this method.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
using Leadtools.Drawing;
public 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.Font = new AnnFont("Arial", new AnnLength(20, AnnUnit.Point), FontStyle.Bold);
text.TextColor = Color.Red;
text.Text = "Flip Me!";
text.Bounds = new AnnRectangle(100, 100, 200, 200, AnnUnit.Pixel);
automation.Container.Objects.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);
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Drawing
Public 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.Font = New AnnFont("Arial", New AnnLength(20, AnnUnit.Point), FontStyle.Bold)
text.TextColor = Color.Red
text.Text = "Flip Me!"
text.Bounds = New AnnRectangle(100, 100, 200, 200, AnnUnit.Pixel)
automation.Container.Objects.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
Products |
Support |
Feedback: Flip Method - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.