Change FX_FillMode type parameters in CXFA_Graphics.

In CXFA_Graphics, replaces FX_FillMode type (integer) parameter
|fillMode| with CFX_FillRenderOptions::FillType in FillPath() and
RenderDeviceFillPath().

Bug: pdfium:1531
Change-Id: I27c3a432112eb028b3865583d847222be96cd18e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/71550
Commit-Queue: Hui Yingst <nigi@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/xfa/fwl/theme/cfwl_carettp.cpp b/xfa/fwl/theme/cfwl_carettp.cpp
index 22f19bd..bd7db65 100644
--- a/xfa/fwl/theme/cfwl_carettp.cpp
+++ b/xfa/fwl/theme/cfwl_carettp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_carettp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_caret.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -39,5 +38,6 @@
   CXFA_GEPath path;
   path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
   pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 0, 0, 0)));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
 }
diff --git a/xfa/fwl/theme/cfwl_checkboxtp.cpp b/xfa/fwl/theme/cfwl_checkboxtp.cpp
index 516ff97..380b50c 100644
--- a/xfa/fwl/theme/cfwl_checkboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_checkboxtp.cpp
@@ -7,7 +7,6 @@
 #include "xfa/fwl/theme/cfwl_checkboxtp.h"
 
 #include "core/fxge/cfx_pathdata.h"
-#include "core/fxge/render_defines.h"
 #include "third_party/base/stl_util.h"
 #include "xfa/fde/cfde_textout.h"
 #include "xfa/fwl/cfwl_checkbox.h"
@@ -57,7 +56,8 @@
   mt.Concat(matrix);
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(argbFill));
-  pGraphics->FillPath(m_pCheckPath.get(), FXFILL_WINDING, &mt);
+  pGraphics->FillPath(m_pCheckPath.get(),
+                      CFX_FillRenderOptions::FillType::kWinding, &mt);
   pGraphics->RestoreGraphState();
 }
 
@@ -69,7 +69,8 @@
   path.AddEllipse(rtSign);
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(argbFill));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
@@ -107,7 +108,8 @@
 
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(argbFill));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
@@ -119,7 +121,8 @@
   path.AddRectangle(rtSign.left, rtSign.top, rtSign.width, rtSign.height);
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(argbFill));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
@@ -149,7 +152,8 @@
   }
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(argbFill));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
diff --git a/xfa/fwl/theme/cfwl_comboboxtp.cpp b/xfa/fwl/theme/cfwl_comboboxtp.cpp
index e663275..1805130 100644
--- a/xfa/fwl/theme/cfwl_comboboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_comboboxtp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_comboboxtp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_combobox.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -42,7 +41,8 @@
       }
       pParams.m_pGraphics->SaveGraphState();
       pParams.m_pGraphics->SetFillColor(CXFA_GEColor(argb_color));
-      pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams.m_matrix);
+      pParams.m_pGraphics->FillPath(
+          &path, CFX_FillRenderOptions::FillType::kWinding, &pParams.m_matrix);
       pParams.m_pGraphics->RestoreGraphState();
       break;
     }
diff --git a/xfa/fwl/theme/cfwl_edittp.cpp b/xfa/fwl/theme/cfwl_edittp.cpp
index 1a6c56f..ca37dff 100644
--- a/xfa/fwl/theme/cfwl_edittp.cpp
+++ b/xfa/fwl/theme/cfwl_edittp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_edittp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_edit.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -41,7 +40,8 @@
         CXFA_Graphics* pGraphics = pParams.m_pGraphics.Get();
         pGraphics->SaveGraphState();
         pGraphics->SetFillColor(CXFA_GEColor(FWLTHEME_COLOR_BKSelected));
-        pGraphics->FillPath(pParams.m_pPath.Get(), FXFILL_WINDING,
+        pGraphics->FillPath(pParams.m_pPath.Get(),
+                            CFX_FillRenderOptions::FillType::kWinding,
                             &pParams.m_matrix);
         pGraphics->RestoreGraphState();
       } else {
@@ -59,7 +59,9 @@
         }
         pParams.m_pGraphics->SaveGraphState();
         pParams.m_pGraphics->SetFillColor(cr);
-        pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &pParams.m_matrix);
+        pParams.m_pGraphics->FillPath(&path,
+                                      CFX_FillRenderOptions::FillType::kWinding,
+                                      &pParams.m_matrix);
         pParams.m_pGraphics->RestoreGraphState();
       }
       break;
diff --git a/xfa/fwl/theme/cfwl_listboxtp.cpp b/xfa/fwl/theme/cfwl_listboxtp.cpp
index 239f97e..611ca49 100644
--- a/xfa/fwl/theme/cfwl_listboxtp.cpp
+++ b/xfa/fwl/theme/cfwl_listboxtp.cpp
@@ -7,7 +7,6 @@
 #include "xfa/fwl/theme/cfwl_listboxtp.h"
 
 #include "build/build_config.h"
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_listbox.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -70,7 +69,8 @@
 #else
     path.AddRectangle(rtItem.left, rtItem.top, rtItem.width, rtItem.height);
 #endif
-    pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                        &matrix);
     pGraphics->RestoreGraphState();
   }
   if ((dwStates & CFWL_PartState_Focused) && pData)
diff --git a/xfa/fwl/theme/cfwl_monthcalendartp.cpp b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
index 01b9eed..0f4e874 100644
--- a/xfa/fwl/theme/cfwl_monthcalendartp.cpp
+++ b/xfa/fwl/theme/cfwl_monthcalendartp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_monthcalendartp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fde/cfde_textout.h"
 #include "xfa/fwl/cfwl_monthcalendar.h"
 #include "xfa/fwl/cfwl_themebackground.h"
@@ -106,7 +105,8 @@
   path.AddRectangle(rtTotal.left, rtTotal.top, rtTotal.width, rtTotal.height);
   pParams.m_pGraphics->SaveGraphState();
   pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kBackgroundColor));
-  pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pParams.m_pGraphics->FillPath(
+      &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pParams.m_pGraphics->RestoreGraphState();
 }
 
@@ -117,7 +117,8 @@
   path.AddRectangle(rtHead.left, rtHead.top, rtHead.width, rtHead.height);
   pParams.m_pGraphics->SaveGraphState();
   pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kBackgroundColor));
-  pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pParams.m_pGraphics->FillPath(
+      &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pParams.m_pGraphics->RestoreGraphState();
 }
 
@@ -133,11 +134,13 @@
   if (pParams.m_dwStates & CFWL_PartState_Pressed) {
     pParams.m_pGraphics->SetFillColor(
         CXFA_GEColor(ArgbEncode(0xff, 174, 198, 242)));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   } else {
     pParams.m_pGraphics->SetFillColor(
         CXFA_GEColor(ArgbEncode(0xff, 227, 235, 249)));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   }
 
   path.Clear();
@@ -166,11 +169,13 @@
   if (pParams.m_dwStates & CFWL_PartState_Pressed) {
     pParams.m_pGraphics->SetFillColor(
         CXFA_GEColor(ArgbEncode(0xff, 174, 198, 242)));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   } else {
     pParams.m_pGraphics->SetFillColor(
         CXFA_GEColor(ArgbEncode(0xff, 227, 235, 249)));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   }
 
   path.Clear();
@@ -221,14 +226,16 @@
                       rtSelDay.height);
     pParams.m_pGraphics->SetFillColor(
         CXFA_GEColor(kDatesSelectedBackgroundColor));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   } else if (pParams.m_dwStates & CFWL_PartState_Hovered) {
     CXFA_GEPath path;
     CFX_RectF rtSelDay = pParams.m_PartRect;
     path.AddRectangle(rtSelDay.left, rtSelDay.top, rtSelDay.width,
                       rtSelDay.height);
     pParams.m_pGraphics->SetFillColor(CXFA_GEColor(kDatesHoverBackgroundColor));
-    pParams.m_pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+    pParams.m_pGraphics->FillPath(
+        &path, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   }
   pParams.m_pGraphics->RestoreGraphState();
 }
diff --git a/xfa/fwl/theme/cfwl_pushbuttontp.cpp b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
index 2a7db50..491727e 100644
--- a/xfa/fwl/theme/cfwl_pushbuttontp.cpp
+++ b/xfa/fwl/theme/cfwl_pushbuttontp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_pushbuttontp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_pushbutton.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -74,7 +73,8 @@
                             rtInner.height);
 
       pGraphics->SetFillColor(CXFA_GEColor(m_pThemeData->clrFill[iColor]));
-      pGraphics->FillPath(&fillPath, FXFILL_WINDING, &pParams.m_matrix);
+      pGraphics->FillPath(&fillPath, CFX_FillRenderOptions::FillType::kWinding,
+                          &pParams.m_matrix);
       if (pParams.m_dwStates & CFWL_PartState_Focused) {
         rtInner.Inflate(1, 1, 0, 0);
         DrawFocus(pGraphics, rtInner, pParams.m_matrix);
diff --git a/xfa/fwl/theme/cfwl_scrollbartp.cpp b/xfa/fwl/theme/cfwl_scrollbartp.cpp
index 9953c53..630ead8 100644
--- a/xfa/fwl/theme/cfwl_scrollbartp.cpp
+++ b/xfa/fwl/theme/cfwl_scrollbartp.cpp
@@ -6,7 +6,6 @@
 
 #include "xfa/fwl/theme/cfwl_scrollbartp.h"
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_scrollbar.h"
 #include "xfa/fwl/cfwl_themebackground.h"
 #include "xfa/fwl/cfwl_widget.h"
@@ -205,7 +204,8 @@
     path.AddRectangle(rect.left, fBottom - 1, rect.width, 1);
   }
   pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 238, 237, 229)));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   path.Clear();
   path.AddRectangle(rect.left + 1, rect.top, rect.width - 2, rect.height);
   pGraphics->RestoreGraphState();
diff --git a/xfa/fwl/theme/cfwl_widgettp.cpp b/xfa/fwl/theme/cfwl_widgettp.cpp
index 7e2e593..65cf52a 100644
--- a/xfa/fwl/theme/cfwl_widgettp.cpp
+++ b/xfa/fwl/theme/cfwl_widgettp.cpp
@@ -9,7 +9,6 @@
 #include <algorithm>
 #include <utility>
 
-#include "core/fxge/render_defines.h"
 #include "third_party/base/stl_util.h"
 #include "xfa/fde/cfde_textout.h"
 #include "xfa/fgas/font/cfgas_fontmgr.h"
@@ -104,7 +103,8 @@
                     rect.height - 2);
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(255, 0, 0, 0)));
-  pGraphics->FillPath(&path, FXFILL_ALTERNATE, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kEvenOdd,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
@@ -125,7 +125,8 @@
   path.AddRectangle(rect.left, rect.top, rect.width, rect.height);
   pGraphics->SaveGraphState();
   pGraphics->SetFillColor(CXFA_GEColor(fillColor));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
   pGraphics->RestoreGraphState();
 }
 
@@ -194,7 +195,8 @@
     }
   }
   pGraphics->SetFillColor(CXFA_GEColor(argSign));
-  pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+  pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                      &matrix);
 }
 
 void CFWL_WidgetTP::DrawBtn(CXFA_Graphics* pGraphics,
diff --git a/xfa/fxfa/cxfa_fffield.cpp b/xfa/fxfa/cxfa_fffield.cpp
index 6339da2..f4cd6dc 100644
--- a/xfa/fxfa/cxfa_fffield.cpp
+++ b/xfa/fxfa/cxfa_fffield.cpp
@@ -9,7 +9,6 @@
 #include <algorithm>
 #include <utility>
 
-#include "core/fxge/render_defines.h"
 #include "third_party/base/stl_util.h"
 #include "xfa/fwl/cfwl_edit.h"
 #include "xfa/fwl/cfwl_eventmouse.h"
@@ -106,7 +105,7 @@
     path.AddRectangle(m_UIRect.left, m_UIRect.top, m_UIRect.width,
                       m_UIRect.height);
 
-  pGS->FillPath(&path, FXFILL_WINDING, pMatrix);
+  pGS->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding, pMatrix);
 }
 
 void CXFA_FFField::DrawFocus(CXFA_Graphics* pGS, CFX_Matrix* pMatrix) {
diff --git a/xfa/fxfa/cxfa_ffpushbutton.cpp b/xfa/fxfa/cxfa_ffpushbutton.cpp
index 50b6e87..1bdcf56 100644
--- a/xfa/fxfa/cxfa_ffpushbutton.cpp
+++ b/xfa/fxfa/cxfa_ffpushbutton.cpp
@@ -8,7 +8,6 @@
 
 #include <utility>
 
-#include "core/fxge/render_defines.h"
 #include "xfa/fwl/cfwl_notedriver.h"
 #include "xfa/fwl/cfwl_pushbutton.h"
 #include "xfa/fwl/cfwl_widgetmgr.h"
@@ -223,7 +222,8 @@
       CXFA_GEPath path;
       path.AddRectangle(rtFill.left, rtFill.top, rtFill.width, rtFill.height);
       pGraphics->SetFillColor(CXFA_GEColor(ArgbEncode(128, 128, 255, 255)));
-      pGraphics->FillPath(&path, FXFILL_WINDING, &matrix);
+      pGraphics->FillPath(&path, CFX_FillRenderOptions::FillType::kWinding,
+                          &matrix);
     }
     return;
   }
diff --git a/xfa/fxfa/parser/cxfa_fill.cpp b/xfa/fxfa/parser/cxfa_fill.cpp
index 09f990a..ae92a66 100644
--- a/xfa/fxfa/parser/cxfa_fill.cpp
+++ b/xfa/fxfa/parser/cxfa_fill.cpp
@@ -8,7 +8,6 @@
 
 #include <memory>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_color.h"
 #include "xfa/fxfa/parser/cxfa_linear.h"
@@ -108,7 +107,8 @@
       break;
     default:
       pGS->SetFillColor(CXFA_GEColor(GetColor(false)));
-      pGS->FillPath(fillPath, FXFILL_WINDING, &matrix);
+      pGS->FillPath(fillPath, CFX_FillRenderOptions::FillType::kWinding,
+                    &matrix);
       break;
   }
 
diff --git a/xfa/fxfa/parser/cxfa_linear.cpp b/xfa/fxfa/parser/cxfa_linear.cpp
index 9239d73..db5c1dd 100644
--- a/xfa/fxfa/parser/cxfa_linear.cpp
+++ b/xfa/fxfa/parser/cxfa_linear.cpp
@@ -8,7 +8,6 @@
 
 #include <memory>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_color.h"
 #include "xfa/fxgraphics/cxfa_geshading.h"
@@ -87,6 +86,6 @@
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(&shading));
-  pGS->FillPath(fillPath, FXFILL_WINDING, &matrix);
+  pGS->FillPath(fillPath, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pGS->RestoreGraphState();
 }
diff --git a/xfa/fxfa/parser/cxfa_pattern.cpp b/xfa/fxfa/parser/cxfa_pattern.cpp
index fbb385a..7aaece9 100644
--- a/xfa/fxfa/parser/cxfa_pattern.cpp
+++ b/xfa/fxfa/parser/cxfa_pattern.cpp
@@ -8,7 +8,6 @@
 
 #include <memory>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_color.h"
 #include "xfa/fxgraphics/cxfa_gepattern.h"
@@ -83,6 +82,6 @@
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(&pattern, 0x0));
-  pGS->FillPath(fillPath, FXFILL_WINDING, &matrix);
+  pGS->FillPath(fillPath, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pGS->RestoreGraphState();
 }
diff --git a/xfa/fxfa/parser/cxfa_radial.cpp b/xfa/fxfa/parser/cxfa_radial.cpp
index 7f294cd..0dd8a08 100644
--- a/xfa/fxfa/parser/cxfa_radial.cpp
+++ b/xfa/fxfa/parser/cxfa_radial.cpp
@@ -9,7 +9,6 @@
 #include <memory>
 #include <utility>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_color.h"
 #include "xfa/fxgraphics/cxfa_geshading.h"
@@ -70,6 +69,6 @@
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(&shading));
-  pGS->FillPath(fillPath, FXFILL_WINDING, &matrix);
+  pGS->FillPath(fillPath, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pGS->RestoreGraphState();
 }
diff --git a/xfa/fxfa/parser/cxfa_rectangle.cpp b/xfa/fxfa/parser/cxfa_rectangle.cpp
index db53bfa..0a7d720 100644
--- a/xfa/fxfa/parser/cxfa_rectangle.cpp
+++ b/xfa/fxfa/parser/cxfa_rectangle.cpp
@@ -9,7 +9,6 @@
 #include <cmath>
 #include <utility>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_corner.h"
 #include "xfa/fxfa/parser/cxfa_stroke.h"
@@ -377,7 +376,8 @@
   pathLT.LineTo(CFX_PointF(rt.left + fLineWidth, fBottom - fLineWidth));
   pathLT.LineTo(CFX_PointF(rt.left, fBottom));
   pGraphic->SetFillColor(CXFA_GEColor(argbTopLeft));
-  pGraphic->FillPath(&pathLT, FXFILL_WINDING, &matrix);
+  pGraphic->FillPath(&pathLT, CFX_FillRenderOptions::FillType::kWinding,
+                     &matrix);
 
   CXFA_GEPath pathRB;
   pathRB.MoveTo(CFX_PointF(fRight, rt.top));
@@ -388,7 +388,8 @@
   pathRB.LineTo(CFX_PointF(fRight - fLineWidth, rt.top + fLineWidth));
   pathRB.LineTo(CFX_PointF(fRight, rt.top));
   pGraphic->SetFillColor(CXFA_GEColor(argbBottomRight));
-  pGraphic->FillPath(&pathRB, FXFILL_WINDING, &matrix);
+  pGraphic->FillPath(&pathRB, CFX_FillRenderOptions::FillType::kWinding,
+                     &matrix);
 }
 
 void CXFA_Rectangle::StrokeLowered(CXFA_Graphics* pGS,
@@ -403,7 +404,7 @@
   path.AddRectangle(rt.left, rt.top, rt.width, rt.height);
   path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height);
   pGS->SetFillColor(CXFA_GEColor(0xFF000000));
-  pGS->FillPath(&path, FXFILL_ALTERNATE, &matrix);
+  pGS->FillPath(&path, CFX_FillRenderOptions::FillType::kEvenOdd, &matrix);
 
   StrokeRect(pGS, rtInner, fHalfWidth, matrix, 0xFF808080, 0xFFC0C0C0);
 }
@@ -420,7 +421,7 @@
   path.AddRectangle(rt.left, rt.top, rt.width, rt.height);
   path.AddRectangle(rtInner.left, rtInner.top, rtInner.width, rtInner.height);
   pGS->SetFillColor(CXFA_GEColor(0xFF000000));
-  pGS->FillPath(&path, FXFILL_ALTERNATE, &matrix);
+  pGS->FillPath(&path, CFX_FillRenderOptions::FillType::kEvenOdd, &matrix);
 
   StrokeRect(pGS, rtInner, fHalfWidth, matrix, 0xFFFFFFFF, 0xFF808080);
 }
diff --git a/xfa/fxfa/parser/cxfa_stipple.cpp b/xfa/fxfa/parser/cxfa_stipple.cpp
index 063b2cf..f11b2f7 100644
--- a/xfa/fxfa/parser/cxfa_stipple.cpp
+++ b/xfa/fxfa/parser/cxfa_stipple.cpp
@@ -8,7 +8,6 @@
 
 #include <memory>
 
-#include "core/fxge/render_defines.h"
 #include "fxjs/xfa/cjx_node.h"
 #include "xfa/fxfa/parser/cxfa_color.h"
 
@@ -68,6 +67,6 @@
 
   pGS->SaveGraphState();
   pGS->SetFillColor(CXFA_GEColor(cr));
-  pGS->FillPath(fillPath, FXFILL_WINDING, &matrix);
+  pGS->FillPath(fillPath, CFX_FillRenderOptions::FillType::kWinding, &matrix);
   pGS->RestoreGraphState();
 }
diff --git a/xfa/fxgraphics/cxfa_graphics.cpp b/xfa/fxgraphics/cxfa_graphics.cpp
index f9818c5..ae5c4f1 100644
--- a/xfa/fxgraphics/cxfa_graphics.cpp
+++ b/xfa/fxgraphics/cxfa_graphics.cpp
@@ -10,7 +10,6 @@
 #include <memory>
 
 #include "core/fxge/cfx_defaultrenderdevice.h"
-#include "core/fxge/cfx_fillrenderoptions.h"
 #include "core/fxge/cfx_renderdevice.h"
 #include "core/fxge/cfx_unicodeencoding.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
@@ -175,10 +174,10 @@
 }
 
 void CXFA_Graphics::FillPath(CXFA_GEPath* path,
-                             FX_FillMode fillMode,
+                             CFX_FillRenderOptions::FillType fill_type,
                              const CFX_Matrix* matrix) {
   if (path)
-    RenderDeviceFillPath(path, fillMode, matrix);
+    RenderDeviceFillPath(path, fill_type, matrix);
 }
 
 void CXFA_Graphics::ConcatMatrix(const CFX_Matrix* matrix) {
@@ -219,14 +218,15 @@
                            CFX_FillRenderOptions());
 }
 
-void CXFA_Graphics::RenderDeviceFillPath(const CXFA_GEPath* path,
-                                         FX_FillMode fillMode,
-                                         const CFX_Matrix* matrix) {
+void CXFA_Graphics::RenderDeviceFillPath(
+    const CXFA_GEPath* path,
+    CFX_FillRenderOptions::FillType fill_type,
+    const CFX_Matrix* matrix) {
   CFX_Matrix m = m_info.CTM;
   if (matrix)
     m.Concat(*matrix);
 
-  const CFX_FillRenderOptions fill_options(GetFillType(fillMode));
+  const CFX_FillRenderOptions fill_options(fill_type);
   switch (m_info.fillColor.GetType()) {
     case CXFA_GEColor::Solid:
       m_renderDevice->DrawPath(path->GetPathData(), &m, &m_info.graphState,
diff --git a/xfa/fxgraphics/cxfa_graphics.h b/xfa/fxgraphics/cxfa_graphics.h
index 7135150..3680b6d 100644
--- a/xfa/fxgraphics/cxfa_graphics.h
+++ b/xfa/fxgraphics/cxfa_graphics.h
@@ -11,13 +11,10 @@
 #include <vector>
 
 #include "core/fxcrt/fx_system.h"
+#include "core/fxge/cfx_fillrenderoptions.h"
 #include "core/fxge/cfx_graphstatedata.h"
 #include "xfa/fxgraphics/cxfa_gecolor.h"
 
-using FX_FillMode = int32_t;
-
-struct CFX_FillRenderOptions;
-
 enum class FX_HatchStyle {
   Horizontal = 0,
   Vertical = 1,
@@ -53,7 +50,7 @@
   void SetClipRect(const CFX_RectF& rect);
   void StrokePath(CXFA_GEPath* path, const CFX_Matrix* matrix);
   void FillPath(CXFA_GEPath* path,
-                FX_FillMode fillMode,
+                CFX_FillRenderOptions::FillType fill_type,
                 const CFX_Matrix* matrix);
   void ConcatMatrix(const CFX_Matrix* matrix);
 
@@ -73,7 +70,7 @@
   void RenderDeviceStrokePath(const CXFA_GEPath* path,
                               const CFX_Matrix* matrix);
   void RenderDeviceFillPath(const CXFA_GEPath* path,
-                            FX_FillMode fillMode,
+                            CFX_FillRenderOptions::FillType fill_type,
                             const CFX_Matrix* matrix);
   void FillPathWithPattern(const CXFA_GEPath* path,
                            const CFX_FillRenderOptions& fill_options,