Gets or sets the default picture used by all AnnVideoObject objects.
public static Leadtools.Annotations.AnnPicture DefaultPicture {get; set;} Public Shared Property DefaultPicture As Leadtools.Annotations.AnnPicture
public:static property Leadtools.Annotations.AnnPicture^ DefaultPicture {Leadtools.Annotations.AnnPicture^ get();void set ( Leadtools.Annotations.AnnPicture^ );}
An AnnPicture class that defines the picture used by the AnnVideoObject.
Set the UseOriginalPicture property to true to revert back to the original picture.
using Leadtools;using Leadtools.Annotations;using Leadtools.Codecs;using Leadtools.WinForms;public void AnnVideoObject_DefaultPicture(AnnContainer container, RasterImageViewer viewer, string newVideoPicture){// first add a new AnnVideoObject with the original pictureAnnVideoObject obj = new AnnVideoObject();obj.Bounds = new AnnRectangle(100, 100, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("A video object with the original picture");// now change the picture to one of our ownImage img = Image.FromFile(newVideoPicture);AnnPicture picture = new AnnPicture(img);AnnVideoObject.DefaultPicture = picture;// at this point, all new AnnVideoObject objects will use this new picture// add another video objectobj = new AnnVideoObject();obj.Bounds = new AnnRectangle(100, 210, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("A video object with the new picture");// set the picture back to the original valueAnnVideoObject.UseOriginalPicture = true;// add another video objectobj = new AnnVideoObject();obj.Bounds = new AnnRectangle(100, 320, 100, 100);container.Objects.Add(obj);viewer.Invalidate();MessageBox.Show("A video object with the original picture");}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsPublic Sub AnnVideoObject_DefaultPicture(ByVal container As AnnContainer, ByVal viewer As RasterImageViewer, ByVal newVideoPicture As String)' first add a new AnnVideoObject with the original pictureDim obj As New AnnVideoObject()obj.Bounds = New AnnRectangle(100, 100, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("A video object with the original picture")' now change the picture to one of our ownDim img As Image = Image.FromFile(newVideoPicture)Dim picture As New AnnPicture(img)AnnVideoObject.DefaultPicture = picture' at this point, all new AnnVideoObject objects will use this new picture' add another video objectobj = New AnnVideoObject()obj.Bounds = New AnnRectangle(100, 210, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("A video object with the new picture")' set the picture back to the original valueAnnVideoObject.UseOriginalPicture = True' add another video objectobj = New AnnVideoObject()obj.Bounds = New AnnRectangle(100, 320, 100, 100)container.Objects.Add(obj)viewer.Invalidate()MessageBox.Show("A video object with the original picture")End Sub
|
Products |
Support |
Feedback: DefaultPicture Property (AnnVideoObject) - Leadtools.Annotations |
Introduction |
Help Version 19.0.2017.6.20
|

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.