This is the base class for all annotation objects used in the Annotations class library.
[SerializableAttribute()]public class AnnDrawable : ISerializable
<SerializableAttribute()>Public Class AnnDrawableImplements System.Runtime.Serialization.ISerializable
[SerializableAttribute()]public ref class AnnDrawable : public System.Runtime.Serialization.ISerializable
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.
This example changes all the objects in an annotation container so they use a red pen, a white brush and an Arial font.
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;}}}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsPublic Sub AnnDrawable_AnnDrawable(ByVal container As AnnContainer)For Each drawable As AnnDrawable In container.ObjectsIf drawable.SupportsPen Thendrawable.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))End IfIf drawable.SupportsBrush Thendrawable.Brush = New AnnSolidBrush(Color.White)End IfIf drawable.SupportsFont Thendrawable.Font = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Regular)drawable.TextColor = Color.RedEnd IfNext drawableEnd Sub
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
