Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
AnnStampObject Class
See Also  Members   Example 
Leadtools.Annotations Namespace : AnnStampObject Class




Defines an annotation stamp object.

Object Model
















Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnStampObject 
   Inherits AnnTextObject
   Implements IAnnPictureObjectIAnnTextObject 
Visual Basic (Usage)Copy Code
Dim instance As AnnStampObject
C# 
[SerializableAttribute()]
public class AnnStampObject : AnnTextObject, IAnnPictureObjectIAnnTextObject  
Managed Extensions for C++ 
[SerializableAttribute()]
public __gc class AnnStampObject : public AnnTextObject, IAnnPictureObjectIAnnTextObject  
C++/CLI 
[SerializableAttribute()]
public ref class AnnStampObject : public AnnTextObject, IAnnPictureObjectIAnnTextObject  

Example

This example creates a new stamp object.

Visual BasicCopy Code
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
C#Copy Code
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); 
}

Remarks

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 Picture property that handles the picture associated with the annotation object.

For more information, refer to Using Pictures in Annotation Objects

For more information about the stamp annotation object refer to AnnStampObject. For more information about the automated stamp annotation object, refer to Annotation Objects - Automated Features and Automated Annotations - Stamp Picture Tab.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnRectangleObject
            Leadtools.Annotations.AnnTextObject
               Leadtools.Annotations.AnnStampObject

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features