Defines an annotation image object.
[SerializableAttribute()]
public class AnnImageObject : Leadtools.Annotations.AnnRectangleObject, Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
<SerializableAttribute()>
Public Class AnnImageObject
Inherits Leadtools.Annotations.AnnRectangleObject
Implements Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
[SerializableAttribute()]
public ref class AnnImageObject : public Leadtools.Annotations.AnnRectangleObject, Leadtools.Annotations.IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
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 (Deprecated)
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.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
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);
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
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
Products |
Support |
Feedback: AnnImageObject Class - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|
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
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.