diff options
Diffstat (limited to 'xfa/fxfa')
-rw-r--r-- | xfa/fxfa/cxfa_fffield.cpp | 12 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffline.cpp | 8 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffpushbutton.cpp | 12 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_ffwidget.cpp | 78 | ||||
-rw-r--r-- | xfa/fxfa/cxfa_fwltheme.cpp | 2 |
5 files changed, 56 insertions, 56 deletions
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp index 0ef6722d7f..9758eb76dc 100644 --- a/xfa/fxfa/cxfa_fffield.cpp +++ b/xfa/fxfa/cxfa_fffield.cpp @@ -23,8 +23,8 @@ #include "xfa/fxfa/cxfa_fwltheme.h" #include "xfa/fxfa/cxfa_textlayout.h" #include "xfa/fxfa/parser/cxfa_node.h" -#include "xfa/fxgraphics/cxfa_color.h" -#include "xfa/fxgraphics/cxfa_path.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" +#include "xfa/fxgraphics/cxfa_gepath.h" namespace { @@ -89,8 +89,8 @@ void CXFA_FFField::DrawHighlight(CXFA_Graphics* pGS, CXFA_FFDoc* pDoc = GetDoc(); pGS->SetFillColor( - CXFA_Color(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc))); - CXFA_Path path; + CXFA_GEColor(pDoc->GetDocEnvironment()->GetHighlightColor(pDoc))); + CXFA_GEPath path; if (bEllipse) path.AddEllipse(m_rtUI); else @@ -103,13 +103,13 @@ void CXFA_FFField::DrawFocus(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) { if (!(m_dwStatus & XFA_WidgetStatus_Focused)) return; - pGS->SetStrokeColor(CXFA_Color(0xFF000000)); + pGS->SetStrokeColor(CXFA_GEColor(0xFF000000)); float DashPattern[2] = {1, 1}; pGS->SetLineDash(0.0f, DashPattern, 2); pGS->SetLineWidth(0); - CXFA_Path path; + CXFA_GEPath path; path.AddRectangle(m_rtUI.left, m_rtUI.top, m_rtUI.width, m_rtUI.height); pGS->StrokePath(&path, pMatrix); } diff --git a/xfa/fxfa/cxfa_ffline.cpp b/xfa/fxfa/cxfa_ffline.cpp index de37e50bf9..d24444c401 100644 --- a/xfa/fxfa/cxfa_ffline.cpp +++ b/xfa/fxfa/cxfa_ffline.cpp @@ -6,9 +6,9 @@ #include "xfa/fxfa/cxfa_ffline.h" -#include "xfa/fxgraphics/cxfa_color.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" +#include "xfa/fxgraphics/cxfa_gepath.h" #include "xfa/fxgraphics/cxfa_graphics.h" -#include "xfa/fxgraphics/cxfa_path.h" CXFA_FFLine::CXFA_FFLine(CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pDataAcc) {} @@ -81,7 +81,7 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS, XFA_RectWidthoutMargin(rtLine, marginData); GetRectFromHand(rtLine, lineData.GetHand(), fLineWidth); - CXFA_Path linePath; + CXFA_GEPath linePath; if (lineData.GetSlope() && rtLine.right() > 0.0f && rtLine.bottom() > 0.0f) linePath.AddLine(rtLine.TopRight(), rtLine.BottomLeft()); else @@ -91,7 +91,7 @@ void CXFA_FFLine::RenderWidget(CXFA_Graphics* pGS, pGS->SetLineWidth(fLineWidth); pGS->EnableActOnDash(); XFA_StrokeTypeSetLineDash(pGS, iStrokeType, iCap); - pGS->SetStrokeColor(CXFA_Color(lineColor)); + pGS->SetStrokeColor(CXFA_GEColor(lineColor)); pGS->SetLineCap(XFA_LineCapToFXGE(iCap)); pGS->StrokePath(&linePath, &mtRotate); pGS->RestoreGraphState(); diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp index c966cdacfd..1f5d9021ee 100644 --- a/xfa/fxfa/cxfa_ffpushbutton.cpp +++ b/xfa/fxfa/cxfa_ffpushbutton.cpp @@ -18,8 +18,8 @@ #include "xfa/fxfa/cxfa_ffwidget.h" #include "xfa/fxfa/cxfa_textlayout.h" #include "xfa/fxfa/cxfa_textprovider.h" -#include "xfa/fxgraphics/cxfa_color.h" -#include "xfa/fxgraphics/cxfa_path.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" +#include "xfa/fxgraphics/cxfa_gepath.h" CXFA_FFPushButton::CXFA_FFPushButton(CXFA_WidgetAcc* pDataAcc) : CXFA_FFField(pDataAcc), m_pOldDelegate(nullptr) {} @@ -210,9 +210,9 @@ void CXFA_FFPushButton::OnDrawWidget(CXFA_Graphics* pGraphics, CFX_RectF rtFill(0, 0, m_pNormalWidget->GetWidgetRect().Size()); float fLineWith = GetLineWidth(); rtFill.Deflate(fLineWith, fLineWith); - CXFA_Path path; + CXFA_GEPath path; path.AddRectangle(rtFill.left, rtFill.top, rtFill.width, rtFill.height); - pGraphics->SetFillColor(CXFA_Color(FXARGB_MAKE(128, 128, 255, 255))); + pGraphics->SetFillColor(CXFA_GEColor(FXARGB_MAKE(128, 128, 255, 255))); pGraphics->FillPath(&path, FXFILL_WINDING, &matrix); } return; @@ -222,10 +222,10 @@ void CXFA_FFPushButton::OnDrawWidget(CXFA_Graphics* pGraphics, if ((m_pNormalWidget->GetStates() & FWL_STATE_PSB_Pressed) && (m_pNormalWidget->GetStates() & FWL_STATE_PSB_Hovered)) { float fLineWidth = GetLineWidth(); - pGraphics->SetStrokeColor(CXFA_Color(FXARGB_MAKE(255, 128, 255, 255))); + pGraphics->SetStrokeColor(CXFA_GEColor(FXARGB_MAKE(255, 128, 255, 255))); pGraphics->SetLineWidth(fLineWidth); - CXFA_Path path; + CXFA_GEPath path; CFX_RectF rect = m_pNormalWidget->GetWidgetRect(); path.AddRectangle(0, 0, rect.width, rect.height); pGraphics->StrokePath(&path, &matrix); diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp index d3a6498c4e..6bcf524586 100644 --- a/xfa/fxfa/cxfa_ffwidget.cpp +++ b/xfa/fxfa/cxfa_ffwidget.cpp @@ -31,17 +31,17 @@ #include "xfa/fxfa/cxfa_widgetacc.h" #include "xfa/fxfa/parser/cxfa_cornerdata.h" #include "xfa/fxfa/parser/cxfa_node.h" -#include "xfa/fxgraphics/cxfa_color.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" +#include "xfa/fxgraphics/cxfa_gepath.h" +#include "xfa/fxgraphics/cxfa_gepattern.h" +#include "xfa/fxgraphics/cxfa_geshading.h" #include "xfa/fxgraphics/cxfa_graphics.h" -#include "xfa/fxgraphics/cxfa_path.h" -#include "xfa/fxgraphics/cxfa_pattern.h" -#include "xfa/fxgraphics/cxfa_shading.h" namespace { void XFA_BOX_GetPath_Arc(const CXFA_BoxData& boxData, CFX_RectF rtDraw, - CXFA_Path& fillPath, + CXFA_GEPath& fillPath, uint32_t dwFlags) { float a, b; a = rtDraw.width / 2.0f; @@ -68,7 +68,7 @@ void XFA_BOX_GetPath_Arc(const CXFA_BoxData& boxData, void XFA_BOX_GetPath(const std::vector<CXFA_StrokeData>& strokes, CFX_RectF rtWidget, - CXFA_Path& path, + CXFA_GEPath& path, int32_t nIndex, bool bStart, bool bCorner) { @@ -237,7 +237,7 @@ void XFA_BOX_GetPath(const std::vector<CXFA_StrokeData>& strokes, void XFA_BOX_GetFillPath(const CXFA_BoxData& boxData, const std::vector<CXFA_StrokeData>& strokes, CFX_RectF rtWidget, - CXFA_Path& fillPath, + CXFA_GEPath& fillPath, uint16_t dwFlags) { if (boxData.IsArc() || (dwFlags & XFA_DRAWBOX_ForceRound) != 0) { float fThickness = std::fmax(0.0, boxData.GetEdgeData(0).GetThickness()); @@ -386,7 +386,7 @@ void XFA_BOX_GetFillPath(const CXFA_BoxData& boxData, void XFA_BOX_Fill_Radial(const CXFA_BoxData& boxData, CXFA_Graphics* pGS, - CXFA_Path& fillPath, + CXFA_GEPath& fillPath, CFX_RectF rtFill, const CFX_Matrix& matrix) { CXFA_FillData fillData = boxData.GetFillData(false); @@ -398,18 +398,18 @@ void XFA_BOX_Fill_Radial(const CXFA_BoxData& boxData, crEnd = crStart; crStart = temp; } - CXFA_Shading shading(rtFill.Center(), rtFill.Center(), 0, - sqrt(rtFill.Width() * rtFill.Width() + - rtFill.Height() * rtFill.Height()) / - 2, - true, true, crStart, crEnd); - pGS->SetFillColor(CXFA_Color(&shading)); + CXFA_GEShading shading(rtFill.Center(), rtFill.Center(), 0, + sqrt(rtFill.Width() * rtFill.Width() + + rtFill.Height() * rtFill.Height()) / + 2, + true, true, crStart, crEnd); + pGS->SetFillColor(CXFA_GEColor(&shading)); pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix); } void XFA_BOX_Fill_Pattern(const CXFA_BoxData& boxData, CXFA_Graphics* pGS, - CXFA_Path& fillPath, + CXFA_GEPath& fillPath, CFX_RectF rtFill, const CFX_Matrix& matrix) { CXFA_FillData fillData = boxData.GetFillData(false); @@ -437,14 +437,14 @@ void XFA_BOX_Fill_Pattern(const CXFA_BoxData& boxData, break; } - CXFA_Pattern pattern(iHatch, crEnd, crStart); - pGS->SetFillColor(CXFA_Color(&pattern, 0x0)); + CXFA_GEPattern pattern(iHatch, crEnd, crStart); + pGS->SetFillColor(CXFA_GEColor(&pattern, 0x0)); pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix); } void XFA_BOX_Fill_Linear(const CXFA_BoxData& boxData, CXFA_Graphics* pGS, - CXFA_Path& fillPath, + CXFA_GEPath& fillPath, CFX_RectF rtFill, const CFX_Matrix& matrix) { CXFA_FillData fillData = boxData.GetFillData(false); @@ -473,8 +473,8 @@ void XFA_BOX_Fill_Linear(const CXFA_BoxData& boxData, default: break; } - CXFA_Shading shading(ptStart, ptEnd, false, false, crStart, crEnd); - pGS->SetFillColor(CXFA_Color(&shading)); + CXFA_GEShading shading(ptStart, ptEnd, false, false, crStart, crEnd); + pGS->SetFillColor(CXFA_GEColor(&shading)); pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix); } @@ -489,7 +489,7 @@ void XFA_BOX_Fill(const CXFA_BoxData& boxData, return; pGS->SaveGraphState(); - CXFA_Path fillPath; + CXFA_GEPath fillPath; XFA_BOX_GetFillPath(boxData, strokes, rtWidget, fillPath, (dwFlags & XFA_DRAWBOX_ForceRound) != 0); fillPath.Close(); @@ -517,7 +517,7 @@ void XFA_BOX_Fill(const CXFA_BoxData& boxData, } else { cr = fillData.GetColor(); } - pGS->SetFillColor(CXFA_Color(cr)); + pGS->SetFillColor(CXFA_GEColor(cr)); pGS->FillPath(&fillPath, FXFILL_WINDING, &matrix); } break; } @@ -525,7 +525,7 @@ void XFA_BOX_Fill(const CXFA_BoxData& boxData, } void XFA_BOX_StrokePath(const CXFA_StrokeData& strokeData, - CXFA_Path* pPath, + CXFA_GEPath* pPath, CXFA_Graphics* pGS, const CFX_Matrix& matrix) { if (!strokeData || !strokeData.IsVisible()) @@ -544,7 +544,7 @@ void XFA_BOX_StrokePath(const CXFA_StrokeData& strokeData, pGS->SetLineCap(CFX_GraphStateData::LineCapButt); XFA_StrokeTypeSetLineDash(pGS, strokeData.GetStrokeType(), XFA_ATTRIBUTEENUM_Butt); - pGS->SetStrokeColor(CXFA_Color(strokeData.GetColor())); + pGS->SetStrokeColor(CXFA_GEColor(strokeData.GetColor())); pGS->StrokePath(pPath, &matrix); pGS->RestoreGraphState(); } @@ -581,7 +581,7 @@ void XFA_BOX_StrokeArc(const CXFA_BoxData& boxData, if (fHalf < 0.001f) return; - CXFA_Path arcPath; + CXFA_GEPath arcPath; XFA_BOX_GetPath_Arc(boxData, rtWidget, arcPath, dwFlags); XFA_BOX_StrokePath(edgeData, &arcPath, pGS, matrix); return; @@ -607,30 +607,30 @@ void XFA_BOX_StrokeArc(const CXFA_BoxData& boxData, startAngle = startAngle * FX_PI / 180.0f; sweepAngle = -sweepAngle * FX_PI / 180.0f; - CXFA_Path arcPath; + CXFA_GEPath arcPath; arcPath.AddArc(rtWidget.TopLeft(), rtWidget.Size(), 3.0f * FX_PI / 4.0f, FX_PI); - pGS->SetStrokeColor(CXFA_Color(0xFF808080)); + pGS->SetStrokeColor(CXFA_GEColor(0xFF808080)); pGS->StrokePath(&arcPath, &matrix); arcPath.Clear(); arcPath.AddArc(rtWidget.TopLeft(), rtWidget.Size(), -1.0f * FX_PI / 4.0f, FX_PI); - pGS->SetStrokeColor(CXFA_Color(0xFFFFFFFF)); + pGS->SetStrokeColor(CXFA_GEColor(0xFFFFFFFF)); pGS->StrokePath(&arcPath, &matrix); rtWidget.Deflate(fHalf, fHalf); arcPath.Clear(); arcPath.AddArc(rtWidget.TopLeft(), rtWidget.Size(), 3.0f * FX_PI / 4.0f, FX_PI); - pGS->SetStrokeColor(CXFA_Color(0xFF404040)); + pGS->SetStrokeColor(CXFA_GEColor(0xFF404040)); pGS->StrokePath(&arcPath, &matrix); arcPath.Clear(); arcPath.AddArc(rtWidget.TopLeft(), rtWidget.Size(), -1.0f * FX_PI / 4.0f, FX_PI); - pGS->SetStrokeColor(CXFA_Color(0xFFC0C0C0)); + pGS->SetStrokeColor(CXFA_GEColor(0xFFC0C0C0)); pGS->StrokePath(&arcPath, &matrix); pGS->RestoreGraphState(); } @@ -643,7 +643,7 @@ void XFA_Draw3DRect(CXFA_Graphics* pGraphic, FX_ARGB argbBottomRight) { float fBottom = rt.bottom(); float fRight = rt.right(); - CXFA_Path pathLT; + CXFA_GEPath pathLT; pathLT.MoveTo(CFX_PointF(rt.left, fBottom)); pathLT.LineTo(CFX_PointF(rt.left, rt.top)); pathLT.LineTo(CFX_PointF(fRight, rt.top)); @@ -651,10 +651,10 @@ void XFA_Draw3DRect(CXFA_Graphics* pGraphic, pathLT.LineTo(CFX_PointF(rt.left + fLineWidth, rt.top + fLineWidth)); pathLT.LineTo(CFX_PointF(rt.left + fLineWidth, fBottom - fLineWidth)); pathLT.LineTo(CFX_PointF(rt.left, fBottom)); - pGraphic->SetFillColor(CXFA_Color(argbTopLeft)); + pGraphic->SetFillColor(CXFA_GEColor(argbTopLeft)); pGraphic->FillPath(&pathLT, FXFILL_WINDING, &matrix); - CXFA_Path pathRB; + CXFA_GEPath pathRB; pathRB.MoveTo(CFX_PointF(fRight, rt.top)); pathRB.LineTo(CFX_PointF(fRight, fBottom)); pathRB.LineTo(CFX_PointF(rt.left, fBottom)); @@ -662,7 +662,7 @@ void XFA_Draw3DRect(CXFA_Graphics* pGraphic, pathRB.LineTo(CFX_PointF(fRight - fLineWidth, fBottom - fLineWidth)); pathRB.LineTo(CFX_PointF(fRight - fLineWidth, rt.top + fLineWidth)); pathRB.LineTo(CFX_PointF(fRight, rt.top)); - pGraphic->SetFillColor(CXFA_Color(argbBottomRight)); + pGraphic->SetFillColor(CXFA_GEColor(argbBottomRight)); pGraphic->FillPath(&pathRB, FXFILL_WINDING, &matrix); } @@ -674,10 +674,10 @@ void XFA_BOX_Stroke_3DRect_Lowered(CXFA_Graphics* pGS, CFX_RectF rtInner(rt); rtInner.Deflate(fHalfWidth, fHalfWidth); - CXFA_Path path; + CXFA_GEPath path; path.AddRectangle(rt.left, rt.top, rt.width, rt.height); path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height); - pGS->SetFillColor(CXFA_Color(0xFF000000)); + pGS->SetFillColor(CXFA_GEColor(0xFF000000)); pGS->FillPath(&path, FXFILL_ALTERNATE, &matrix); XFA_Draw3DRect(pGS, rtInner, fHalfWidth, matrix, 0xFF808080, 0xFFC0C0C0); } @@ -690,10 +690,10 @@ void XFA_BOX_Stroke_3DRect_Raised(CXFA_Graphics* pGS, CFX_RectF rtInner(rt); rtInner.Deflate(fHalfWidth, fHalfWidth); - CXFA_Path path; + CXFA_GEPath path; path.AddRectangle(rt.left, rt.top, rt.width, rt.height); path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height); - pGS->SetFillColor(CXFA_Color(0xFF000000)); + pGS->SetFillColor(CXFA_GEColor(0xFF000000)); pGS->FillPath(&path, FXFILL_ALTERNATE, &matrix); XFA_Draw3DRect(pGS, rtInner, fHalfWidth, matrix, 0xFFFFFFFF, 0xFF808080); } @@ -781,7 +781,7 @@ void XFA_BOX_Stroke_Rect(CXFA_BoxData boxData, } } bool bStart = true; - CXFA_Path path; + CXFA_GEPath path; for (int32_t i = 0; i < 8; i++) { CXFA_StrokeData strokeData = strokes[i]; if ((i % 1) == 0 && strokeData.GetRadius() < 0) { diff --git a/xfa/fxfa/cxfa_fwltheme.cpp b/xfa/fxfa/cxfa_fwltheme.cpp index 61c4e25f1d..440c41dd5b 100644 --- a/xfa/fxfa/cxfa_fwltheme.cpp +++ b/xfa/fxfa/cxfa_fwltheme.cpp @@ -24,7 +24,7 @@ #include "xfa/fwl/cfwl_themetext.h" #include "xfa/fxfa/cxfa_ffapp.h" #include "xfa/fxfa/cxfa_ffwidget.h" -#include "xfa/fxgraphics/cxfa_color.h" +#include "xfa/fxgraphics/cxfa_gecolor.h" namespace { |