Dear Sirs.
Could you help me?
I use MM_ANISOTROPIC hDC Map Mode for drawing in my application;
I'll try to use PXCV_DrawPageToDC in that mode... but unsuccessfully.
Can I use PXCV_DrawPageToDC in MM_ANISOTROPIC mode or only MM_TEXT mode?
Vitaly.
PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 4
- Joined: Tue Oct 19, 2010 8:28 am
-
- Site Admin
- Posts: 798
- Joined: Tue Apr 14, 2009 11:33 pm
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Hi Vitaly,
I think you have posted in the wrong product topic, are you using the ActiveX Viewer SDK?
I think you have posted in the wrong product topic, are you using the ActiveX Viewer SDK?
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
Chris Attrell
Tracker Sales & Support North America
http://www.tracker-software.com
-
- User
- Posts: 4
- Joined: Tue Oct 19, 2010 8:28 am
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Hi!
I use C++ PDF Viewer SDK.( PDF-XChange Viewer Pro SDK 2.056 SDK Base Pack )
So still have a problem with MM_ANISOTROPIC MapMode - I have black square instead PDFPage bitmap. Even if I use correct LPtoDP, DPtoLP... etc transformation.
When I use MM_TEXT mode all is OK and PDFPage draw to offscreen DC.
Vitaly
I use C++ PDF Viewer SDK.( PDF-XChange Viewer Pro SDK 2.056 SDK Base Pack )
So still have a problem with MM_ANISOTROPIC MapMode - I have black square instead PDFPage bitmap. Even if I use correct LPtoDP, DPtoLP... etc transformation.
When I use MM_TEXT mode all is OK and PDFPage draw to offscreen DC.
Vitaly
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Hello Vitaly,
Can you please try with the latest SDK build (2.5.189) and see if the problem still exists?
Best,
Stefan
Can you please try with the latest SDK build (2.5.189) and see if the problem still exists?
Best,
Stefan
-
- User
- Posts: 4
- Joined: Tue Oct 19, 2010 8:28 am
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
I've just try that SDK build - unlike problem still exist.Tracker Supp-Stefan wrote: Can you please try with the latest SDK build (2.5.189) and see if the problem still exists?
Vitaly.
Last edited by Vitaly111 on Wed Dec 15, 2010 9:27 pm, edited 1 time in total.
-
- User
- Posts: 4
- Joined: Tue Oct 19, 2010 8:28 am
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Hi,Stefan.
I've just try to add some lines of code:
rcWindow= {top=550 bottom=-550 left=-425 right=425};
client = {top=550 bottom=-265 left=-425 right=408};
I had black square as result.
I've uncommented //pDC->Rectangle(client);
I have rectangle at right place;
Vitaly.
I've just try to add some lines of code:
Code: Select all
...
//the calculation of the size Page in custom hDC dimension
double fcx=0;
double fcy=0;
if (curDoc)
{
if (IS_DS_SUCCESS(PXCV_GetPageDimensions(curDoc,nPageNum,&fcx,&fcy)))
{
m_PageSize.cx=MulDiv(int(fcx),100,72);
m_PageSize.cy=MulDiv(int(fcy),100,72);
}
}
...
...
// mapping mode is MM_ANISOTROPIC
// these extents setup a mode similar to MM_LOENGLISH
// MM_LOENGLISH is in .01 physical inches
// these extents provide .01 logical inches
pDC->SetMapMode(MM_ANISOTROPIC);
pDC->SetViewportExt(pDC->GetDeviceCaps(LOGPIXELSX), pDC->GetDeviceCaps(LOGPIXELSY));
pDC->SetWindowExt(100, -100);
// set the origin of the coordinate system to the center of the page
CPoint ptOrg;
ptOrg.x = GetDocument()->m_PageSize.cx/2;
ptOrg.y = GetDocument()->m_PageSize.cy/2;
// ptOrg is in logical coordinates
pDC->OffsetWindowOrg(-ptOrg.x,ptOrg.y);
...
PXV_CommonRenderParameters dp;
dp.WholePageRect = (LPRECT)rcWindow;
dp.DrawRect =(LPRECT)client;
dp.Flags = 0;
dp.RenderTarget = pxvrm_Viewing;
hr=PXCV_DrawPageToDC(curDoc, 0, pDC->GetSafeHdc(), &dp);
//pDC->Rectangle(client);
client = {top=550 bottom=-265 left=-425 right=408};
I had black square as result.
I've uncommented //pDC->Rectangle(client);
I have rectangle at right place;
Vitaly.
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: PXCV_DrawPageToDC and MM_ANISOTROPIC hDC MapMode
Hi Vitally,
I understand this problem is now resolved after direct contact and a fix for all users will be available in the next release.
Thanks for your assistance.
I understand this problem is now resolved after direct contact and a fix for all users will be available in the next release.
Thanks for your assistance.
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com