本文整理汇总了C++中CPDF_PageObject::IsForm方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_PageObject::IsForm方法的具体用法?C++ CPDF_PageObject::IsForm怎么用?C++ CPDF_PageObject::IsForm使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_PageObject
的用法示例。
在下文中一共展示了CPDF_PageObject::IsForm方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ToDictionary
DLLEXPORT FPDF_BOOL STDCALL
FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
if (!pageObject)
return FALSE;
CPDF_PageObject* pPageObj = reinterpret_cast<CPDF_PageObject*>(pageObject);
int blend_type = pPageObj->m_GeneralState.GetBlendType();
if (blend_type != FXDIB_BLEND_NORMAL)
return TRUE;
CPDF_Dictionary* pSMaskDict =
ToDictionary(pPageObj->m_GeneralState.GetSoftMask());
if (pSMaskDict)
return TRUE;
if (pPageObj->m_GeneralState.GetFillAlpha() != 1.0f)
return TRUE;
if (pPageObj->IsPath() && pPageObj->m_GeneralState.GetStrokeAlpha() != 1.0f) {
return TRUE;
}
if (pPageObj->IsForm()) {
const CPDF_Form* pForm = pPageObj->AsForm()->form();
if (pForm) {
int trans = pForm->m_Transparency;
if ((trans & PDFTRANS_ISOLATED) || (trans & PDFTRANS_GROUP))
return TRUE;
}
}
return FALSE;
}
示例2: ProcessFormObject
void CPDF_TextPage::ProcessFormObject(CPDF_FormObject* pFormObj,
const CFX_Matrix& formMatrix) {
const CPDF_PageObjectList* pObjectList =
pFormObj->form()->GetPageObjectList();
if (pObjectList->empty())
return;
CFX_Matrix curFormMatrix = pFormObj->form_matrix() * formMatrix;
for (auto it = pObjectList->begin(); it != pObjectList->end(); ++it) {
CPDF_PageObject* pPageObj = it->get();
if (!pPageObj)
continue;
if (pPageObj->IsText())
ProcessTextObject(pPageObj->AsText(), curFormMatrix, pObjectList, it);
else if (pPageObj->IsForm())
ProcessFormObject(pPageObj->AsForm(), curFormMatrix);
}
}
示例3: ProcessObject
void CPDF_TextPage::ProcessObject() {
if (m_pPage->GetPageObjectList()->empty())
return;
m_TextlineDir = FindTextlineFlowOrientation();
const CPDF_PageObjectList* pObjList = m_pPage->GetPageObjectList();
for (auto it = pObjList->begin(); it != pObjList->end(); ++it) {
CPDF_PageObject* pObj = it->get();
if (!pObj)
continue;
CFX_Matrix matrix;
if (pObj->IsText())
ProcessTextObject(pObj->AsText(), matrix, pObjList, it);
else if (pObj->IsForm())
ProcessFormObject(pObj->AsForm(), matrix);
}
for (const auto& obj : m_LineObj)
ProcessTextObject(obj);
m_LineObj.clear();
CloseTempLine();
}
示例4: Continue
void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) {
while (m_Status == ToBeContinued) {
if (!m_pCurrentLayer) {
if (m_LayerIndex >= m_pContext->CountLayers()) {
m_Status = Done;
return;
}
m_pCurrentLayer = m_pContext->GetLayer(m_LayerIndex);
m_LastObjectRendered =
m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->end();
m_pRenderStatus.reset(new CPDF_RenderStatus());
m_pRenderStatus->Initialize(
m_pContext, m_pDevice, nullptr, nullptr, nullptr, nullptr, m_pOptions,
m_pCurrentLayer->m_pObjectHolder->m_Transparency, FALSE, nullptr);
m_pDevice->SaveState();
m_ClipRect = CFX_FloatRect(m_pDevice->GetClipBox());
CFX_Matrix device2object;
device2object.SetReverse(m_pCurrentLayer->m_Matrix);
device2object.TransformRect(m_ClipRect);
}
CPDF_PageObjectList::iterator iter;
CPDF_PageObjectList::iterator iterEnd =
m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->end();
if (m_LastObjectRendered != iterEnd) {
iter = m_LastObjectRendered;
++iter;
} else {
iter = m_pCurrentLayer->m_pObjectHolder->GetPageObjectList()->begin();
}
int nObjsToGo = kStepLimit;
while (iter != iterEnd) {
CPDF_PageObject* pCurObj = iter->get();
if (pCurObj && pCurObj->m_Left <= m_ClipRect.right &&
pCurObj->m_Right >= m_ClipRect.left &&
pCurObj->m_Bottom <= m_ClipRect.top &&
pCurObj->m_Top >= m_ClipRect.bottom) {
if (m_pRenderStatus->ContinueSingleObject(
pCurObj, &m_pCurrentLayer->m_Matrix, pPause)) {
return;
}
if (pCurObj->IsImage() &&
m_pRenderStatus->m_Options.m_Flags & RENDER_LIMITEDIMAGECACHE) {
m_pContext->GetPageCache()->CacheOptimization(
m_pRenderStatus->m_Options.m_dwLimitCacheSize);
}
if (pCurObj->IsForm() || pCurObj->IsShading()) {
nObjsToGo = 0;
} else {
--nObjsToGo;
}
}
m_LastObjectRendered = iter;
if (nObjsToGo == 0) {
if (pPause && pPause->NeedToPauseNow())
return;
nObjsToGo = kStepLimit;
}
++iter;
}
if (m_pCurrentLayer->m_pObjectHolder->IsParsed()) {
m_pRenderStatus.reset();
m_pDevice->RestoreState(false);
m_pCurrentLayer = nullptr;
m_LayerIndex++;
if (pPause && pPause->NeedToPauseNow()) {
return;
}
} else {
m_pCurrentLayer->m_pObjectHolder->ContinueParse(pPause);
if (!m_pCurrentLayer->m_pObjectHolder->IsParsed())
return;
}
}
}