how can i get the object of selected annotations on the view.

Now, I'm testing PDFNet SDK and I have a couple of question to ask
your engineer.

1. When i draw an annotation (for example ellipse or rectangle) and
then try to obtain the annotation object in order to modify it in the
code.
I don't how to obtain the annotation object in the code, when i
selected the annotation on the view.

2. When I draw an annotation (for example ellipse or rectangle) and
change its size, the appearance is suddenly disappeared.

For example, if I draw an ellipse filled with red color and yellow
border then try to change its size,

red color is disappeared . so does yellow border. Please see the
attached picture.

Is there any way to solve this problem?

Now, I'm using the following codes;

pdfDoc.Lock();
Matrix screen2page = GetDeviceTransform(_cur_page);
screen2page.Invert();
PointF[] pt_arr = { _start_pt, _end_pt };
screen2page.TransformPoints(pt_arr);
Rect pos = new Rect(pt_arr[0].Y, pt_arr[0].X, pt_arr[1].Y,
pt_arr[1].X);
pos.Normalize();

pdftron.PDF.Annots.Circle circle =
pdftron.PDF.Annots.Circle.Create(pdfDoc, pos);//new
pdftron.PDF.Annots.Circle();
circle.SetBorderStyle(new
Annot.BorderStyle(Annot.BorderStyle.Style.e_solid, 1));
circle.SetColor(new ColorPt(Color.Red.R / 255.0, Color.Red.G / 255.0,
Color.Red.B / 255.0)); // 보더 컬러

ElementBuilder b = new ElementBuilder();
ElementWriter w = new ElementWriter();

w.Begin(pdfDoc);

double rx = pos.Width() / 2, ry = pos.Height() / 2;

Element element = b.CreateEllipse(pos.x1 + rx, pos.y1 + ry, rx, ry);
element.SetPathFill(true);
element.SetPathStroke(true);

GState gs = element.GetGState();
gs.SetStrokeColorSpace(ColorSpace.CreateDeviceRGB());
gs.SetStrokeColor(new ColorPt(Color.Blue.R / 255.0, Color.Blue.G /
255.0, Color.Blue.B / 255.0));
gs.SetLineWidth(1); // Stroke thickness
gs.SetFillColorSpace(ColorSpace.CreateDeviceRGB());

gs.SetFillColor(new ColorPt(Color.Red.R / 255.0, Color.Red.G / 255.0,
Color.Red.B / 255.0));
w.WriteElement(element);
pdftron.SDF.Obj oc = w.End();
w.Dispose();
b.Dispose();

oc.PutRect("BBox", pos.x1, pos.y1, pos.x2, pos.y2);

circle.SetAppearance(oc);
circle.SetActiveAppearanceState("On");

curPage.AnnotPushBack(circle);

pdfDoc.Unlock();
Update();

=====================================================================================

Currently there is no direct way to access selected annotations in
e_annot_edit mode. Why would you need this type of functionality? A
user can modify annotation properties by right-clicking on the
annotation and selecting properties.

In case you have very specific requirements you can implement your own
annotation selection tool. In this case you may want to take a look at
C# PDFView sample project (for example
CustomToolMode.e_custom_link_action in OnMouseDown, MyPDFView.cs).
Instead of creating a new annotation you would use its bounding box to
draw selection or to perform some type of action on the annotation
etc.

When I draw an annotation (for example ellipse or rectangle
) and change its size, the appearance is suddenly disappeared.

When you resize an annotation (such as circle) PDFNet needs to refresh
the appearance (otherwise the annotation may appear disordered).
Because you are creating a custom appearance, a PDF editor doesn't
know how to recreate the same appearance. The situation would be the
same if you were using Acrobat Pro or any other PDF editor. In case
you would like to have consistent appearance you need to use
annot.RefreshAppearance() instead of custom appearance. For example:

Circle circle = pdftron.PDF.Annots.Circle.Create(pdfDoc, pos);//new
pdftron.PDF.Annots.Circle();
circle.SetBorderStyle(new
Annot.BorderStyle(Annot.BorderStyle.Style.e_solid, 1));
circle.SetColor(new ColorPt(Color.Red.R / 255.0, Color.Red.G / 255.0,
Color.Red.B / 255.0));
circle.RefreshAppearance();
curPage.AnnotPushBack(circle);

Custom annotation appearances are suitable only if you are creating a
document/annotation that will not be subsequently edited.