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

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Sunday, February 6, 2011 2:03:23 PM(UTC)

td1282  
td1282

Groups: Registered
Posts: 8


Is there a sample that shows how to implement rubber band selection using VS2005 C#?
 

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 : Sunday, February 6, 2011 11:02:38 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

If you mean that you want to give the user the ability to select regions, you can do this by setting the rasterImageViewer1.InteractiveMode to Leadtools.WinForms.RasterViewerInteractiveMode.Region.

If you mean something else, please provide me with more details about your requirements.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#3 Posted : Tuesday, February 8, 2011 10:21:25 AM(UTC)

td1282  
td1282

Groups: Registered
Posts: 8


I was looking for sample code since I am new to c# & leadtools. I want to be able to create a pan window, similar to what is done in C++, select an area to pan and display that same area on both images.
 
#4 Posted : Tuesday, February 8, 2011 10:13:24 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

If you need a sample code that shows how you can create a pan window and pan the image using the mouse, please check the LEADTOOLS C# Main demo that ships with the SDK. You can find the source code of the demo here:
[LEADTOOLS 17]\Examples\DotNet\CS\MainDemo

You can find the code under the _menuItemViewInteractive_Click event.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#5 Posted : Wednesday, February 9, 2011 11:01:49 AM(UTC)

td1282  
td1282

Groups: Registered
Posts: 8


Thanks. Found that and I got it working. Now what I would like to be able to do is select/create a region of an image and zoom in on that region only, i.e show that region in the viewer. Is this possible & how? The sample that I saw only shows how to create the region.
 
#6 Posted : Thursday, February 10, 2011 2:12:34 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

You can do this by setting the rasterImageViewer1.InteractiveMode to Leadtools.WinForms.RasterViewerInteractiveMode.ZoomTo.

Also, you can do this by selecting a region on the image, and then pass the region rectangle to the RasterImageViewer.ZoomToRectangle() method.

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
#7 Posted : Friday, February 11, 2011 9:57:32 AM(UTC)

td1282  
td1282

Groups: Registered
Posts: 8


I was trying to use 'Region' mode with the ZoomToRectangleMethod(). I assume I was sending in the wrong values for my rectangle region because it wasn't working as expected. Setting the mode to 'ZoomTo' works. Thanks so much for all your help!
 
#8 Posted : Saturday, February 12, 2011 11:41:02 PM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,326

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

You can draw a region and then zoom to the region rectangle by using the following code:
+------------+
LeadRect Rect = rasterImageViewer1.Image.GetRegionBounds(null);
Rectangle Rect2 = new Rectangle(Rect.Left,Rect.Top,Rect.Width,Rect.Height);
rasterImageViewer1.ZoomToRectangle(Rect2);
+------------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
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-2024, Yet Another Forum.NET
This page was generated in 0.101 seconds.