Leadtools.Windows.Annotations Namespace : AnnRedactionObject Class |
public class AnnRedactionObject : AnnRectangleObject, IAnnHeader, IAnnObject, IAnnRectangle
'Declaration Public Class AnnRedactionObject Inherits AnnRectangleObject Implements IAnnHeader, IAnnObject, IAnnRectangle
'Usage Dim instance As AnnRedactionObject
public sealed class AnnRedactionObject : IAnnHeader, IAnnObject, IAnnRectangle
function Leadtools.Windows.Annotations.AnnRedactionObject()
public ref class AnnRedactionObject : public AnnRectangleObject, IAnnHeader, IAnnObject, IAnnRectangle
The redaction annotation object is a rectangle with default properties that are appropriate for blacking out an area. The Realize method lets you block the area on the image with the current object brush value. The Restore method lets you restore the area back. For more information about the redaction annotation object refer to AnnRedactionObject for WPF. For more information about the automated redaction annotation object, refer to WPF Annotation Objects - Automated Features.
If you are interested in locking an object, refer to Implementing WPF Annotation Security.
Private Sub AnnRedactionObject_AnnRedactionObject(ByVal viewer As ImageViewer, ByVal container As AnnContainer) Dim redaction As AnnRedactionObject = New AnnRedactionObject() redaction.Rect = New Rect(100, 100, 300, 300) container.Children.Add(redaction) MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' realize the redaction object redaction.Realize(viewer) MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' remove the redaction object from the container container.Children.Remove(redaction) MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)) ' add the redaction object back container.Children.Add(redaction) MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' restore the redaction object redaction.Restore(viewer) MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' remove the redaction again from the container container.Children.Remove(redaction) MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)) End Sub
private void AnnRedactionObject_AnnRedactionObject(ImageViewer viewer, AnnContainer container) { AnnRedactionObject redaction = new AnnRedactionObject(); redaction.Rect = new Rect(100, 100, 300, 300); container.Children.Add(redaction); MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // realize the redaction object redaction.Realize(viewer); MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // remove the redaction object from the container container.Children.Remove(redaction); MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)); // add the redaction object back container.Children.Add(redaction); MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // restore the redaction object redaction.Restore(viewer); MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // remove the redaction again from the container container.Children.Remove(redaction); MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)); }
private void AnnRedactionObject_AnnRedactionObject(ImageViewer viewer, AnnContainer container) { AnnRedactionObject redaction = new AnnRedactionObject(); redaction.Rect = new Rect(100, 100, 300, 300); container.Children.Add(redaction); MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // realize the redaction object redaction.Realize(viewer); MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // remove the redaction object from the container container.Children.Remove(redaction); MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)); // add the redaction object back container.Children.Add(redaction); MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // restore the redaction object redaction.Restore(viewer); MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)); // remove the redaction again from the container container.Children.Remove(redaction); MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)); }
Private Sub AnnRedactionObject_AnnRedactionObject(ByVal viewer As ImageViewer, ByVal container As AnnContainer) Dim redaction As AnnRedactionObject = New AnnRedactionObject() redaction.Rect = New Rect(100, 100, 300, 300) container.Children.Add(redaction) MessageBox.Show(String.Format("Added. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' realize the redaction object redaction.Realize(viewer) MessageBox.Show(String.Format("Realized. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' remove the redaction object from the container container.Children.Remove(redaction) MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)) ' add the redaction object back container.Children.Add(redaction) MessageBox.Show(String.Format("Added back. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' restore the redaction object redaction.Restore(viewer) MessageBox.Show(String.Format("Restored. IsRealized: {0}, Objects in container: {1}", redaction.IsRealized, container.Children.Count)) ' remove the redaction again from the container container.Children.Remove(redaction) MessageBox.Show(String.Format("Removed. Objects in container: {0}", container.Children.Count)) End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2