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

AnnStampObject Class

Example 





Members 
Defines an annotation stamp object. .NET support
Object Model
AnnStampObject ClassAnnBrush ClassAnnPicture ClassAnnBrush Class
Syntax
public class AnnStampObject : AnnTextObject, IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText  
'Declaration
 
Public Class AnnStampObject 
   Inherits AnnTextObject
   Implements IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText 
'Usage
 
Dim instance As AnnStampObject
public sealed class AnnStampObject : IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText  
function Leadtools.Windows.Annotations.AnnStampObject()
public ref class AnnStampObject : public AnnTextObject, IAnnFontIAnnHeaderIAnnObjectIAnnPictureIAnnRectangleIAnnText  
Remarks
The stamp annotation object can be a picture or a text string in a rectangular frame. If the stamp object has a picture, it will be scaled to fit the bounding rectangle and drawn. If the stamp does not have a picture, the text will be drawn.

This class implements the IAnnPicture interface and accesses the IAnnPicture.Picture property that handles the picture associated with the annotation object.

For more information, refer to Using Pictures in WPF Annotation Objects

For more information about the stamp annotation object refer to AnnStampObject for WPF. For more information about the automated stamp annotation object, refer to WPF Annotation Objects - Automated Features and WPF Automated Annotations - Stamp Picture Tab.

Example

For XAML example, refer to AnnGroupObject.

Copy CodeCopy Code  
Private Sub AnnStampObject_AnnStampObject(ByVal container As AnnContainer, ByVal imageFileName As String)
   Dim stamp As AnnStampObject = New AnnStampObject()
   Dim pic As AnnPicture = New AnnPicture(New BitmapImage(New Uri(imageFileName)))
   pic.TransparentMode = AnnTransparentMode.None
   pic.TransparentColor = Colors.Black
   stamp.Picture = pic
   stamp.Rect = New Rect(100, 200, 400, 600)
   container.Children.Add(stamp)
End Sub
private void AnnStampObject_AnnStampObject(AnnContainer container, string imageFileName)
{
   AnnStampObject stamp = new AnnStampObject();
   AnnPicture pic = new AnnPicture(new BitmapImage(new Uri(imageFileName)));
   stamp.Rect = new Rect(100, 200, 400, 600);
   pic.TransparentMode = AnnTransparentMode.None;
   pic.TransparentColor = Colors.Black;
   stamp.Picture = pic;
   container.Children.Add(stamp);
}
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

AnnStampObject Members
Leadtools.Windows.Annotations Namespace

 

 


Products | Support | Contact Us | Copyright Notices

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