Nest FX_PATHPOINT as CFX_Path::Point.

Change-Id: I52bfa00a587d9ce14943587d8933f711513a172e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/81988
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
index 6156107..125d381 100644
--- a/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
+++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator.cpp
@@ -335,7 +335,7 @@
 // "h" closes the subpath (appends a line from current to starting point)
 void CPDF_PageContentGenerator::ProcessPathPoints(std::ostringstream* buf,
                                                   CPDF_Path* pPath) {
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   if (pPath->IsRect()) {
     CFX_PointF diff = points[2].m_Point - points[0].m_Point;
     *buf << points[0].m_Point << " " << diff << " re";
diff --git a/core/fpdfapi/page/cpdf_path.cpp b/core/fpdfapi/page/cpdf_path.cpp
index a0e1c90..86fb106 100644
--- a/core/fpdfapi/page/cpdf_path.cpp
+++ b/core/fpdfapi/page/cpdf_path.cpp
@@ -12,7 +12,7 @@
 
 CPDF_Path::~CPDF_Path() = default;
 
-const std::vector<FX_PATHPOINT>& CPDF_Path::GetPoints() const {
+const std::vector<CFX_Path::Point>& CPDF_Path::GetPoints() const {
   return m_Ref.GetObject()->GetPoints();
 }
 
diff --git a/core/fpdfapi/page/cpdf_path.h b/core/fpdfapi/page/cpdf_path.h
index 57b0d07..57ac3f1 100644
--- a/core/fpdfapi/page/cpdf_path.h
+++ b/core/fpdfapi/page/cpdf_path.h
@@ -22,7 +22,7 @@
   void Emplace() { m_Ref.Emplace(); }
   bool HasRef() const { return !!m_Ref; }
 
-  const std::vector<FX_PATHPOINT>& GetPoints() const;
+  const std::vector<CFX_Path::Point>& GetPoints() const;
   void ClosePath();
 
   CFX_PointF GetPoint(int index) const;
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.cpp b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
index 4cb27e6..9b9a06f 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.cpp
@@ -1438,13 +1438,13 @@
   } else if (m_PathPoints.empty()) {
     return;
   }
-  m_PathPoints.push_back(FX_PATHPOINT(CFX_PointF(x, y), type, close));
+  m_PathPoints.push_back(CFX_Path::Point(CFX_PointF(x, y), type, close));
 }
 
 void CPDF_StreamContentParser::AddPathObject(
     CFX_FillRenderOptions::FillType fill_type,
     bool bStroke) {
-  std::vector<FX_PATHPOINT> path_points;
+  std::vector<CFX_Path::Point> path_points;
   path_points.swap(m_PathPoints);
   CFX_FillRenderOptions::FillType path_clip_type = m_PathClipType;
   m_PathClipType = CFX_FillRenderOptions::FillType::kNoFill;
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h
index 706bf56..218a801 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser.h
+++ b/core/fpdfapi/page/cpdf_streamcontentparser.h
@@ -221,7 +221,7 @@
   std::stack<std::unique_ptr<CPDF_ContentMarks>> m_ContentMarksStack;
   std::vector<std::unique_ptr<CPDF_TextObject>> m_ClipTextList;
   UnownedPtr<const CPDF_TextObject> m_pLastTextObject;
-  std::vector<FX_PATHPOINT> m_PathPoints;
+  std::vector<CFX_Path::Point> m_PathPoints;
   float m_PathStartX = 0.0f;
   float m_PathStartY = 0.0f;
   float m_PathCurrentX = 0.0f;
diff --git a/core/fpdfapi/render/cpdf_rendershading.cpp b/core/fpdfapi/render/cpdf_rendershading.cpp
index ff0a08f..852e123 100644
--- a/core/fpdfapi/render/cpdf_rendershading.cpp
+++ b/core/fpdfapi/render/cpdf_rendershading.cpp
@@ -581,7 +581,7 @@
     y.BezierInterpol(C1.y, C2.y, D1.y, D2.y);
   }
 
-  void GetPoints(pdfium::span<FX_PATHPOINT> path_points) {
+  void GetPoints(pdfium::span<CFX_Path::Point> path_points) {
     constexpr size_t kPointsCount = 4;
     float points_x[kPointsCount];
     float points_y[kPointsCount];
@@ -591,7 +591,7 @@
       path_points[i].m_Point = {points_x[i], points_y[i]};
   }
 
-  void GetPointsReverse(pdfium::span<FX_PATHPOINT> path_points) {
+  void GetPointsReverse(pdfium::span<CFX_Path::Point> path_points) {
     constexpr size_t kPointsCount = 4;
     float points_x[kPointsCount];
     float points_y[kPointsCount];
@@ -701,7 +701,7 @@
     if (bSmall ||
         (d_bottom < COONCOLOR_THRESHOLD && d_left < COONCOLOR_THRESHOLD &&
          d_top < COONCOLOR_THRESHOLD && d_right < COONCOLOR_THRESHOLD)) {
-      pdfium::span<FX_PATHPOINT> points = path.GetPoints();
+      pdfium::span<CFX_Path::Point> points = path.GetPoints();
       C1.GetPoints(points.subspan(0, 4));
       D2.GetPoints(points.subspan(3, 4));
       C2.GetPointsReverse(points.subspan(6, 4));
diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp
index 2cdf740..e37998d 100644
--- a/core/fxge/agg/fx_agg_driver.cpp
+++ b/core/fxge/agg/fx_agg_driver.cpp
@@ -967,7 +967,7 @@
 void BuildAggPath(const CFX_Path* pPath,
                   const CFX_Matrix* pObject2Device,
                   agg::path_storage& agg_path) {
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   for (size_t i = 0; i < points.size(); ++i) {
     CFX_PointF pos = points[i].m_Point;
     if (pObject2Device)
diff --git a/core/fxge/cfx_font.cpp b/core/fxge/cfx_font.cpp
index 77fe8a2..ed87968 100644
--- a/core/fxge/cfx_font.cpp
+++ b/core/fxge/cfx_font.cpp
@@ -61,7 +61,7 @@
 void Outline_CheckEmptyContour(OUTLINE_PARAMS* param) {
   size_t size;
   {
-    pdfium::span<const FX_PATHPOINT> points = param->m_pPath->GetPoints();
+    pdfium::span<const CFX_Path::Point> points = param->m_pPath->GetPoints();
     size = points.size();
 
     if (size >= 2 && points[size - 2].IsTypeAndOpen(FXPT_TYPE::MoveTo) &&
diff --git a/core/fxge/cfx_path.cpp b/core/fxge/cfx_path.cpp
index 3fed719..5d4b29b 100644
--- a/core/fxge/cfx_path.cpp
+++ b/core/fxge/cfx_path.cpp
@@ -15,7 +15,7 @@
 
 namespace {
 
-bool IsRectPreTransform(const std::vector<FX_PATHPOINT>& points) {
+bool IsRectPreTransform(const std::vector<CFX_Path::Point>& points) {
   if (points.size() != 5 && points.size() != 4)
     return false;
 
@@ -38,7 +38,7 @@
   return p1.x != p2.x && p1.y != p2.y;
 }
 
-bool IsRectImpl(const std::vector<FX_PATHPOINT>& points) {
+bool IsRectImpl(const std::vector<CFX_Path::Point>& points) {
   if (!IsRectPreTransform(points))
     return false;
 
@@ -59,18 +59,18 @@
   return rect;
 }
 
-bool PathPointsNeedNormalization(const std::vector<FX_PATHPOINT>& points) {
+bool PathPointsNeedNormalization(const std::vector<CFX_Path::Point>& points) {
   return points.size() > 5;
 }
 
-std::vector<FX_PATHPOINT> GetNormalizedPoints(
-    const std::vector<FX_PATHPOINT>& points) {
+std::vector<CFX_Path::Point> GetNormalizedPoints(
+    const std::vector<CFX_Path::Point>& points) {
   DCHECK(PathPointsNeedNormalization(points));
 
   if (points[0].m_Point != points.back().m_Point)
     return {};
 
-  std::vector<FX_PATHPOINT> normalized;
+  std::vector<CFX_Path::Point> normalized;
   normalized.reserve(6);
   normalized.push_back(points[0]);
   for (auto it = points.begin() + 1; it != points.end(); ++it) {
@@ -245,14 +245,14 @@
 
 }  // namespace
 
-FX_PATHPOINT::FX_PATHPOINT() = default;
+CFX_Path::Point::Point() = default;
 
-FX_PATHPOINT::FX_PATHPOINT(const CFX_PointF& point, FXPT_TYPE type, bool close)
+CFX_Path::Point::Point(const CFX_PointF& point, FXPT_TYPE type, bool close)
     : m_Point(point), m_Type(type), m_CloseFigure(close) {}
 
-FX_PATHPOINT::FX_PATHPOINT(const FX_PATHPOINT& other) = default;
+CFX_Path::Point::Point(const Point& other) = default;
 
-FX_PATHPOINT::~FX_PATHPOINT() = default;
+CFX_Path::Point::~Point() = default;
 
 CFX_Path::CFX_Path() = default;
 
@@ -287,11 +287,11 @@
 }
 
 void CFX_Path::AppendPoint(const CFX_PointF& point, FXPT_TYPE type) {
-  m_Points.push_back(FX_PATHPOINT(point, type, /*close=*/false));
+  m_Points.push_back(Point(point, type, /*close=*/false));
 }
 
 void CFX_Path::AppendPointAndClose(const CFX_PointF& point, FXPT_TYPE type) {
-  m_Points.push_back(FX_PATHPOINT(point, type, /*close=*/true));
+  m_Points.push_back(Point(point, type, /*close=*/true));
 }
 
 void CFX_Path::AppendLine(const CFX_PointF& pt1, const CFX_PointF& pt2) {
@@ -392,11 +392,10 @@
 
 Optional<CFX_FloatRect> CFX_Path::GetRect(const CFX_Matrix* matrix) const {
   bool do_normalize = PathPointsNeedNormalization(m_Points);
-  std::vector<FX_PATHPOINT> normalized;
+  std::vector<Point> normalized;
   if (do_normalize)
     normalized = GetNormalizedPoints(m_Points);
-  const std::vector<FX_PATHPOINT>& path_points =
-      do_normalize ? normalized : m_Points;
+  const std::vector<Point>& path_points = do_normalize ? normalized : m_Points;
 
   if (!matrix) {
     if (!IsRectImpl(path_points))
diff --git a/core/fxge/cfx_path.h b/core/fxge/cfx_path.h
index b0560d1..c3a1c53 100644
--- a/core/fxge/cfx_path.h
+++ b/core/fxge/cfx_path.h
@@ -16,24 +16,24 @@
 
 enum class FXPT_TYPE : uint8_t { LineTo, BezierTo, MoveTo };
 
-class FX_PATHPOINT {
- public:
-  FX_PATHPOINT();
-  FX_PATHPOINT(const CFX_PointF& point, FXPT_TYPE type, bool close);
-  FX_PATHPOINT(const FX_PATHPOINT& other);
-  ~FX_PATHPOINT();
-
-  bool IsTypeAndOpen(FXPT_TYPE type) const {
-    return m_Type == type && !m_CloseFigure;
-  }
-
-  CFX_PointF m_Point;
-  FXPT_TYPE m_Type;
-  bool m_CloseFigure;
-};
-
 class CFX_Path {
  public:
+  class Point {
+   public:
+    Point();
+    Point(const CFX_PointF& point, FXPT_TYPE type, bool close);
+    Point(const Point& other);
+    ~Point();
+
+    bool IsTypeAndOpen(FXPT_TYPE type) const {
+      return m_Type == type && !m_CloseFigure;
+    }
+
+    CFX_PointF m_Point;
+    FXPT_TYPE m_Type;
+    bool m_CloseFigure;
+  };
+
   CFX_Path();
   CFX_Path(const CFX_Path& src);
   CFX_Path(CFX_Path&& src) noexcept;
@@ -47,8 +47,8 @@
   }
 
   CFX_PointF GetPoint(int index) const { return m_Points[index].m_Point; }
-  const std::vector<FX_PATHPOINT>& GetPoints() const { return m_Points; }
-  std::vector<FX_PATHPOINT>& GetPoints() { return m_Points; }
+  const std::vector<Point>& GetPoints() const { return m_Points; }
+  std::vector<Point>& GetPoints() { return m_Points; }
 
   CFX_FloatRect GetBoundingBox() const;
   CFX_FloatRect GetBoundingBoxForStrokePath(float line_width,
@@ -67,7 +67,7 @@
   void ClosePath();
 
  private:
-  std::vector<FX_PATHPOINT> m_Points;
+  std::vector<Point> m_Points;
 };
 
 class CFX_RetainablePath final : public Retainable, public CFX_Path {
diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp
index 3ab703d..d60b341 100644
--- a/core/fxge/cfx_renderdevice.cpp
+++ b/core/fxge/cfx_renderdevice.cpp
@@ -317,7 +317,7 @@
 
 // Returns true if the path is a 3-point path that draws A->B->A and forms a
 // zero area, or a 2-point path which draws A->B.
-bool CheckSimpleLinePath(pdfium::span<const FX_PATHPOINT> points,
+bool CheckSimpleLinePath(pdfium::span<const CFX_Path::Point> points,
                          const CFX_Matrix* matrix,
                          bool adjust,
                          CFX_Path* new_path,
@@ -359,7 +359,7 @@
 
 // Returns true if `points` is palindromic and forms zero area. Otherwise,
 // returns false.
-bool CheckPalindromicPath(pdfium::span<const FX_PATHPOINT> points,
+bool CheckPalindromicPath(pdfium::span<const CFX_Path::Point> points,
                           CFX_Path* new_path,
                           bool* thin) {
   if (points.size() <= 3 || !(points.size() % 2))
@@ -406,7 +406,7 @@
          (a.y - b.y) * (c.x - b.x) == (c.y - b.y) * (a.x - b.x);
 }
 
-bool GetZeroAreaPath(pdfium::span<const FX_PATHPOINT> points,
+bool GetZeroAreaPath(pdfium::span<const CFX_Path::Point> points,
                      const CFX_Matrix* matrix,
                      bool adjust,
                      CFX_Path* new_path,
@@ -440,17 +440,17 @@
 
     DCHECK_EQ(point_type, FXPT_TYPE::LineTo);
     int next_index = (i + 1) % (points.size());
-    const FX_PATHPOINT& next = points[next_index];
+    const CFX_Path::Point& next = points[next_index];
     if (next.m_Type == FXPT_TYPE::BezierTo || next.m_Type == FXPT_TYPE::MoveTo)
       continue;
 
-    const FX_PATHPOINT& prev = points[i - 1];
-    const FX_PATHPOINT& cur = points[i];
+    const CFX_Path::Point& prev = points[i - 1];
+    const CFX_Path::Point& cur = points[i];
     if (IsFoldingVerticalLine(prev.m_Point, cur.m_Point, next.m_Point)) {
       bool use_prev = fabs(cur.m_Point.y - prev.m_Point.y) <
                       fabs(cur.m_Point.y - next.m_Point.y);
-      const FX_PATHPOINT& start = use_prev ? prev : cur;
-      const FX_PATHPOINT& end = use_prev ? points[next_index - 1] : next;
+      const CFX_Path::Point& start = use_prev ? prev : cur;
+      const CFX_Path::Point& end = use_prev ? points[next_index - 1] : next;
       new_path->AppendPoint(start.m_Point, FXPT_TYPE::MoveTo);
       new_path->AppendPoint(end.m_Point, FXPT_TYPE::LineTo);
       continue;
@@ -460,8 +460,8 @@
         IsFoldingDiagonalLine(prev.m_Point, cur.m_Point, next.m_Point)) {
       bool use_prev = fabs(cur.m_Point.x - prev.m_Point.x) <
                       fabs(cur.m_Point.x - next.m_Point.x);
-      const FX_PATHPOINT& start = use_prev ? prev : cur;
-      const FX_PATHPOINT& end = use_prev ? points[next_index - 1] : next;
+      const CFX_Path::Point& start = use_prev ? prev : cur;
+      const CFX_Path::Point& end = use_prev ? points[next_index - 1] : next;
       new_path->AppendPoint(start.m_Point, FXPT_TYPE::MoveTo);
       new_path->AppendPoint(end.m_Point, FXPT_TYPE::LineTo);
       continue;
@@ -632,7 +632,7 @@
       fill_options.fill_type != CFX_FillRenderOptions::FillType::kNoFill;
   uint8_t fill_alpha = fill ? FXARGB_A(fill_color) : 0;
   uint8_t stroke_alpha = pGraphState ? FXARGB_A(stroke_color) : 0;
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   if (stroke_alpha == 0 && points.size() == 2) {
     CFX_PointF pos1 = points[0].m_Point;
     CFX_PointF pos2 = points[1].m_Point;
@@ -692,7 +692,7 @@
   if (fill && stroke_alpha == 0 && !fill_options.stroke &&
       !fill_options.text_mode) {
     bool adjust = !!m_pDeviceDriver->GetDriverType();
-    std::vector<FX_PATHPOINT> sub_path;
+    std::vector<CFX_Path::Point> sub_path;
     for (size_t i = 0; i < points.size(); i++) {
       FXPT_TYPE point_type = points[i].m_Type;
       if (point_type == FXPT_TYPE::MoveTo) {
@@ -840,13 +840,14 @@
                                    fill_options, blend_type);
 }
 
-void CFX_RenderDevice::DrawZeroAreaPath(const std::vector<FX_PATHPOINT>& path,
-                                        const CFX_Matrix* matrix,
-                                        bool adjust,
-                                        bool aliased_path,
-                                        uint32_t fill_color,
-                                        uint8_t fill_alpha,
-                                        BlendMode blend_type) {
+void CFX_RenderDevice::DrawZeroAreaPath(
+    const std::vector<CFX_Path::Point>& path,
+    const CFX_Matrix* matrix,
+    bool adjust,
+    bool aliased_path,
+    uint32_t fill_color,
+    uint8_t fill_alpha,
+    BlendMode blend_type) {
   if (path.empty())
     return;
 
diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h
index 95f44a4..34afef5 100644
--- a/core/fxge/cfx_renderdevice.h
+++ b/core/fxge/cfx_renderdevice.h
@@ -14,6 +14,7 @@
 #include "core/fxcrt/fx_coordinates.h"
 #include "core/fxcrt/retain_ptr.h"
 #include "core/fxcrt/unowned_ptr.h"
+#include "core/fxge/cfx_path.h"
 #include "core/fxge/dib/fx_dib.h"
 #include "core/fxge/render_defines.h"
 #include "core/fxge/renderdevicedriver_iface.h"
@@ -23,8 +24,6 @@
 class CFX_Font;
 class CFX_GraphStateData;
 class CFX_ImageRenderer;
-class CFX_Path;
-class FX_PATHPOINT;
 class PauseIndicatorIface;
 class TextCharPos;
 struct CFX_Color;
@@ -244,7 +243,7 @@
                         uint32_t color,
                         const CFX_FillRenderOptions& fill_options,
                         BlendMode blend_type);
-  void DrawZeroAreaPath(const std::vector<FX_PATHPOINT>& path,
+  void DrawZeroAreaPath(const std::vector<CFX_Path::Point>& path,
                         const CFX_Matrix* matrix,
                         bool adjust,
                         bool aliased_path,
diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp
index 908b45d..1601c65 100644
--- a/core/fxge/skia/fx_skia_device.cpp
+++ b/core/fxge/skia/fx_skia_device.cpp
@@ -327,7 +327,7 @@
 
 SkPath BuildPath(const CFX_Path* pPath) {
   SkPath sk_path;
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   for (size_t i = 0; i < points.size(); ++i) {
     const CFX_PointF& point = points[i].m_Point;
     FXPT_TYPE point_type = points[i].m_Type;
diff --git a/core/fxge/win32/cgdi_device_driver.cpp b/core/fxge/win32/cgdi_device_driver.cpp
index fe57ca8..597894b 100644
--- a/core/fxge/win32/cgdi_device_driver.cpp
+++ b/core/fxge/win32/cgdi_device_driver.cpp
@@ -109,7 +109,7 @@
 void SetPathToDC(HDC hDC, const CFX_Path* pPath, const CFX_Matrix* pMatrix) {
   BeginPath(hDC);
 
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   for (size_t i = 0; i < points.size(); ++i) {
     CFX_PointF pos = points[i].m_Point;
     if (pMatrix)
diff --git a/core/fxge/win32/cgdi_plus_ext.cpp b/core/fxge/win32/cgdi_plus_ext.cpp
index 3bce828..b2e3834 100644
--- a/core/fxge/win32/cgdi_plus_ext.cpp
+++ b/core/fxge/win32/cgdi_plus_ext.cpp
@@ -675,7 +675,7 @@
                            uint32_t fill_argb,
                            uint32_t stroke_argb,
                            const CFX_FillRenderOptions& fill_options) {
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   if (points.empty())
     return true;
 
diff --git a/fpdfsdk/cpdfsdk_helpers.h b/fpdfsdk/cpdfsdk_helpers.h
index 126fa7f..baaf411 100644
--- a/fpdfsdk/cpdfsdk_helpers.h
+++ b/fpdfsdk/cpdfsdk_helpers.h
@@ -13,6 +13,7 @@
 #include "core/fpdfapi/page/cpdf_page.h"
 #include "core/fpdfapi/parser/cpdf_parser.h"
 #include "core/fxcrt/retain_ptr.h"
+#include "core/fxge/cfx_path.h"
 #include "core/fxge/dib/cfx_dibitmap.h"
 #include "public/fpdf_doc.h"
 #include "public/fpdf_ext.h"
@@ -38,7 +39,6 @@
 class CPDF_TextPageFind;
 class CPDFSDK_FormFillEnvironment;
 class CPDFSDK_InteractiveForm;
-class FX_PATHPOINT;
 struct CPDF_JavaScript;
 
 // Conversions to/from underlying types.
@@ -158,12 +158,12 @@
 }
 
 inline FPDF_PATHSEGMENT FPDFPathSegmentFromFXPathPoint(
-    const FX_PATHPOINT* segment) {
+    const CFX_Path::Point* segment) {
   return reinterpret_cast<FPDF_PATHSEGMENT>(segment);
 }
-inline const FX_PATHPOINT* FXPathPointFromFPDFPathSegment(
+inline const CFX_Path::Point* FXPathPointFromFPDFPathSegment(
     FPDF_PATHSEGMENT segment) {
-  return reinterpret_cast<const FX_PATHPOINT*>(segment);
+  return reinterpret_cast<const CFX_Path::Point*>(segment);
 }
 
 inline FPDF_STRUCTTREE FPDFStructTreeFromCPDFStructTree(
diff --git a/fpdfsdk/fpdf_editpath.cpp b/fpdfsdk/fpdf_editpath.cpp
index 7e3048b..e65982a 100644
--- a/fpdfsdk/fpdf_editpath.cpp
+++ b/fpdfsdk/fpdf_editpath.cpp
@@ -81,7 +81,7 @@
   if (!pPathObj)
     return nullptr;
 
-  pdfium::span<const FX_PATHPOINT> points = pPathObj->path().GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPathObj->path().GetPoints();
   if (!pdfium::IndexInBounds(points, index))
     return nullptr;
 
diff --git a/fpdfsdk/fpdf_transformpage.cpp b/fpdfsdk/fpdf_transformpage.cpp
index 1ee16ff..9f6ed57 100644
--- a/fpdfsdk/fpdf_transformpage.cpp
+++ b/fpdfsdk/fpdf_transformpage.cpp
@@ -68,7 +68,7 @@
   if (!pPath)
     return;
 
-  pdfium::span<const FX_PATHPOINT> points = pPath->GetPoints();
+  pdfium::span<const CFX_Path::Point> points = pPath->GetPoints();
   if (path.IsRect()) {
     CFX_PointF diff = points[2].m_Point - points[0].m_Point;
     buf << points[0].m_Point.x << " " << points[0].m_Point.y << " " << diff.x
@@ -351,7 +351,7 @@
     return nullptr;
   }
 
-  pdfium::span<const FX_PATHPOINT> points =
+  pdfium::span<const CFX_Path::Point> points =
       pClipPath->GetPath(path_index).GetPoints();
   if (!pdfium::IndexInBounds(points, segment_index))
     return nullptr;