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); } }