LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly)
LEAD Technologies, Inc

AnnImageObject Class

Example 





Members 
Defines an annotation image object. .NET support Silverlight support
Object Model
AnnImageObject ClassAnnBrush ClassAnnPicture ClassAnnBrush Class
Syntax
public class AnnImageObject : AnnRectangleObject, IAnnHeaderIAnnImageIAnnObjectIAnnPictureIAnnRectangle  
'Declaration
 
Public Class AnnImageObject 
   Inherits AnnRectangleObject
   Implements IAnnHeaderIAnnImageIAnnObjectIAnnPictureIAnnRectangle 
'Usage
 
Dim instance As AnnImageObject
public sealed class AnnImageObject : IAnnHeaderIAnnImageIAnnObjectIAnnPictureIAnnRectangle  
function Leadtools.Windows.Annotations.AnnImageObject()
public ref class AnnImageObject : public AnnRectangleObject, IAnnHeaderIAnnImageIAnnObjectIAnnPictureIAnnRectangle  
Remarks
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

Example

For XAML example, refer to AnnHotspotObject.

Copy CodeCopy 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(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
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);
}
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);
}
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
Requirements

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

See Also

Reference

AnnImageObject Members
Leadtools.Windows.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.