←Select platform

RestoreAllRedactions Method

Summary

Restores all of the AnnRedactionObject objects in this AnnAutomation.

Syntax

C#
VB
WinRT C#
public virtual Task RestoreAllRedactions() 
Public Overridable Function RestoreAllRedactions() As Task 
public virtual Task RestoreAllRedactions() 
 function Leadtools.Annotations.Automation.AnnAutomation.RestoreAllRedactions() 

Remarks

Use the CanRestoreAllRedactions property to determine whether you can currently call this method.

This method will call the Realize method of the AnnRedactionObject class for all AnnRedactionObject objects that have the AnnRedactionObject.CanRestore value set to true.

Example

C#
using Leadtools.Annotations.Automation; 
using LeadtoolsExamples.Common; 
using Leadtools.Annotations.Core; 
using Leadtools.Codecs; 
using Leadtools.Controls; 
using Leadtools.Annotations.Rendering; 
using Leadtools.Annotations.WinForms; 
 
public void AnnAutomation_RestoreAllRedactions() 
{ 
   //Add two AnnRedactionObjects to our AnnContainer 
   AnnRedactionObject firstRedaction = new AnnRedactionObject(); 
 
   firstRedaction.Rect = LeadRectD.Create(100, 100, 200, 200); 
   firstRedaction.Fill = AnnSolidColorBrush.Create("black"); 
 
   AnnRedactionObject secondRedaction = new AnnRedactionObject(); 
 
   secondRedaction.Rect = LeadRectD.Create(300, 300, 200, 200); 
   secondRedaction.Fill = AnnSolidColorBrush.Create("black"); 
 
   _automation.Container.Children.Add(firstRedaction); 
   _automation.Container.Children.Add(secondRedaction); 
 
   //Invalidate the AnnAutomation 
   _automation.Invalidate(LeadRectD.Empty); 
 
   //Realize all AnnRedactionObjects 
   //Both firstRedaction and secondRedaction are burned to the image 
   _automation.RealizeAllRedactions(); 
 
   //Restore the image data previously redacted by 
   //firstRedaction and secondRedaction 
   _automation.RestoreAllRedactions(); 
} 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Annotations.Automation Assembly