realizeAllRedactions Method

Summary

Realizes all the AnnRedactionObject objects in this AnnAutomation.

Syntax

JavaScript Syntax
AnnAutomation.prototype.realizeAllRedactions = function() 
TypeScript Syntax
realizeAllRedactions(): void; 

Remarks

Use the CanRealizeAllRedactions property to determine whether this method can be called at the current time.

This method will call the Realize method for all AnnRedactionObject objects.

Example

The following example will add a couple of redaction objects and then realize and restore them.

JavaScript Example
example: function SiteLibrary_DefaultPage$example() { 
   var automation = this._automation; 
   // see if we can realize or restore all the redaction objects (this should show a message informing you there are no redaction objects in this automation) 
   this.realizeRestoreAllRedactions(automation); 
 
   // first add a couple of new redaction object to the automation 
   var redaction = new lt.Annotations.Core.AnnRedactionObject(); 
   redaction.set_rect(lt.LeadRectD.create(100, 100, 800, 800)); 
   automation.get_container().get_children().add(redaction); 
 
   redaction = new lt.Annotations.Core.AnnRedactionObject(); 
   redaction.set_rect(lt.LeadRectD.create(1000, 1000, 800, 800)); 
   automation.get_container().get_children().add(redaction); 
 
   automation.invalidate(lt.LeadRectD.get_empty()); 
 
   // see if we can realize/restore the objects (should realize the redactions) 
   this.realizeRestoreAllRedactions(automation); 
 
   // see if we can realize/restore the objects (should restore the redactions) 
   this.realizeRestoreAllRedactions(automation); 
}, 
 
realizeRestoreAllRedactions: function SiteLibrary_DefaultPage$realizeRestoreAllRedactions(automation) { 
   if(automation.get_canRealizeAllRedactions()) 
   { 
      // realize 
      automation.realizeAllRedactions(); 
      alert("Redaction objects have been realized"); 
   } 
   else if(automation.get_canRestoreAllRedactions()) 
   { 
      // restore 
      automation.restoreAllRedactions(); 
      alert("Redaction objects have been restored"); 
   } 
   else 
      alert("Cannot realize or restore because no redaction object is currently in this automation"); 
 
   automation.invalidate(lt.LeadRectD.get_empty()); 
}, 

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