本文整理汇总了C++中CPDFDoc_Environment::FFI_DoGoToAction方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDFDoc_Environment::FFI_DoGoToAction方法的具体用法?C++ CPDFDoc_Environment::FFI_DoGoToAction怎么用?C++ CPDFDoc_Environment::FFI_DoGoToAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDFDoc_Environment
的用法示例。
在下文中一共展示了CPDFDoc_Environment::FFI_DoGoToAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoAction_GoTo
void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument,
const CPDF_Action& action) {
ASSERT(action);
CPDF_Document* pPDFDocument = pDocument->GetPDFDocument();
ASSERT(pPDFDocument);
CPDF_Dest MyDest = action.GetDest(pPDFDocument);
int nPageIndex = MyDest.GetPageIndex(pPDFDocument);
int nFitType = MyDest.GetZoomMode();
const CPDF_Array* pMyArray = ToArray(MyDest.GetObject());
float* pPosAry = nullptr;
int sizeOfAry = 0;
if (pMyArray) {
pPosAry = new float[pMyArray->GetCount()];
int j = 0;
for (int i = 2; i < (int)pMyArray->GetCount(); i++) {
pPosAry[j++] = pMyArray->GetFloat(i);
}
sizeOfAry = j;
}
CPDFDoc_Environment* pApp = pDocument->GetEnv();
pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry);
delete[] pPosAry;
}
示例2: DoAction_GoTo
void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument, /*CReader_DocView* pDocView,*/
const CPDF_Action& action)
{
ASSERT(pDocument != NULL);
// ASSERT(pDocView != NULL);
ASSERT(action != NULL);
CPDF_Document* pPDFDocument = pDocument->GetDocument();
ASSERT(pPDFDocument != NULL);
CPDFDoc_Environment* pApp = pDocument->GetEnv();
ASSERT(pApp != NULL);
CPDF_Dest MyDest = action.GetDest(pPDFDocument);
int nPageIndex = MyDest.GetPageIndex(pPDFDocument);
int nFitType = MyDest.GetZoomMode();
const CPDF_Array * pMyArray = (CPDF_Array*)MyDest.m_pObj;
float* pPosAry = NULL;
int sizeOfAry = 0;
if (pMyArray != NULL)
{
pPosAry = new float[pMyArray->GetCount()];
int j = 0;
for (int i = 2; i < (int)pMyArray->GetCount(); i++)
{
pPosAry[j++] = pMyArray->GetFloat(i);
}
sizeOfAry = j;
}
pApp->FFI_DoGoToAction(nPageIndex, nFitType, pPosAry, sizeOfAry);
if(pPosAry)
delete[] pPosAry;
}