LEADTOOLS Annotations (Leadtools.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AnnFixedStateOperations Enumeration
See Also  
Leadtools.Annotations Namespace : AnnFixedStateOperations Enumeration



The AnnFixedStateOperations Enumeration is available in LEADTOOLS Document and Medical Imaging toolkits.

Indicates the type of fixed width and font size state of the annotation object.

Syntax

Visual Basic (Declaration) 
<FlagsAttribute()>
<SerializableAttribute()>
Public Enum AnnFixedStateOperations 
   Inherits System.Enum
   Implements IComparableIConvertibleIFormattable 
Visual Basic (Usage)Copy Code
Dim instance As AnnFixedStateOperations
C# 
[FlagsAttribute()]
[SerializableAttribute()]
public enum AnnFixedStateOperations : System.Enum, IComparableIConvertibleIFormattable  
C++/CLI 
[FlagsAttribute()]
[SerializableAttribute()]
public enum class AnnFixedStateOperations : public System.Enum, IComparableIConvertibleIFormattable  

Members

MemberDescription
FontSize

Fix the font size of the annotation object. Any text that is part of this object will be drawn using its original point value regardless of the current container scale value.

None

Annotation object is not fixed.

PenWidth

Fix the pen size of the annotation object. Any line that is part of this object will be drawn using its original pixel size regardless of the current container scale value.

Example

Visual BasicCopy Code
Public Sub AnnFixedStateOperationsExample(ByVal container As AnnContainer, ByVal viewer As RasterImageViewer, ByVal newVideoPicture As String)
   ' Create two text objects, one with fixed font and one without
   Dim textObject1 As New AnnTextObject()
   textObject1.Pen = New AnnPen(Color.Red, New AnnLength(1))
   textObject1.Text = "AnnFixedStateOperations.None"
   textObject1.FixedState = AnnFixedStateOperations.None
   textObject1.Brush = Nothing
   textObject1.Font = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Regular)
   textObject1.EdgeMargin = AnnLength.Empty
   textObject1.Alignment = StringAlignment.Center
   textObject1.LineAlignment = StringAlignment.Center
   textObject1.TextRotate = AnnTextRotate.Rotate0
   textObject1.Bounds = New AnnRectangle(100, 100, 100, 100)
   container.Objects.Add(textObject1)

   Dim textObject2 As AnnTextObject = CType(textObject1.Clone(), AnnTextObject)
   textObject2.Text = "AnnFixedStateOperations.FontSize"
   textObject2.FixedState = AnnFixedStateOperations.FontSize
   textObject2.Bounds = New AnnRectangle(400, 100, 100, 100)
   container.Objects.Add(textObject2)

   ' Create two line objects, one with fixed pen size and one without
   Dim lineObject1 As New AnnLineObject()
   lineObject1.Pen = New AnnPen(Color.Blue, New AnnLength(1))
   lineObject1.NameVisible = True
   lineObject1.NameOffset = AnnPoint.Empty
   lineObject1.NameForeColor = Color.White
   lineObject1.NameBackColor = Color.Blue
   lineObject1.NameFont = New AnnFont("Arial", New AnnLength(11, AnnUnit.Point), FontStyle.Regular)
   lineObject1.StartPoint = New AnnPoint(100, 400)
   lineObject1.EndPoint = New AnnPoint(100, 800)
   lineObject1.Name = "AnnFixedStateOperations.None"
   lineObject1.FixedState = AnnFixedStateOperations.None
   container.Objects.Add(lineObject1)

   Dim lineObject2 As AnnLineObject = CType(lineObject1.Clone(), AnnLineObject)
   lineObject2.StartPoint = New AnnPoint(400, 400)
   lineObject2.EndPoint = New AnnPoint(400, 800)
   lineObject2.Name = "AnnFixedStateOperations.PenWidth"
   lineObject2.FixedState = AnnFixedStateOperations.PenWidth
   container.Objects.Add(lineObject2)

   viewer.Invalidate()
End Sub
C#Copy Code
public void AnnFixedStateOperationsExample(AnnContainer container, RasterImageViewer viewer, string newVideoPicture)
{
   // Create two text objects, one with fixed font and one without
   AnnTextObject textObject1 = new AnnTextObject();
   textObject1.Pen = new AnnPen(Color.Red, new AnnLength(1));
   textObject1.Text = "AnnFixedStateOperations.None";
   textObject1.FixedState = AnnFixedStateOperations.None;
   textObject1.Brush = null;
   textObject1.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular);
   textObject1.EdgeMargin = AnnLength.Empty;
   textObject1.Alignment = StringAlignment.Center;
   textObject1.LineAlignment = StringAlignment.Center;
   textObject1.TextRotate = AnnTextRotate.Rotate0;
   textObject1.Bounds = new AnnRectangle(100, 100, 100, 100);
   container.Objects.Add(textObject1);

   AnnTextObject textObject2 = textObject1.Clone() as AnnTextObject;
   textObject2.Text = "AnnFixedStateOperations.FontSize";
   textObject2.FixedState = AnnFixedStateOperations.FontSize;
   textObject2.Bounds = new AnnRectangle(400, 100, 100, 100);
   container.Objects.Add(textObject2);

   // Create two line objects, one with fixed pen size and one without
   AnnLineObject lineObject1 = new AnnLineObject();
   lineObject1.Pen = new AnnPen(Color.Blue, new AnnLength(1));
   lineObject1.NameVisible = true;
   lineObject1.NameOffset = AnnPoint.Empty;
   lineObject1.NameForeColor = Color.White;
   lineObject1.NameBackColor = Color.Blue;
   lineObject1.NameFont = new AnnFont("Arial", new AnnLength(11, AnnUnit.Point), FontStyle.Regular);
   lineObject1.StartPoint = new AnnPoint(100, 400);
   lineObject1.EndPoint = new AnnPoint(100, 800);
   lineObject1.Name = "AnnFixedStateOperations.None";
   lineObject1.FixedState = AnnFixedStateOperations.None;
   container.Objects.Add(lineObject1);

   AnnLineObject lineObject2 = lineObject1.Clone() as AnnLineObject;
   lineObject2.StartPoint = new AnnPoint(400, 400);
   lineObject2.EndPoint = new AnnPoint(400, 800);
   lineObject2.Name = "AnnFixedStateOperations.PenWidth";
   lineObject2.FixedState = AnnFixedStateOperations.PenWidth;
   container.Objects.Add(lineObject2);

   viewer.Invalidate();
}

Remarks

This enumeration is used as value for the AnnObject.FixedState property. For more information on fixed annotation objects, refer to Fixed Annotations.

You can combine members of this enumeration together using a logical or operation (| in C# or OR in Visual Basic).

Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         Leadtools.Annotations.AnnFixedStateOperations

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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