Dynamically Annotation Location Set X, Y

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
dixit.patel1
Posts: 14
Joined: Fri Feb 02, 2024 1:20 pm

Dynamically Annotation Location Set X, Y

Post by dixit.patel1 »

Hi,

I am trying to set location dynamically on X and Y Coordination for Annotation but it is not come on exact location for give word.

Do Not using to MouseClick and MouseMove Event.

I am using below Code Snippet.

Code: Select all

AnnotationDataController objAnnotationDataController = new AnnotationDataController(AnnotationViewer.Images);
AnnotationDataCollection objAnnotationDataCollection = objAnnotationDataController[Pageindex - 1];

HighlightAnnotationData objHighlightAnnotationData = new HighlightAnnotationData();
objHighlightAnnotationData.Size = new Size(Convert.ToInt32(dr["Width"]), Convert.ToInt32(dr["Height"]));
objHighlightAnnotationData.FillBrush = new AnnotationSolidBrush(Color.Yellow);
objHighlightAnnotationData.Location = new Point(Convert.ToInt32(dr["X"]), Convert.ToInt32(dr["Y"]));
objHighlightAnnotationData.BlendingMode = BlendingMode.Multiply;
objHighlightAnnotationData.CanResize = false;
objHighlightAnnotationData.CanMove = false;

objAnnotationDataCollection.Add(objHighlightAnnotationData);
Alex
Site Admin
Posts: 2319
Joined: Thu Jul 10, 2008 2:21 pm

Re: Dynamically Annotation Location Set X, Y

Post by Alex »

Hi,

You need to specify annotation location and annotation size in device independent pixels (DIPs). Please read more info here: https://www.vintasoft.com/docs/vsimagin ... _Data.html

Let me know if you will have any question or problem.

Best regards, Alexander
dixit.patel1
Posts: 14
Joined: Fri Feb 02, 2024 1:20 pm

Re: Dynamically Annotation Location Set X, Y

Post by dixit.patel1 »

It resolve my problem.

Thank you Alex.....
Post Reply