←Select platform

AnnFixedStateOperations Enumeration

Summary

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

Syntax

C#
VB
C++
[SerializableAttribute()] 
[FlagsAttribute()] 
public enum AnnFixedStateOperations 
  
<FlagsAttribute()> 
<SerializableAttribute()> 
Public Enum AnnFixedStateOperations  
   Inherits System.Enum 
   Implements System.IComparable, System.IConvertible, System.IFormattable  
[FlagsAttribute()] 
[SerializableAttribute()] 
public enum class AnnFixedStateOperations : public System.Enum, System.IComparable, System.IConvertible, System.IFormattable   

Members

ValueMemberDescription
0x00000000None

Annotation object is not fixed.

0x00000001FontSize

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.

0x00000002PenWidth

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.

Remarks

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

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

Example

C#
VB
using Leadtools; 
using Leadtools.Annotations; 
using Leadtools.WinForms; 
 
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(); 
} 
Imports Leadtools 
Imports Leadtools.Annotations 
Imports Leadtools.WinForms 
 
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 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations Assembly