本文整理汇总了C++中CXFA_FFWidget::GetBBox方法的典型用法代码示例。如果您正苦于以下问题:C++ CXFA_FFWidget::GetBBox方法的具体用法?C++ CXFA_FFWidget::GetBBox怎么用?C++ CXFA_FFWidget::GetBBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CXFA_FFWidget
的用法示例。
在下文中一共展示了CXFA_FFWidget::GetBBox方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoRender
int32_t CXFA_RenderContext::DoRender(IFX_Pause* pPause) {
int32_t iCount = 0;
while (m_pWidget) {
CXFA_FFWidget* pWidget = m_pWidget;
CFX_RectF rtWidgetBox;
pWidget->GetBBox(rtWidgetBox, XFA_WidgetStatus_Visible);
rtWidgetBox.width += 1;
rtWidgetBox.height += 1;
if (rtWidgetBox.IntersectWith(m_rtClipRect))
pWidget->RenderWidget(m_pGS, &m_matrix, m_dwStatus);
m_pWidget = m_pWidgetIterator->MoveToNext();
iCount++;
if (iCount > kMaxCount && pPause && pPause->NeedToPauseNow())
return XFA_RENDERSTATUS_ToBeContinued;
}
return XFA_RENDERSTATUS_Done;
}
示例2: interform
DLLEXPORT int STDCALL FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
FPDF_PAGE page,
double page_x,
double page_y) {
if (!hHandle)
return -1;
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
if (pPage) {
CPDF_InterForm interform(pPage->m_pDocument);
CPDF_FormControl* pFormCtrl =
interform.GetControlAtPoint(pPage, static_cast<FX_FLOAT>(page_x),
static_cast<FX_FLOAT>(page_y), nullptr);
if (!pFormCtrl)
return -1;
CPDF_FormField* pFormField = pFormCtrl->GetField();
return pFormField ? pFormField->GetFieldType() : -1;
}
#ifdef PDF_ENABLE_XFA
CPDFXFA_Page* pXFAPage = UnderlyingFromFPDFPage(page);
if (!pXFAPage)
return -1;
CXFA_FFPageView* pPageView = pXFAPage->GetXFAPageView();
if (!pPageView)
return -1;
CXFA_FFDocView* pDocView = pPageView->GetDocView();
if (!pDocView)
return -1;
CXFA_FFWidgetHandler* pWidgetHandler = pDocView->GetWidgetHandler();
if (!pWidgetHandler)
return -1;
std::unique_ptr<IXFA_WidgetIterator> pWidgetIterator(
pPageView->CreateWidgetIterator(XFA_TRAVERSEWAY_Form,
XFA_WidgetStatus_Viewable));
if (!pWidgetIterator)
return -1;
CXFA_FFWidget* pXFAAnnot = pWidgetIterator->MoveToNext();
while (pXFAAnnot) {
CFX_RectF rcBBox;
pXFAAnnot->GetBBox(rcBBox, 0);
CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
rcBBox.top + rcBBox.height);
rcWidget.left -= 1.0f;
rcWidget.right += 1.0f;
rcWidget.bottom -= 1.0f;
rcWidget.top += 1.0f;
if (rcWidget.Contains(static_cast<FX_FLOAT>(page_x),
static_cast<FX_FLOAT>(page_y))) {
return FPDF_FORMFIELD_XFA;
}
pXFAAnnot = pWidgetIterator->MoveToNext();
}
#endif // PDF_ENABLE_XFA
return -1;
}