Loading...

Problem setting zoom area

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

Problem setting zoom area

Postby paulclarke » Wed Feb 17, 2010 12:21 pm

Hi,
I'd like to be able to accurately set a zoom rectangle before any image is displayed.
I currently have to wait for the Display message to set a zoomarea. If I don't wait, or set the zoom area before making the control visible then the resulting zoom is not predictable.

Is there a way of accurately setting the zoomarea before the image is visible? Otherwise I see the whole image flash up in my application for an instant before it zooms in correctly,

Kind Regards, Paul.
paulclarke
 
Posts: 4
Joined: Wed Feb 17, 2010 11:44 am

Re: Problem setting zoom area

Postby Loïc » Wed Feb 17, 2010 12:23 pm

Hi Paul,

I don't understand your issue. Could you try to give me more explanations ?

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Problem setting zoom area

Postby paulclarke » Wed Feb 17, 2010 1:07 pm

Hi Loic,

1. I store the visible part of image after zooming, scrolling etc using GetDisplayedArea. This is fine - results are accurate
2. Close the GDViewer

3. Create new GDViewer
4. gdviewer.visible := false
5. DisplayFromFile(<filename>)
6. ZoomArea(<results from 1.>
7. gdviewer.visible := true

The displayed area is not the same as in 1. It is a larger area.

BUT, if I change the order and make the viewer visible before DisplayFromFile (leaving everything else the same)

3. Create new GDViewer
4. gdviewer.visible := true
5. DisplayFromFile(<filename>)
6. ZoomArea(<results from 1.>

The displayed area is correct: exactly as in 1.

Hope this is clearer,
Thanks, Paul.
paulclarke
 
Posts: 4
Joined: Wed Feb 17, 2010 11:44 am

Re: Problem setting zoom area

Postby Loïc » Thu Feb 18, 2010 12:09 pm

Hi Paul,

Please, try to replace visible property management by LockControl property.

IE:

3. Create new GDViewer
4. gdviewer.LockControl = True
5. DisplayFromFile(<filename>)
6. ZoomArea(<results from 1.>
7. gdviewer.LockControl:= False
8. gdviewer.Redraw

Maybe this solution can be OK.

Kind regards,

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4441
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Re: Problem setting zoom area

Postby paulclarke » Thu Feb 18, 2010 12:58 pm

Loic,

That works perfectly...thanks!
paulclarke
 
Posts: 4
Joined: Wed Feb 17, 2010 11:44 am


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest