本文整理汇总了C++中CFX_RectF::Intersect方法的典型用法代码示例。如果您正苦于以下问题:C++ CFX_RectF::Intersect方法的具体用法?C++ CFX_RectF::Intersect怎么用?C++ CFX_RectF::Intersect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFX_RectF
的用法示例。
在下文中一共展示了CFX_RectF::Intersect方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderHighlightCaption
void CXFA_FFPushButton::RenderHighlightCaption(CFX_Graphics* pGS,
CFX_Matrix* pMatrix) {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption && caption.GetPresence() == XFA_ATTRIBUTEENUM_Visible) {
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
CFX_RectF rtWidget;
GetRectWithoutRotate(rtWidget);
CFX_RectF rtClip = m_rtCaption;
rtClip.Intersect(rtWidget);
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
mt.Concat(*pMatrix);
}
{
uint32_t dwState = m_pNormalWidget->GetStates();
if (m_pDownTextLayout && (dwState & FWL_STATE_PSB_Pressed) &&
(dwState & FWL_STATE_PSB_Hovered)) {
if (m_pDownTextLayout->DrawString(pRenderDevice, mt, rtClip)) {
return;
}
} else if (m_pRolloverTextLayout && (dwState & FWL_STATE_PSB_Hovered)) {
if (m_pRolloverTextLayout->DrawString(pRenderDevice, mt, rtClip)) {
return;
}
}
}
if (pCapTextLayout) {
pCapTextLayout->DrawString(pRenderDevice, mt, rtClip);
}
}
}
示例2: ApplyClip
FX_BOOL CFDE_RenderContext::ApplyClip(IFDE_VisualSet* pVisualSet,
FDE_HVISUALOBJ hObj,
FDE_HDEVICESTATE& hState) {
CFX_RectF rtClip;
if (!pVisualSet->GetClip(hObj, rtClip)) {
return FALSE;
}
CFX_RectF rtObj;
pVisualSet->GetRect(hObj, rtObj);
rtClip.Offset(rtObj.left, rtObj.top);
m_Transform.TransformRect(rtClip);
const CFX_RectF& rtDevClip = m_pRenderDevice->GetClipRect();
rtClip.Intersect(rtDevClip);
hState = m_pRenderDevice->SaveState();
return m_pRenderDevice->SetClipRect(rtClip);
}
示例3: OnDrawWidget
void CFWL_WidgetMgrDelegate::OnDrawWidget(IFWL_Widget* pWidget,
CFX_Graphics* pGraphics,
const CFX_Matrix* pMatrix) {
if (!pWidget || !pGraphics)
return;
CFX_Graphics* pTemp = DrawWidgetBefore(pWidget, pGraphics, pMatrix);
CFX_RectF clipCopy;
pWidget->GetWidgetRect(clipCopy);
clipCopy.left = clipCopy.top = 0;
if (bUseOffscreenDirect(pWidget)) {
DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
return;
}
CFX_RectF clipBounds;
#if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_ || \
_FX_OS_ == _FX_LINUX_DESKTOP_ || _FX_OS_ == _FX_ANDROID_
IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(nullptr);
pDelegate->OnDrawWidget(pTemp, pMatrix);
pGraphics->GetClipRect(clipBounds);
clipCopy = clipBounds;
#elif _FX_OS_ == _FX_MACOSX_
if (m_pWidgetMgr->IsFormDisabled()) {
IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(nullptr);
pDelegate->OnDrawWidget(pTemp, pMatrix);
pGraphics->GetClipRect(clipBounds);
clipCopy = clipBounds;
} else {
clipBounds.Set(pMatrix->a, pMatrix->b, pMatrix->c, pMatrix->d);
const_cast<CFX_Matrix*>(pMatrix)->SetIdentity(); // FIXME: const cast.
IFWL_WidgetDelegate* pDelegate = pWidget->SetDelegate(nullptr);
pDelegate->OnDrawWidget(pTemp, pMatrix);
}
#endif // _FX_OS_ == _FX_MACOSX_
if (!m_pWidgetMgr->IsFormDisabled()) {
CFX_RectF rtClient;
pWidget->GetClientRect(rtClient);
clipBounds.Intersect(rtClient);
}
if (!clipBounds.IsEmpty())
DrawChild(pWidget, clipBounds, pTemp, pMatrix);
DrawWidgetAfter(pWidget, pGraphics, clipCopy, pMatrix);
m_pWidgetMgr->ResetRedrawCounts(pWidget);
}
示例4: RenderCaption
void CXFA_FFField::RenderCaption(CFX_Graphics* pGS, CFX_Matrix* pMatrix) {
CXFA_TextLayout* pCapTextLayout = m_pDataAcc->GetCaptionTextLayout();
if (!pCapTextLayout) {
return;
}
CXFA_Caption caption = m_pDataAcc->GetCaption();
if (caption && caption.GetPresence() == XFA_ATTRIBUTEENUM_Visible) {
if (!pCapTextLayout->IsLoaded()) {
pCapTextLayout->Layout(CFX_SizeF(m_rtCaption.width, m_rtCaption.height));
}
CFX_RectF rtWidget;
GetRectWithoutRotate(rtWidget);
CFX_RectF rtClip = m_rtCaption;
rtClip.Intersect(rtWidget);
CFX_RenderDevice* pRenderDevice = pGS->GetRenderDevice();
CFX_Matrix mt;
mt.Set(1, 0, 0, 1, m_rtCaption.left, m_rtCaption.top);
if (pMatrix) {
pMatrix->TransformRect(rtClip);
mt.Concat(*pMatrix);
}
pCapTextLayout->DrawString(pRenderDevice, mt, rtClip);
}
}