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 : Wednesday, July 1, 2015 12:38:06 AM(UTC)

atsfdk  
atsfdk

Groups: Registered
Posts: 1


Hi,

I'm currently trying to use the RasterImagePainter.Paint() method to draw an image to my System.Drawing.Graphics object.
However, I have the requirement for sub-pixel positioning of the image. This is because there are cases where I perform a scale (enlarge) transform on the graphics object.

Since the RasterImagePainter.Paint() method only accepts a LeadRect which in turn consists of integers, I can only position on 'whole' pixels.

What I need is something like the System.Drawing.Graphics.DrawImage() overload, which accepts floats for the image target position and size.

Is there any way to accomplisch this with LEADTOOLS directly? I prefer to not first having to convert my RasterImage to a GDI+ image and then use Graphics.Draw(), which is my current workaround.

Please let me know if the question is not clear or if you need more information.

Thanks!
 

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 : Thursday, July 2, 2015 12:18:38 AM(UTC)

mohamed  
mohamed

Groups: Registered, Tech Support
Posts: 179


Like you noticed, the coordinates accepted by our RasterImagePainter.Paint() method overloads are all integers. Although we have another rectangle type for double values (LeadRectD), it is not used in any of the Paint methods.

One thing you could do is use the ChangeToImage() method for converting the Leadtools.RasterImage to a GDI+ System.Drawing.Image. If your bitmap is compatible, this method does not copy the data, which causes little overhead when you use it.

Edited by moderator Friday, March 17, 2017 6:26:38 PM(UTC)  | Reason: Not specified

Mohamed Abedallah
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
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-2019, Yet Another Forum.NET
This page was generated in 0.085 seconds.