This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Thursday, December 15, 2011 8:02:50 AM(UTC)
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
#2
Posted
:
Friday, December 16, 2011 2:28:49 PM(UTC)
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.