void CXFA_FFCheckButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate, m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round ? XFA_DRAWBOX_ForceRound : 0); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, m_pDataAcc->GetCheckButtonShape() == XFA_ATTRIBUTEENUM_Round); CFX_Matrix mt; mt.Set(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top); mt.Concat(mtRotate); GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), pGS, &mt); }
void CXFA_FFLine::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CXFA_Value value = m_pDataAcc->GetFormValue(); if (!value) { return; } CXFA_Line lineObj = value.GetLine(); FX_ARGB lineColor = 0xFF000000; int32_t iStrokeType = 0; FX_FLOAT fLineWidth = 1.0f; FX_BOOL bSlope = lineObj.GetSlop(); int32_t iCap = 0; CXFA_Edge edge = lineObj.GetEdge(); if (edge) { if (edge.GetPresence() != XFA_ATTRIBUTEENUM_Visible) { return; } lineColor = edge.GetColor(); iStrokeType = edge.GetStrokeType(); fLineWidth = edge.GetThickness(); iCap = edge.GetCapType(); } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CFX_RectF rtLine; GetRectWithoutRotate(rtLine); if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) { XFA_RectWidthoutMargin(rtLine, mgWidget); } GetRectFromHand(rtLine, lineObj.GetHand(), fLineWidth); CFX_Path linePath; linePath.Create(); if (bSlope && rtLine.right() > 0.0f && rtLine.bottom() > 0.0f) { linePath.AddLine(rtLine.right(), rtLine.top, rtLine.left, rtLine.bottom()); } else { linePath.AddLine(rtLine.left, rtLine.top, rtLine.right(), rtLine.bottom()); } CFX_Color color(lineColor); pGS->SaveGraphState(); pGS->SetLineWidth(fLineWidth, TRUE); XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap); pGS->SetStrokeColor(&color); pGS->SetLineCap(XFA_LineCapToFXGE(iCap)); pGS->StrokePath(&linePath, &mtRotate); pGS->RestoreGraphState(); }
void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, FALSE); }
void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) return; CFX_Matrix mtRotate = GetRotateMatrix(); if (pMatrix) mtRotate.Concat(*pMatrix); CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); RenderHighlightCaption(pGS, &mtRotate); CFX_RectF rtWidget = GetRectWithoutRotate(); CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget, pGS, &mt); }
void CXFA_FFCheckButton::RenderWidget(CXFA_Graphics* pGS, const CFX_Matrix& matrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) return; CFX_Matrix mtRotate = GetRotateMatrix(); mtRotate.Concat(matrix); CXFA_FFWidget::RenderWidget(pGS, mtRotate, dwStatus); DrawBorderWithFlag(pGS, m_pNode->GetUIBorder(), m_rtUI, mtRotate, button_->IsRound()); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, button_->IsRound()); CFX_Matrix mt(1, 0, 0, 1, m_rtCheckBox.left, m_rtCheckBox.top); mt.Concat(mtRotate); GetApp()->GetFWLWidgetMgr()->OnDrawWidget(m_pNormalWidget.get(), pGS, mt); }
void CXFA_FFBarcode::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) return; CFX_Matrix mtRotate = GetRotateMatrix(); if (pMatrix) mtRotate.Concat(*pMatrix); CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); RenderCaption(pGS, &mtRotate); CFX_RectF rtWidget = m_pNormalWidget->GetWidgetRect(); CFX_Matrix mt(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); m_pNormalWidget->DrawWidget(pGS, &mt); }
void CXFA_FFSignature::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, FALSE); CFX_RectF rtWidget = m_rtUI; IXFA_DocProvider* pDocProvider = m_pDataAcc->GetDoc()->GetDocProvider(); ASSERT(pDocProvider); pDocProvider->RenderCustomWidget(this, pGS, &mtRotate, rtWidget); }
void CXFA_FFPushButton::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, FX_DWORD dwStatus, int32_t iRotate) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); RenderHighlightCaption(pGS, &mtRotate); CFX_RectF rtWidget; GetRectWithoutRotate(rtWidget); CFX_Matrix mt; mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), pGS, &mt); }
void CXFA_FFRectangle::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CXFA_Value value = m_pDataAcc->GetFormValue(); if (!value) { return; } CXFA_Rectangle rtObj = value.GetRectangle(); CFX_RectF rect; GetRectWithoutRotate(rect); if (CXFA_Margin mgWidget = m_pDataAcc->GetMargin()) { XFA_RectWidthoutMargin(rect, mgWidget); } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } DrawBorder(pGS, rtObj, rect, &mtRotate); }
void CXFA_FFImageEdit::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); RenderCaption(pGS, &mtRotate); if (CFX_DIBitmap* pDIBitmap = m_pDataAcc->GetImageEditImage()) { CFX_RectF rtImage; m_pNormalWidget->GetWidgetRect(rtImage); int32_t iHorzAlign = XFA_ATTRIBUTEENUM_Left; int32_t iVertAlign = XFA_ATTRIBUTEENUM_Top; if (CXFA_Para para = m_pDataAcc->GetPara()) { iHorzAlign = para.GetHorizontalAlign(); iVertAlign = para.GetVerticalAlign(); } int32_t iAspect = XFA_ATTRIBUTEENUM_Fit; if (CXFA_Value value = m_pDataAcc->GetFormValue()) { if (CXFA_Image imageObj = value.GetImage()) { iAspect = imageObj.GetAspect(); } } int32_t iImageXDpi = 0; int32_t iImageYDpi = 0; m_pDataAcc->GetImageEditDpi(iImageXDpi, iImageYDpi); XFA_DrawImage(pGS, rtImage, &mtRotate, pDIBitmap, iAspect, iImageXDpi, iImageYDpi, iHorzAlign, iVertAlign); } }
void CXFA_FFField::RenderWidget(CFX_Graphics* pGS, CFX_Matrix* pMatrix, uint32_t dwStatus) { if (!IsMatchVisibleStatus(dwStatus)) { return; } CFX_Matrix mtRotate; GetRotateMatrix(mtRotate); if (pMatrix) { mtRotate.Concat(*pMatrix); } CXFA_FFWidget::RenderWidget(pGS, &mtRotate, dwStatus); CXFA_Border borderUI = m_pDataAcc->GetUIBorder(); DrawBorder(pGS, borderUI, m_rtUI, &mtRotate); RenderCaption(pGS, &mtRotate); DrawHighlight(pGS, &mtRotate, dwStatus, FALSE); CFX_RectF rtWidget; m_pNormalWidget->GetWidgetRect(rtWidget); CFX_Matrix mt; mt.Set(1, 0, 0, 1, rtWidget.left, rtWidget.top); mt.Concat(mtRotate); GetApp()->GetWidgetMgrDelegate()->OnDrawWidget(m_pNormalWidget->GetWidget(), pGS, &mt); }