Welcome Guest! To enable all features, please Login or Register.



Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 7, 2006 9:10:35 AM(UTC)


Groups: Registered
Posts: 5

Hey All,

Hope this is the place for this post, and that it's not a 'retarded question'. ;-)

I'm using the LeadTools 14.0 RasterImaging SDK and am trying to accomplish the following zoom functionality.

I want a user to be able to select or type in a numeric value (percentage) and have the image be displayed using that value, but as it applies to the entire image and not just the client viewable area.

The ZoomToRect() method is not applicable since it uses the Main Control's client area.

The ZoomIn() method doesn't appear to be the right choice since it relies on a magnifying selection.


An image that is let's say 20 x 15 (H x W), and the user selects the zoom to be at 50%.

What should be displayed is the image at 10 x 7.5, (so based on the actual image size) and not 50% of whatever is currently viewable within the control.

I hope this makes sense and that I'm not missing something completely obvious.

Thanks in advance!

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Monday, July 10, 2006 11:24:03 AM(UTC)


Groups: Registered, Tech Support, Administrators
Posts: 764


If I am understanding your question, you want to be able to control the percentage of zoom of the image's original size.  If 25% is entered, you want the image to be a quarter the size of its 100% zoom.  If 200% is entered, you will want it to be twice the size of its 100% zoom?

Based on this, you need to use the PaintZoomFactor property of your RasterViewer.  First, you must set the PaintSizeMode to PAINTSIZEMODE_ZOOM.  The PaintZoomFactor property takes percent values.  When the PaintZoomFactor = 100, your image will be zoomed at its original size.  If it is 50, then it is at 50% of its size, 200 = 200% etc.  The following code sample is for VB 6.0 with COM and zooms in at the value entered into a text box.  If you are using something else, please consult the help file, there should be examples very similar to this for most languages we support.

LEADRasterView1.PaintZoomFactor = Text1.Text
#3 Posted : Friday, August 31, 2007 6:27:15 AM(UTC)


Groups: Registered
Posts: 22

I need to implement the exact same functionality but I'm using LEAD 15 and it appears that the PaintSizeMode and PaintZoomFactor members are no longer available.

Could you tell me the new method of implementing the same functionality?

#4 Posted : Friday, August 31, 2007 12:45:57 PM(UTC)


Groups: Guests
Posts: 3,022

Was thanked: 2 time(s) in 2 post(s)

PaintZoomFactor is now represented by RasterImageViewer.ScaleFactor and PaintSizeMode is now represented by RasterImageViewer.SizeMode. However, the PAINTSIZEMODE_ZOOM is no longer present, so you would want to use RasterImageViewer.SizeMode = RasterPaintSizeMode.Normal.

Also note that the COM and OCX interfaces that the original poster were using are no longer present in v15.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2023, Yet Another Forum.NET
This page was generated in 0.072 seconds.