Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1016)

Unified Diff: xfa/fxfa/app/xfa_ffwidget.cpp

Issue 1810563002: Move xfa/include/fxgraphics/fx_graphics.h to xfa/fxgraphics. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxfa/app/xfa_fftext.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/app/xfa_ffwidget.cpp
diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp
index 450c4ed6a0e50318effd9d8d4b3f69487f058d21..93c1a3e34957013b0a5a73ee6eb69f423519ab7c 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);
« no previous file with comments | « xfa/fxfa/app/xfa_fftext.cpp ('k') | xfa/fxfa/app/xfa_fwltheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698