Leadtools.Annotations Namespace : AnnImageObject Class |
[SerializableAttribute()] public class AnnImageObject : AnnRectangleObject, IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Declaration <SerializableAttribute()> Public Class AnnImageObject Inherits AnnRectangleObject Implements IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Usage Dim instance As AnnImageObject
public sealed class AnnImageObject : IAnnPictureObject, System.ICloneable, IClosable //In WinRT the IDisposable interface is replaced by IClosable, ~Remove~
function Leadtools.Annotations.AnnImageObject()
[SerializableAttribute()] public ref class AnnImageObject : public AnnRectangleObject, IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
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
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
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); }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2