Realizes the AnnRedactionObject object currently being edited (selected).
public virtual void RealizeRedaction()
Public Overridable Sub RealizeRedaction()
public:
virtual void RealizeRedaction();
Use the CanRealizeRedaction property to determine whether you can currently call this method.
This method will call the Realize(RasterImageViewer) method of the AnnRedactionObject class.
using Leadtools;
using Leadtools.Annotations;
using Leadtools.WinForms;
using Leadtools.Drawing;
public void AnnAutomation_RealizeRedaction(AnnAutomation automation)
{
// first add a new redaction object to the automation
AnnRedactionObject redaction = new AnnRedactionObject();
redaction.Bounds = new AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel);
automation.Container.Objects.Add(redaction);
automation.Viewer.Invalidate(redaction.InvalidRectangle);
// make sure no objects are selected in the automation
automation.SelectNone();
// see if we can realize or restore the object (this should show a message informing you that no objects are currently selected (bring edited)
RealizeRestoreRedaction(automation);
// select (edit) the object we have just added
automation.StartEditing(redaction, false);
// see if we can realize/restore the object (should realize the redaction)
RealizeRestoreRedaction(automation);
// see if we can realize/restore the object (should restore the redaction)
RealizeRestoreRedaction(automation);
}
private void RealizeRestoreRedaction(AnnAutomation automation)
{
// first, check if we can realize or restore the object
if (automation.CanRealizeRedaction)
{
// realize
automation.RealizeRedaction();
MessageBox.Show("Redaction object has been realized");
}
else if (automation.CanRestoreRedaction)
{
// restore this object
automation.RestoreRedaction();
MessageBox.Show("Redaction object has been restored");
}
else
MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)");
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Drawing
Public Sub AnnAutomation_RealizeRedaction(ByVal automation As AnnAutomation)
' first add a new redaction object to the automation
Dim redaction As AnnRedactionObject = New AnnRedactionObject()
redaction.Bounds = New AnnRectangle(100, 100, 100, 100, AnnUnit.Pixel)
automation.Container.Objects.Add(redaction)
automation.Viewer.Invalidate(redaction.InvalidRectangle)
' make sure no objects are selected in the automation
automation.SelectNone()
' see if we can realize or restore the object (this should show a message informing you that no objects are currently selected (bring edited)
RealizeRestoreRedaction(automation)
' select (edit) the object we have just added
automation.StartEditing(redaction, False)
' see if we can realize/restore the object (should realize the redaction)
RealizeRestoreRedaction(automation)
' see if we can realize/restore the object (should restore the redaction)
RealizeRestoreRedaction(automation)
End Sub
Private Sub RealizeRestoreRedaction(ByVal automation As AnnAutomation)
' first, check if we can realize or restore the object
If automation.CanRealizeRedaction Then
' realize
automation.RealizeRedaction()
MessageBox.Show("Redaction object has been realized")
ElseIf automation.CanRestoreRedaction Then
' restore this object
automation.RestoreRedaction()
MessageBox.Show("Redaction object has been restored")
Else
MessageBox.Show("Cannot realize or restore because no redaction object is currently being edited (selected)")
End If
End Sub
Products |
Support |
Feedback: RealizeRedaction Method - 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.