Defines an annotation image object.
Object Model
Syntax
Example
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.
Visual Basic | Copy 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(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 |
C# | Copy Code |
---|
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); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family
See Also