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

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
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..0c7d434141b0394ed3c5d09d1cac1e9b713288b0 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,7 +1460,7 @@ 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;
+ CFX_Shading shading(FX_SHADING_Radial);
if (iType != XFA_ATTRIBUTEENUM_ToEdge) {
FX_ARGB temp = crEnd;
crEnd = crStart;
@@ -1480,7 +1484,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,6 +1504,7 @@ static void XFA_BOX_Fill_Pattern(CXFA_Box box,
default:
break;
}
+
CFX_Pattern pattern;
pattern.Create(iHatch, crEnd, crStart);
CFX_Color cr(&pattern);
@@ -1537,7 +1542,7 @@ static void XFA_BOX_Fill_Linear(CXFA_Box box,
default:
break;
}
- CFX_Shading shading;
+ CFX_Shading shading(FX_SHADING_Axial);
shading.CreateAxial(ptStart, ptEnd, FALSE, FALSE, crStart, crEnd);
CFX_Color cr(&shading);
pGS->SetFillColor(&cr);

Powered by Google App Engine
This is Rietveld 408576698