Defines an annotation stamp object.
[SerializableAttribute()]
public class AnnStampObject : IAnnPictureObject, AnnTextObject
<SerializableAttribute()>
Public Class AnnStampObject
Inherits Leadtools.Annotations.AnnTextObject
Implements Leadtools.Annotations.IAnnPictureObject, Leadtools.Annotations.IAnnTextObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
[SerializableAttribute()]
public ref class AnnStampObject : public Leadtools.Annotations.AnnTextObject, Leadtools.Annotations.IAnnPictureObject, Leadtools.Annotations.IAnnTextObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
The stamp annotation object can be a picture or a text string in a rectangular frame. If the stamp object has a picture, it will be scaled to fit the bounding rectangle and drawn. If the stamp does not have a picture, the text will be drawn. This class implements the IAnnPictureObject interface and accesses the IAnnPictureObject.Picture property that handles the picture associated with the annotation object.
For more information, refer to Using Pictures in Annotation Objects (Deprecated)
For more information about the stamp annotation object refer to AnnStampObject (Deprecated). For more information about the automated stamp annotation object, refer to Annotation Objects - Automated Features (Deprecated) and Automated Annotations - Stamp Picture Tab (Deprecated).
This example creates a new stamp object.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
private void AnnStampObject_AnnStampObject(AnnContainer container, string imageFileName)
{
AnnStampObject stamp = new AnnStampObject();
AnnPicture pic = new AnnPicture(Image.FromFile(imageFileName));
pic.TransparentMode = AnnPictureTransparentMode.None;
pic.TransparentColor = Color.Black;
stamp.Picture = pic;
stamp.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel);
container.Objects.Add(stamp);
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
Private Sub AnnStampObject_AnnStampObject(ByVal container As AnnContainer, ByVal imageFileName As String)
Dim stamp As AnnStampObject = New AnnStampObject()
Dim pic As AnnPicture = New AnnPicture(Image.FromFile(imageFileName))
pic.TransparentMode = AnnPictureTransparentMode.None
pic.TransparentColor = Color.Black
stamp.Picture = pic
stamp.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel)
container.Objects.Add(stamp)
End 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