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 : Thursday, December 15, 2011 8:02:50 AM(UTC)
tbecker82

Groups: Registered
Posts: 37


I am having an issue where I am changing the DPI of my image but the measurements from the ruler are not updating.
I am using Leadtools 17.5 with C++ class libraries in MFC.

The following is the code I am using to change the DPI for my image.  I am using this to calibrate the ruler.
m_LAnnoWnd is a class that inherits from LAnnotationWindow.


       m_LAnnoWnd.GetAutomationObject().SetBitmapDpiX(dpi);
       m_LAnnoWnd.GetAutomationObject().SetBitmapDpiY(dpi);
       m_LAnnoWnd.GetAutomationObject().SetDpiX(dpi);
       m_LAnnoWnd.GetAutomationObject().SetDpiY(dpi);
      m_LAnnoWnd.SetXResolution(dpi);
       m_LAnnoWnd.SetYResolution(dpi);

I call invalidate on my Cwnd after these functions are used.
Is there something else I need to change or another function I should use?

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 : Friday, December 16, 2011 2:28:49 PM(UTC)

Danny H  
Guest

Groups: Guests
Posts: 3,022

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

The rule is not actually designed to have this behavior in C++ Class Libraries. However, you can easily update the measurement using CalibrateRuler.

http://www.leadtools.com/help/leadtools/v175/main/clib/lannotat/lannotation__calibrateruler.htm

The above documentation has an example of what you will need to do. Of course you will need to calculate the new size yourself.

Thanks,
 
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.060 seconds.