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, June 17, 2007 9:55:55 PM(UTC)

subbu  
subbu

Groups: Registered
Posts: 13


Hi,

Can you please help me in finding out the equivalent Methods in dotnet for the following methods in LeadTools 13.0 version:

1. Lead1.SetSrcRect

2. Lead1 .SetSrcClipRect

3. Lead1.SetDstRect 

4. Lead1.SetDstClipRect

I have used these methods to scale my Images as Fit To Height, Fit To Width, Best Fit, Actual Size. Presently LeadTools dotnet version supports Fit, Fit To Width, Fit Always, Stretch which will not support my purpose. If the above mentioned methods does not exist in dotnet version then please help me out to support my Application purpose.

Sridhar

 

 

 

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, June 18, 2007 5:10:33 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


You never mentioned what version of LEADTOOLS you are using now.  You mentioned .NET libraries, but 14.5 and 15 have some differences.  Luckily for you, the answer is the same for both versions, but in the future it would save time if you mentioned your version along with your interface.

These four properties were used for customizing how the image gets painted.  With the LEAD Main Control these properties have default values and get used automatically, but with the .NET interface, they are only used with manual painting.  Take a look at the RasterImage.Paint function.  There are several overloads, but each version has at least one overload that takes in four rectangles: srcRect, srcClipRect, destRect, and destClipRect.
 
#3 Posted : Friday, July 20, 2007 12:21:33 AM(UTC)

subbu  
subbu

Groups: Registered
Posts: 13


Hi ,

   I have tried to set the Image to Fit To Height uing the methods suggested by you. I could not succeed in doing so . Can u send me a sample program as to how to set the Image to Fit To Height

Regards

Sridhar

 
#4 Posted : Monday, July 23, 2007 10:46:45 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Attached is a simple C#.NET 2005 project that uses the LEADTOOLS v15 libraries and shows how to:

1. Use the RasterImage.Paint method to fit an image to its height
2. Use the RasterImage.Paint method to stretch an image to fit the form
3. Over-ride the OnPaint event of a Windows Form

Obviously, you will probably want to change the destination rectangle to suit your form's layout better, but this is intended to show you the basics so you can incorporate it into your implementation.  Also, you are not limited to painting to just the form, you can paint to any Graphics object you have available.

You might also find this article helpful:

http://msdn.microsoft.com/msdnmag/issues/01/02/winforms/
File Attachment(s):
NET - v15 - RasterImage.Paint.zip (14kb) downloaded 33 time(s).
 
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.079 seconds.