LEADTOOLS Annotations (Leadtools.Annotations assembly)

AnnDrawable Class

Show in webframe
Example 





Members 
This is the base class for all annotation objects used in the Annotations class library.
Object Model
Syntax
'Declaration
 
<SerializableAttribute()>
Public Class AnnDrawable 
   Implements System.Runtime.Serialization.ISerializable 
'Usage
 
Dim instance As AnnDrawable

            

            
[SerializableAttribute()]
public ref class AnnDrawable : public System.Runtime.Serialization.ISerializable  
Remarks

This class holds common drawing information shared by all annotation objects in the Annotations class library.

You can query the properties of this class to easily figure out if a certain class supports pen, brush or font and quickly change them. For example, the properties dialogs used in the automation mode do just that to test whether to display the pen options.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms

Public Sub AnnDrawable_AnnDrawable(ByVal container As AnnContainer)
   For Each drawable As AnnDrawable In container.Objects
      If drawable.SupportsPen Then
         drawable.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
      End If
      If drawable.SupportsBrush Then
         drawable.Brush = New AnnSolidBrush(Color.White)
      End If

      If drawable.SupportsFont Then
         drawable.Font = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Regular)
         drawable.TextColor = Color.Red
      End If
   Next drawable
End Sub
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;

public void AnnDrawable_AnnDrawable(AnnContainer container)
{
   foreach(AnnDrawable drawable in container.Objects)
   {
      if(drawable.SupportsPen)
         drawable.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));
      if(drawable.SupportsBrush)
         drawable.Brush = new AnnSolidBrush(Color.White);

      if(drawable.SupportsFont)
      {
         drawable.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular);
         drawable.TextColor = Color.Red;
      }
   }
}
Requirements

Target Platforms

See Also

Reference

AnnDrawable Members
Leadtools.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.