LEADTOOLS Annotations (Leadtools.Annotations assembly)
LEAD Technologies, Inc

AnnFixedStateOperations Enumeration

ExampleExample 





Indicates the type of fixed width and font size state of the annotation object.
Syntax
'Declaration
 
<FlagsAttribute()>
<SerializableAttribute()>
Public Enum AnnFixedStateOperations 
   Inherits System.Enum
   Implements System.IComparableSystem.IConvertibleSystem.IFormattable 
'Usage
 
Dim instance As AnnFixedStateOperations
Leadtools.Annotations.AnnFixedStateOperations = function() { };
Leadtools.Annotations.AnnFixedStateOperations.prototype = {
LeadtoolsMemberMarker(replace me) };
[FlagsAttribute()]
[SerializableAttribute()]
public enum class AnnFixedStateOperations : public System.Enum, System.IComparableSystem.IConvertibleSystem.IFormattable  
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.

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).

Example
 
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
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();
}
Inheritance Hierarchy

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

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Leadtools.Annotations Namespace
AnnObject.FixedState
AnnObject.SetFixedState

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.