Gets the physical bounding rectangle of this AnnObject.
public virtual Rectangle InvalidRectangle {get;} Public Overridable ReadOnly Property InvalidRectangle As Rectangle
public:virtual property Rectangle InvalidRectangle {Rectangle get();}
The physical bounding rectangle of this AnnObject.
This method returns the physical bounding rectangle of this AnnObject. This bounding rectangle consists of the union of the following rectangles:
This rectangle can be used to calculate the invalid region needed to re-paint this object inside its container. The annotation automation toolkit uses this value to speed up re-painting the owner control when an object changes position or appearance.
This example will change an object's name and then re-paint it inside its container.
using Leadtools;using Leadtools.Annotations;using Leadtools.Codecs;using Leadtools.WinForms;using Leadtools.Drawing;private void AnnObject_InvalidRectangle(AnnObject obj, string name, RasterImageViewer viewer){// first save the old invalid rectangleRectangle rcOld = obj.InvalidRectangle;// set the nameobj.Name = name;obj.NameVisible = true;obj.NameFont = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Bold | FontStyle.Italic);// get the new invalid rectangleRectangle rcNew = obj.InvalidRectangle;// re-paint this object by invalidating the union of both rectanglesviewer.Invalidate(Rectangle.Union(rcOld, rcNew));}
Imports LeadtoolsImports Leadtools.AnnotationsImports Leadtools.CodecsImports Leadtools.WinFormsImports Leadtools.DrawingPrivate Sub AnnObject_InvalidRectangle(ByVal obj As AnnObject, ByVal name As String, ByVal viewer As RasterImageViewer)' first save the old invalid rectangleDim rcOld As Rectangle = obj.InvalidRectangle' set the nameobj.Name = nameobj.NameVisible = Trueobj.NameFont = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Bold Or FontStyle.Italic)' get the new invalid rectangleDim rcNew As Rectangle = obj.InvalidRectangle' re-paint this object by invalidating the union of both rectanglesviewer.Invalidate(Rectangle.Union(rcOld, rcNew))End Sub


|   | 
                            Products |
                            Support |
                            Feedback: InvalidRectangle Property (AnnObject) - 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.