Hello
when i add normaly an anot to a pdf page and select it with the annotedit-tool from Tools.dll (PDFViewWPF Control) then i have the following picture.
Now i edit the quads of the annot in the background and refresh the appereances. Then i select the same annot with the tool an get the following picture.
Now the quads are look in the right way but not the red rectangle of selection tool. How i can resize the rectangle (the red one!) I try SetRect() of Annot-Class but when i refresh the appereance then i get an exception of PresentationCore.dll. How is the right way to resize the red rectangle?
with greetings
Daniel
var originalQuadPoint = _highlight.GetQuadPointCount();
if (originalQuadPoint <= _quadrangleCollection.Count) // QuadrangleCollection has the new Quads inside { for (int i = 0; i < _quadrangleCollection.Count; i++) { var qPoint = _quadrangleCollection[i];
_highlight.SetQuadPoint(i, new pdftron.PDF.QuadPoint(new pdftron.PDF.Point(qPoint.TopLeft.X, qPoint.TopLeft.Y), new pdftron.PDF.Point(qPoint.TopRight.X, qPoint.TopRight.Y), new pdftron.PDF.Point(qPoint.BottomRight.X, qPoint.BottomRight.Y), new pdftron.PDF.Point(qPoint.BottomLeft.X, qPoint.BottomLeft.Y))); } } else { for (int i = 0; i < originalQuadPoint; i++) { if (i < _quadrangleCollection.Count) { var qPoint = _quadrangleCollection[i];
_highlight.SetQuadPoint(i, new pdftron.PDF.QuadPoint(new pdftron.PDF.Point(qPoint.TopLeft.X, qPoint.TopLeft.Y), new pdftron.PDF.Point(qPoint.TopRight.X, qPoint.TopRight.Y), new pdftron.PDF.Point(qPoint.BottomRight.X, qPoint.BottomRight.Y), new pdftron.PDF.Point(qPoint.BottomLeft.X, qPoint.BottomLeft.Y))); } else { _highlight.SetQuadPoint(i, new pdftron.PDF.QuadPoint()); // here i rewrite the old points with empty point because there is no function to remove the points } }