Loading...

How to move an image in the viewer

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

How to move an image in the viewer

Postby louis » Thu Mar 18, 2010 3:57 pm

Hi,

We need to display a picture and, above it, to draw any line, circle, ... But we need to erase a part of these lines, circles without changing the picture, like with an eraser.
So, we use a Cnt viewer with the picture and above it a normal Gd viewer (with the same dimensions) on which we draw the lines, ...

My question is : when zooming or scrolling the Cnt viewer, how to move the lines and circles in order to follow the cnt ? As the simple viewer is like a layer, we don't want to change its left or top property : it must be sized like the cnt viewer. And there is no method or property like "SetImageLeft".

I have seen in the forum a topic about the DrawImage property. But it seems we cannot put a negative value for nDstLeft for example.

Thanks in advance for your support.

Louis
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm

Re: How to move an image in the viewer

Postby louis » Thu Mar 18, 2010 7:58 pm

It seems that we can move the image as we want thanks to the properties SetHScrollBarPosition and SetVScrollBarPosition.
We have just to pay attention to the real size of the viewers (with/without border), the scrollbars, and of course the zoom value.
So, that works correctly now.

Louis
louis
 
Posts: 49
Joined: Tue Apr 28, 2009 6:18 pm

Re: How to move an image in the viewer

Postby Loïc » Fri Mar 19, 2010 9:40 am

Louis you are right !

SetHScrollBarPosition and SetVScrollBarPosition usage seems to be the best way to do that ;)

With best regards,

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


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: Google [Bot] and 1 guest

cron