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 BarGauge::Render() { glDisable(GL_TEXTURE_2D); //sr_ResetRenderState(0); //needs this because rFont has bugs i presume.. Ie I have problems as soon as rTextFirld is used // z-man: actually, it is needed because per-frame-tasks get called without rendering context, so it has to be set. const tValue::Base &val_s = m_data.GetVal(); const tValue::Base &min_s = m_data.GetMin(); const tValue::Base &max_s = m_data.GetMax(); float min = min_s.GetFloat(); float max = max_s.GetFloat(); float val = val_s.GetFloat(); if (val > max) val = max; if (val < min) val = min; if (min >= max) return; RenderGraph(min, max, val,m_reverse?-1.:1., val_s); RenderMinMax(min_s, max_s); RenderCaption(); //if (!sr_glOut) // return; //glColor3f(1,1,1); }
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_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_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); }