Defines an annotation image object.
public class AnnImageObject : Leadtools.Windows.Annotations.AnnRectangleObject, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnImage, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPicture, Leadtools.Windows.Annotations.IAnnRectangle
Public Class AnnImageObject
Inherits Leadtools.Windows.Annotations.AnnRectangleObject
Implements Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnImage, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPicture, Leadtools.Windows.Annotations.IAnnRectangle
public ref class AnnImageObject : public Leadtools.Windows.Annotations.AnnRectangleObject, Leadtools.Windows.Annotations.IAnnHeader, Leadtools.Windows.Annotations.IAnnImage, Leadtools.Windows.Annotations.IAnnObject, Leadtools.Windows.Annotations.IAnnPicture, Leadtools.Windows.Annotations.IAnnRectangle
The image annotation object is a raster image defined by a bounding rectangle. This object does not support strokes or fills. The AnnStampObject class inherits the AnnImageObject class and access the common Picture property through this inheritance. For more information, refer to Using Pictures in WPF Annotation Objects
For XAML example, refer to AnnHotspotObject.
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.
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations
Private Sub AnnImageObject_AnnImageObject(ByVal container As AnnContainer, ByVal imageFileName As String)
Dim img As AnnImageObject = New AnnImageObject()
Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName)))
pic.TransparentMode = AnnTransparentMode.None
pic.TransparentColor = Colors.Black
img.Picture = pic
img.Rect = New Rect(100, 200, 400, 600)
container.Children.Add(img)
End Sub
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Demos;
using Leadtools.Help;
private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName)
{
AnnImageObject img = new AnnImageObject();
AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName)));
pic.TransparentColor = Colors.Black;
pic.TransparentMode = AnnTransparentMode.None;
img.Rect = new Rect(100, 200, 400, 600);
img.Picture = pic;
container.Children.Add(img);
}
using Leadtools.Windows.Controls;
using Leadtools.Windows.Annotations;
using Leadtools.Examples;
private void AnnImageObject_AnnImageObject(AnnContainer container, string imageFileName)
{
AnnImageObject img = new AnnImageObject();
AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName)));
pic.TransparentColor = Colors.Black;
pic.TransparentMode = AnnTransparentMode.None;
img.Rect = new Rect(100, 200, 400, 600);
img.Picture = pic;
container.Children.Add(img);
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Windows.Annotations
Private Sub AnnImageObject_AnnImageObject(ByVal container As AnnContainer, ByVal imageFileName As String)
Dim img As AnnImageObject = New AnnImageObject()
Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName)))
pic.TransparentColor = Colors.Black
pic.TransparentMode = AnnTransparentMode.None
img.Rect = New Rect(100, 200, 400, 600)
img.Picture = pic
container.Children.Add(img)
End Sub
Products |
Support |
Feedback: AnnImageObject Class - Leadtools.Windows.Annotations |
Introduction |
Help Version 19.0.2017.3.22
|
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.