C#
VB
WinRT C#
Restores the AnnRedactionObject object currently being edited (selected).
public virtual Task RestoreRedaction()
Public Overridable Function RestoreRedaction() As Task
public virtual Task RestoreRedaction()
function Leadtools.Annotations.Automation.AnnAutomation.RestoreRedaction()
Use the CanRestoreRedaction property to determine whether you can currently call this method.
This method will call the Restore method of the AnnRedactionObject object.
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_RestoreRedaction()
{
//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();
//Select the first AnnRedactionObject
_automation.SelectObject(firstRedaction);
//Restore the image data that was previously redacted by firstRedaction
//The image data redacted by secondRedaction will remain redacted
_automation.RestoreRedaction();
}
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