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




Defines an annotation image object.

Object Model















Syntax

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

Example

This example creates a new image object with top, left at 100, 200, width, height of 400, 600 pixels and then adds it to a container.

Visual BasicCopy Code
Private Sub AnnImageObject_AnnImageObject(ByVal container As AnnContainer, ByVal imageFileName As String)
   Dim img As AnnImageObject = New AnnImageObject()
   Dim pic As AnnPicture = New AnnPicture(Image.FromFile(imageFileName))
   pic.TransparentMode = AnnPictureTransparentMode.None
   pic.TransparentColor = Color.Black
   img.Picture = pic
   img.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel)
   container.Objects.Add(img)
End Sub
C#Copy Code
private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName) 

   AnnImageObject img = new AnnImageObject(); 
   AnnPicture pic = new AnnPicture(Image.FromFile(imageFileName)); 
   pic.TransparentMode = AnnPictureTransparentMode.None; 
   pic.TransparentColor = Color.Black; 
   img.Picture = pic; 
   img.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel); 
   container.Objects.Add(img); 
}

Remarks

The image annotation object is a raster image defined by a bounding rectangle. This object does not support pens or brushes.

The AnnAudioObject and the AnnHotspotObject classes inherit the AnnImageObject class and access the common Picture property through this inheritance. For more information, refer to Using Pictures in Annotation Objects

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnRectangleObject
            Leadtools.Annotations.AnnImageObject
               Leadtools.Annotations.AnnHotspotObject
               Leadtools.Annotations.AnnAudioObject

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