WPF GdViewer

Discussions about annotation support.
Post Reply
dan276
Posts: 20
Joined: Fri Mar 15, 2013 1:07 am

WPF GdViewer

Post by dan276 » Fri Mar 15, 2013 1:11 am

I saw the sample in the downloads and i'm wondering there are editing controls or a toolbar?
I saw this is very new, so probably this is a work in progress?

Cedric
Posts: 269
Joined: Sun Sep 02, 2012 7:30 pm

Re: WPF GdViewer

Post by Cedric » Wed Mar 20, 2013 6:44 pm

We did not release any WPF related component yet, so not only it is work in progress but you can not have anything tested yet ;)

genwex
Posts: 1
Joined: Thu Jan 22, 2015 9:09 pm

Re: WPF GdViewer

Post by genwex » Thu Jan 22, 2015 9:13 pm

after upgdaring to v11 and switching to use GdViewer in WPF namespace directly (not using WindowsHostForm), I am now no longer can draw the regions on the image, this code does not produce a region added to the image?

what do I need to change here to make this work?

private void Mouse_UP_Draw_Region(object eventSender, MouseButtonEventArgs mouseButtonEventArgs)
{
// Initialize variables to hold the position of the rectangle of selection on the document
double leftArea = 0;
double topArea = 0;
double widthArea = 0;
double heightArea = 0;

// Check if A rectangle of selection has been painted on the GdViewer
if (this.gdViewer.IsRect())
{
// Getting the location of the selection on the document
this.gdViewer.GetRectCoordinatesOnDocumentPixel(ref leftArea, ref topArea, ref widthArea, ref heightArea);

// Setting the ROI on the document
// Adding a Region in Place of the Rectangle of Selection
int regionId = this.gdViewer.AddRegion("Region", leftArea, topArea, widthArea, heightArea, System.Windows.Media.Color.FromRgb(255, 255, 0), GdViewer.RegionFillMode.Multiply);

// Sets the color of a region
this.gdViewer.SetRegionColorSelection(regionId, System.Windows.Media.Color.FromRgb(255, 255, 0));

// Setting Region Border Width
this.gdViewer.SetRegionBorderWidth(regionId, 2);

// Setting Region Border Color
this.gdViewer.SetRegionBorderColor(regionId, System.Windows.Media.Color.FromRgb(0, 25, 255));

// Redraw the whole Image
////this.gdViewer.ClearRect();
this.gdViewer.Redraw();
}
}

MrH
Posts: 14
Joined: Mon Feb 16, 2015 11:15 am

Re: WPF GdViewer

Post by MrH » Tue Mar 17, 2015 9:13 am

Good Morning,

I'm struggle a bit with the new GdViewer for WPF aswell, at the point where I try to add HighlighterAnnot interarctivly.

If I use the Method AddRectangleHighlighterAnnotInteractive in C++ MFC to add a rectangle highlihter the underlying annotations shine through but in WPF this doesn't work.

Is this something you changed for some reason or am I doing something wrong , do I have to set something up before this works ?

Kind regards
MrH

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: WPF GdViewer

Post by Loïc » Tue Mar 17, 2015 7:01 pm

Hello,

Everything is working like a charm on our Demo applications. Have you tried them? (see Annotations demo available in vb.net and c#).

If the problem persists check first you are using our latest release. If you are still not able to get it resolved please open a support request from https://www.gdpicture.com/support/getting-support-from-our-team

With best regards,

Loïc

MrH
Posts: 14
Joined: Mon Feb 16, 2015 11:15 am

Re: WPF GdViewer

Post by MrH » Wed Mar 18, 2015 1:22 pm

Hello,

yeah I tried your samples an there is the same issue.

I give you an other example:

If I draw a filled rect on a PDF or Tiff or whatever and then use the magnifier I can see through the filled rect and the same thing is possible wie highlighter annotations, of course the Zorder from the highlighter annotation have to be the highest. And the behavior didn't happen in your windowsforms Control.

The problem at this point is , there are users who can draw annotations and can edit them but some users just can see the result but they are allowed to use the magnifier and with this the user can see things he or she maybe shouldn't see. In your version 9 the magnifier cannot do that , I tried to set the Z-Order of the filled rect to the max value but didn't worked for me, the magnifier is always ontop of it.

A other scenario is , one user draw a filled rect on a tiff,pdf,whatever.. and a other user is allowed to draw his or her own annotations on the document but he or she is not allowed to edit the annotation from the first user or see the part who is shield by the filled rect but with the highlighter rect this is possible.

This behaviors happen in your demo project as well as in my own project.

[offtopic]
Of course I could contact your support but a colleague is still waiting to get an answer from your support, at least he got an email where he is ask
how satisfied he is with the processing time of tickets.
[/offtopic]

Kind regards
MrH

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: WPF GdViewer

Post by Loïc » Fri Mar 20, 2015 2:20 pm

Hello,

I don't really understand what the problem is.
Please try to open a support ticket by attaching a standalone application reproducing it through: https://www.gdpicture.com/support/getting-support-from-our-team

With best regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest