The AnnAudioObject Class is available in LEADTOOLS Document and Medical Imaging toolkits.
Defines an audio annotation object.Visual Basic (Declaration) | |
---|---|
<SerializableAttribute()> Public Class AnnAudioObject Inherits AnnImageObject Implements IAnnPictureObject, ICloneable, IDisposable, ISerializable |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As AnnAudioObject |
C# | |
---|---|
[SerializableAttribute()] public class AnnAudioObject : AnnImageObject, IAnnPictureObject, ICloneable, IDisposable, ISerializable |
C++/CLI | |
---|---|
[SerializableAttribute()] public ref class AnnAudioObject : public AnnImageObject, IAnnPictureObject, ICloneable, IDisposable, ISerializable |
This example creates a new audio object at location 100, 200 and with dimensions of 400 x 600 and then adds it to a container.
Visual Basic | Copy Code |
---|---|
Private Sub AnnAudioObject_AnnAudioObject(ByVal container As AnnContainer, ByVal waveFileName As String) Dim audio As AnnAudioObject = New AnnAudioObject() audio.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel) audio.FileName = waveFileName container.Objects.Add(audio) ' play the audio to test it If (audio.CanPlay) Then audio.Play() End If End Sub |
C# | Copy Code |
---|---|
private void AnnAudioObject_AnnAudioObject(AnnContainer container, string waveFileName) { AnnAudioObject audio = new AnnAudioObject(); audio.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel); audio.FileName = waveFileName; container.Objects.Add(audio); // play the audio to test it if((audio.CanPlay)) audio.Play(); } |
The AnnAudioObject class inherits the the AnnImageObject class and accesses the common AnnImageObject.Picture property mentioned above through this inheritance.
For more information about the audio annotation object refer to AnnAudioObject. For more information about the automated annotation audio object, refer to Annotation Objects - Automated Features and Automated Annotations - Audio Tab.
System.Object
Leadtools.Annotations.AnnDrawable
Leadtools.Annotations.AnnObject
Leadtools.Annotations.AnnRectangleObject
Leadtools.Annotations.AnnImageObject
Leadtools.Annotations.AnnAudioObject
Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7