From 811b8a4f4482bb5c11ac7610e70a4c8fd34c2907 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 17 Mar 2016 08:59:42 -0400 Subject: Move xfa/include/fxgraphics/fx_graphics.h to xfa/fxgraphics. This Cl moves and splits apart the fx_graphics.h file into individual classes. The .cpp files are renamed to match the .h files. pre.h was removed at the same time and its contents moved to the correct places as needed. R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1810563002 . --- xfa/fxfa/app/xfa_fffield.cpp | 2 ++ xfa/fxfa/app/xfa_ffpath.cpp | 3 ++- xfa/fxfa/app/xfa_ffpushbutton.cpp | 2 ++ xfa/fxfa/app/xfa_fftext.cpp | 2 +- xfa/fxfa/app/xfa_ffwidget.cpp | 26 ++++++++++++++------------ xfa/fxfa/app/xfa_fwltheme.cpp | 1 + xfa/fxfa/app/xfa_rendercontext.cpp | 2 +- 7 files changed, 23 insertions(+), 15 deletions(-) (limited to 'xfa/fxfa/app') diff --git a/xfa/fxfa/app/xfa_fffield.cpp b/xfa/fxfa/app/xfa_fffield.cpp index 39e7ee5d8f..cc8f7ed2a4 100644 --- a/xfa/fxfa/app/xfa_fffield.cpp +++ b/xfa/fxfa/app/xfa_fffield.cpp @@ -13,6 +13,8 @@ #include "xfa/fxfa/app/xfa_ffwidget.h" #include "xfa/fxfa/app/xfa_fwltheme.h" #include "xfa/fxfa/app/xfa_textlayout.h" +#include "xfa/fxgraphics/cfx_color.h" +#include "xfa/fxgraphics/cfx_path.h" #include "xfa/include/fwl/basewidget/fwl_edit.h" #include "xfa/include/fwl/core/fwl_widgetmgr.h" #include "xfa/include/fwl/lightwidget/edit.h" diff --git a/xfa/fxfa/app/xfa_ffpath.cpp b/xfa/fxfa/app/xfa_ffpath.cpp index f082232905..e0f6825a03 100644 --- a/xfa/fxfa/app/xfa_ffpath.cpp +++ b/xfa/fxfa/app/xfa_ffpath.cpp @@ -11,7 +11,8 @@ #include "xfa/fxfa/app/xfa_ffdraw.h" #include "xfa/fxfa/app/xfa_ffpageview.h" #include "xfa/fxfa/app/xfa_ffwidget.h" -#include "xfa/include/fxgraphics/fx_graphics.h" +#include "xfa/fxgraphics/cfx_color.h" +#include "xfa/fxgraphics/cfx_path.h" CXFA_FFLine::CXFA_FFLine(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pPageView, pDataAcc) {} diff --git a/xfa/fxfa/app/xfa_ffpushbutton.cpp b/xfa/fxfa/app/xfa_ffpushbutton.cpp index 718853e5e2..bf18387af8 100644 --- a/xfa/fxfa/app/xfa_ffpushbutton.cpp +++ b/xfa/fxfa/app/xfa_ffpushbutton.cpp @@ -12,6 +12,8 @@ #include "xfa/fxfa/app/xfa_ffwidget.h" #include "xfa/fxfa/app/xfa_ffwidgetacc.h" #include "xfa/fxfa/app/xfa_textlayout.h" +#include "xfa/fxgraphics/cfx_color.h" +#include "xfa/fxgraphics/cfx_path.h" #include "xfa/include/fwl/core/fwl_widgetmgr.h" #include "xfa/include/fwl/lightwidget/pushbutton.h" diff --git a/xfa/fxfa/app/xfa_fftext.cpp b/xfa/fxfa/app/xfa_fftext.cpp index aba8d162b0..d87815856d 100644 --- a/xfa/fxfa/app/xfa_fftext.cpp +++ b/xfa/fxfa/app/xfa_fftext.cpp @@ -12,8 +12,8 @@ #include "xfa/fxfa/app/xfa_ffpageview.h" #include "xfa/fxfa/app/xfa_ffwidget.h" #include "xfa/fxfa/app/xfa_textlayout.h" +#include "xfa/fxgraphics/include/cfx_graphics.h" #include "xfa/include/fwl/core/fwl_widgetdef.h" -#include "xfa/include/fxgraphics/fx_graphics.h" CXFA_FFText::CXFA_FFText(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) : CXFA_FFDraw(pPageView, pDataAcc) {} diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 450c4ed6a0..93c1a3e349 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -15,7 +15,11 @@ #include "xfa/fxfa/app/xfa_ffdocview.h" #include "xfa/fxfa/app/xfa_ffpageview.h" #include "xfa/fxfa/app/xfa_textlayout.h" -#include "xfa/include/fxgraphics/fx_graphics.h" +#include "xfa/fxgraphics/cfx_color.h" +#include "xfa/fxgraphics/cfx_path.h" +#include "xfa/fxgraphics/cfx_pattern.h" +#include "xfa/fxgraphics/cfx_shading.h" +#include "xfa/fxgraphics/include/cfx_graphics.h" CXFA_FFWidget::CXFA_FFWidget(CXFA_FFPageView* pPageView, CXFA_WidgetAcc* pDataAcc) @@ -1456,17 +1460,16 @@ static void XFA_BOX_Fill_Radial(CXFA_Box box, FX_ARGB crStart, crEnd; crStart = fill.GetColor(); int32_t iType = fill.GetRadial(crEnd); - CFX_Shading shading; if (iType != XFA_ATTRIBUTEENUM_ToEdge) { FX_ARGB temp = crEnd; crEnd = crStart; crStart = temp; } - shading.CreateRadial(rtFill.Center(), rtFill.Center(), 0, - FXSYS_sqrt(rtFill.Width() * rtFill.Width() + - rtFill.Height() * rtFill.Height()) / - 2, - TRUE, TRUE, crStart, crEnd); + CFX_Shading shading(rtFill.Center(), rtFill.Center(), 0, + FXSYS_sqrt(rtFill.Width() * rtFill.Width() + + rtFill.Height() * rtFill.Height()) / + 2, + TRUE, TRUE, crStart, crEnd); CFX_Color cr(&shading); pGS->SetFillColor(&cr); pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix); @@ -1480,7 +1483,7 @@ static void XFA_BOX_Fill_Pattern(CXFA_Box box, FX_ARGB crStart, crEnd; crStart = fill.GetColor(); int32_t iType = fill.GetPattern(crEnd); - int32_t iHatch = FX_HATCHSTYLE_Cross; + FX_HatchStyle iHatch = FX_HATCHSTYLE_Cross; switch (iType) { case XFA_ATTRIBUTEENUM_CrossDiagonal: iHatch = FX_HATCHSTYLE_DiagonalCross; @@ -1500,8 +1503,8 @@ static void XFA_BOX_Fill_Pattern(CXFA_Box box, default: break; } - CFX_Pattern pattern; - pattern.Create(iHatch, crEnd, crStart); + + CFX_Pattern pattern(iHatch, crEnd, crStart); CFX_Color cr(&pattern); pGS->SetFillColor(&cr); pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix); @@ -1537,8 +1540,7 @@ static void XFA_BOX_Fill_Linear(CXFA_Box box, default: break; } - CFX_Shading shading; - shading.CreateAxial(ptStart, ptEnd, FALSE, FALSE, crStart, crEnd); + CFX_Shading shading(ptStart, ptEnd, FALSE, FALSE, crStart, crEnd); CFX_Color cr(&shading); pGS->SetFillColor(&cr); pGS->FillPath(&fillPath, FXFILL_WINDING, pMatrix); diff --git a/xfa/fxfa/app/xfa_fwltheme.cpp b/xfa/fxfa/app/xfa_fwltheme.cpp index b0657ee8e4..6ebf4e3f41 100644 --- a/xfa/fxfa/app/xfa_fwltheme.cpp +++ b/xfa/fxfa/app/xfa_fwltheme.cpp @@ -10,6 +10,7 @@ #include "xfa/fgas/crt/fgas_codepage.h" #include "xfa/fxfa/app/xfa_ffapp.h" #include "xfa/fxfa/app/xfa_ffwidget.h" +#include "xfa/fxgraphics/cfx_color.h" #include "xfa/include/fwl/basewidget/fwl_barcode.h" #include "xfa/include/fwl/basewidget/fwl_caret.h" #include "xfa/include/fwl/basewidget/fwl_checkbox.h" diff --git a/xfa/fxfa/app/xfa_rendercontext.cpp b/xfa/fxfa/app/xfa_rendercontext.cpp index 5b5cf48a87..c9ca92bd6c 100644 --- a/xfa/fxfa/app/xfa_rendercontext.cpp +++ b/xfa/fxfa/app/xfa_rendercontext.cpp @@ -7,7 +7,7 @@ #include "xfa/fxfa/app/xfa_rendercontext.h" #include "xfa/fxfa/app/xfa_ffwidget.h" -#include "xfa/include/fxgraphics/fx_graphics.h" +#include "xfa/fxgraphics/include/cfx_graphics.h" #define XFA_RENDERCONTEXT_MaxCount 30 -- cgit v1.2.3