Remove deprecated fpdf_edit APIs.

The following APIs were marked as deprecated a year ago in
https://pdfium-review.googlesource.com/32711. Remove them and update
callers in PDFium tests to use the replacement APIs.

FPDFPath_GetFillColor
FPDFPath_GetStrokeColor
FPDFPath_SetFillColor
FPDFPath_SetLineCap
FPDFPath_SetLineJoin
FPDFPath_SetStrokeColor
FPDFPath_SetStrokeWidth
FPDFText_SetFillColor

Change-Id: I824bfab9e35ba3cc7561a378c471fb6225836fc4
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/54070
Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
index 2e90c6c..595f595 100644
--- a/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
+++ b/core/fpdfapi/parser/cpdf_security_handler_embeddertest.cpp
@@ -80,7 +80,7 @@
     ASSERT_TRUE(page);
     FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(10, 10, 20, 20);
     ASSERT_TRUE(red_rect);
-    EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+    EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
     EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
     FPDFPage_InsertObject(page, red_rect);
     ScopedFPDFBitmap bitmap = RenderLoadedPage(page);
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp
index d03da65..c34d59e 100644
--- a/fpdfsdk/fpdf_annot_embeddertest.cpp
+++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -727,7 +727,7 @@
     EXPECT_TRUE(path);
 
     // Modify the color of the path object.
-    EXPECT_TRUE(FPDFPath_SetStrokeColor(path, 0, 0, 0, 255));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeColor(path, 0, 0, 0, 255));
     EXPECT_TRUE(FPDFAnnot_UpdateObject(annot.get(), path));
 
     // Check that the page with the modified annotation renders correctly.
@@ -739,8 +739,8 @@
     // Add a second path object to the same annotation.
     FPDF_PAGEOBJECT dot = FPDFPageObj_CreateNewPath(7, 84);
     EXPECT_TRUE(FPDFPath_BezierTo(dot, 9, 86, 10, 87, 11, 88));
-    EXPECT_TRUE(FPDFPath_SetStrokeColor(dot, 255, 0, 0, 100));
-    EXPECT_TRUE(FPDFPath_SetStrokeWidth(dot, 14));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeColor(dot, 255, 0, 0, 100));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeWidth(dot, 14));
     EXPECT_TRUE(FPDFPath_SetDrawMode(dot, 0, 1));
     EXPECT_TRUE(FPDFAnnot_AppendObject(annot.get(), dot));
     EXPECT_EQ(2, FPDFAnnot_GetObjectCount(annot.get()));
@@ -785,8 +785,8 @@
     EXPECT_TRUE(FPDFPath_LineTo(check, 500, 600));
     EXPECT_TRUE(FPDFPath_MoveTo(check, 350, 550));
     EXPECT_TRUE(FPDFPath_LineTo(check, 450, 450));
-    EXPECT_TRUE(FPDFPath_SetStrokeColor(check, 0, 255, 255, 180));
-    EXPECT_TRUE(FPDFPath_SetStrokeWidth(check, 8.35f));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeColor(check, 0, 255, 255, 180));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeWidth(check, 8.35f));
     EXPECT_TRUE(FPDFPath_SetDrawMode(check, 0, 1));
     EXPECT_TRUE(FPDFAnnot_AppendObject(annot.get(), check));
     EXPECT_EQ(1, FPDFAnnot_GetObjectCount(annot.get()));
@@ -1014,7 +1014,7 @@
     ScopedFPDFWideString text =
         GetFPDFWideString(L"I'm a translucent text laying on other text.");
     EXPECT_TRUE(FPDFText_SetText(text_object, text.get()));
-    EXPECT_TRUE(FPDFText_SetFillColor(text_object, 0, 0, 255, 150));
+    EXPECT_TRUE(FPDFPageObj_SetFillColor(text_object, 0, 0, 255, 150));
     FPDFPageObj_Transform(text_object, 1, 0, 0, 1, 200, 600);
     EXPECT_TRUE(FPDFAnnot_AppendObject(annot.get(), text_object));
   }
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp
index 66e8962..ccea1a1 100644
--- a/fpdfsdk/fpdf_edit_embeddertest.cpp
+++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -244,11 +244,11 @@
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(10, 10, 20, 20);
   ASSERT_TRUE(red_rect);
   // Expect false when trying to set colors out of range
-  EXPECT_FALSE(FPDFPath_SetStrokeColor(red_rect, 100, 100, 100, 300));
-  EXPECT_FALSE(FPDFPath_SetFillColor(red_rect, 200, 256, 200, 0));
+  EXPECT_FALSE(FPDFPageObj_SetStrokeColor(red_rect, 100, 100, 100, 300));
+  EXPECT_FALSE(FPDFPageObj_SetFillColor(red_rect, 200, 256, 200, 0));
 
   // Fill rectangle with red and insert to the page
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
 
   int fillmode = FPDF_FILLMODE_NONE;
@@ -304,7 +304,7 @@
 
   // Now add to that a green rectangle with some medium alpha
   FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(100, 100, 40, 40);
-  EXPECT_TRUE(FPDFPath_SetFillColor(green_rect, 0, 255, 0, 128));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(green_rect, 0, 255, 0, 128));
 
   // Make sure the type of the rectangle is a path.
   EXPECT_EQ(FPDF_PAGEOBJ_PATH, FPDFPageObj_GetType(green_rect));
@@ -314,7 +314,7 @@
   unsigned int G;
   unsigned int B;
   unsigned int A;
-  EXPECT_TRUE(FPDFPath_GetFillColor(green_rect, &R, &G, &B, &A));
+  EXPECT_TRUE(FPDFPageObj_GetFillColor(green_rect, &R, &G, &B, &A));
   EXPECT_EQ(0u, R);
   EXPECT_EQ(255u, G);
   EXPECT_EQ(0u, B);
@@ -367,7 +367,7 @@
 
   // Add a black triangle.
   FPDF_PAGEOBJECT black_path = FPDFPageObj_CreateNewPath(400, 100);
-  EXPECT_TRUE(FPDFPath_SetFillColor(black_path, 0, 0, 0, 200));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(black_path, 0, 0, 0, 200));
   EXPECT_TRUE(FPDFPath_SetDrawMode(black_path, FPDF_FILLMODE_ALTERNATE, 0));
   EXPECT_TRUE(FPDFPath_LineTo(black_path, 400, 200));
   EXPECT_TRUE(FPDFPath_LineTo(black_path, 300, 100));
@@ -407,7 +407,7 @@
 
   // Now add a more complex blue path.
   FPDF_PAGEOBJECT blue_path = FPDFPageObj_CreateNewPath(200, 200);
-  EXPECT_TRUE(FPDFPath_SetFillColor(blue_path, 0, 0, 255, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(blue_path, 0, 0, 255, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(blue_path, FPDF_FILLMODE_WINDING, 0));
   EXPECT_TRUE(FPDFPath_LineTo(blue_path, 230, 230));
   EXPECT_TRUE(FPDFPath_BezierTo(blue_path, 250, 250, 280, 280, 300, 300));
@@ -1422,7 +1422,7 @@
   // Add a red rectangle.
   ASSERT_EQ(2, FPDFPage_CountObjects(page));
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(20, 100, 50, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect);
 
@@ -1451,7 +1451,7 @@
   // Add a red rectangle.
   ASSERT_EQ(2, FPDFPage_CountObjects(page));
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(20, 100, 50, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 100, 100, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 100, 100, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect);
 
@@ -1460,7 +1460,7 @@
 
   // Generate content but change it again
   EXPECT_TRUE(FPDFPage_GenerateContent(page));
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
 
   // Save the file
   EXPECT_TRUE(FPDFPage_GenerateContent(page));
@@ -1491,7 +1491,7 @@
   // Add a black rectangle.
   ASSERT_EQ(kOriginalObjectCount, FPDFPage_CountObjects(page));
   FPDF_PAGEOBJECT black_rect = FPDFPageObj_CreateNewRect(20, 100, 50, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(black_rect, 0, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(black_rect, 0, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(black_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, black_rect);
 
@@ -1565,7 +1565,7 @@
   // Add a red rectangle.
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(10, 10, 20, 20);
   ASSERT_TRUE(red_rect);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect);
   const char kRedRectangleMD5[] = "66d02eaa6181e2c069ce2ea99beda497";
@@ -1626,13 +1626,13 @@
 
   // Add an opaque rectangle on top of some of the text.
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(20, 100, 50, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect);
 
   // Add a transparent triangle on top of other part of the text.
   FPDF_PAGEOBJECT black_path = FPDFPageObj_CreateNewPath(20, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(black_path, 0, 0, 0, 100));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(black_path, 0, 0, 0, 100));
   EXPECT_TRUE(FPDFPath_SetDrawMode(black_path, FPDF_FILLMODE_ALTERNATE, 0));
   EXPECT_TRUE(FPDFPath_LineTo(black_path, 30, 80));
   EXPECT_TRUE(FPDFPath_LineTo(black_path, 40, 10));
@@ -1660,13 +1660,13 @@
 
   // Add a transparent rectangle on top of the existing content
   FPDF_PAGEOBJECT red_rect2 = FPDFPageObj_CreateNewRect(90, 700, 25, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect2, 255, 0, 0, 100));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect2, 255, 0, 0, 100));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect2, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect2);
 
   // Add an opaque rectangle on top of the existing content
   FPDF_PAGEOBJECT red_rect = FPDFPageObj_CreateNewRect(115, 700, 25, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(red_rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(red_rect, 255, 0, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(red_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(page, red_rect);
 
@@ -1686,13 +1686,13 @@
   ClearString();
   // Add another opaque rectangle on top of the existing content
   FPDF_PAGEOBJECT green_rect = FPDFPageObj_CreateNewRect(150, 700, 25, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(green_rect, 0, 255, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(green_rect, 0, 255, 0, 255));
   EXPECT_TRUE(FPDFPath_SetDrawMode(green_rect, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(saved_page, green_rect);
 
   // Add another transparent rectangle on top of existing content
   FPDF_PAGEOBJECT green_rect2 = FPDFPageObj_CreateNewRect(175, 700, 25, 50);
-  EXPECT_TRUE(FPDFPath_SetFillColor(green_rect2, 0, 255, 0, 100));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(green_rect2, 0, 255, 0, 100));
   EXPECT_TRUE(FPDFPath_SetDrawMode(green_rect2, FPDF_FILLMODE_ALTERNATE, 0));
   FPDFPage_InsertObject(saved_page, green_rect2);
   const char kLastMD5[] = "4b5b00f824620f8c9b8801ebb98e1cdd";
@@ -1718,9 +1718,9 @@
 
   // Add a large stroked rectangle (fill color should not affect it).
   FPDF_PAGEOBJECT rect = FPDFPageObj_CreateNewRect(20, 20, 200, 400);
-  EXPECT_TRUE(FPDFPath_SetFillColor(rect, 255, 0, 0, 255));
-  EXPECT_TRUE(FPDFPath_SetStrokeColor(rect, 0, 255, 0, 255));
-  EXPECT_TRUE(FPDFPath_SetStrokeWidth(rect, 15.0f));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(rect, 255, 0, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeColor(rect, 0, 255, 0, 255));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeWidth(rect, 15.0f));
 
   float width = 0;
   EXPECT_TRUE(FPDFPageObj_GetStrokeWidth(rect, &width));
@@ -1740,8 +1740,8 @@
   EXPECT_TRUE(FPDFPath_LineTo(check, 600, 600));
   EXPECT_TRUE(FPDFPath_MoveTo(check, 400, 600));
   EXPECT_TRUE(FPDFPath_LineTo(check, 600, 400));
-  EXPECT_TRUE(FPDFPath_SetStrokeColor(check, 128, 128, 128, 180));
-  EXPECT_TRUE(FPDFPath_SetStrokeWidth(check, 8.35f));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeColor(check, 128, 128, 128, 180));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeWidth(check, 8.35f));
   EXPECT_TRUE(FPDFPath_SetDrawMode(check, 0, 1));
   FPDFPage_InsertObject(page, check);
   {
@@ -1756,9 +1756,9 @@
   EXPECT_TRUE(FPDFPath_LineTo(path, 255, 305));
   EXPECT_TRUE(FPDFPath_BezierTo(path, 325, 233, 325, 166, 255, 105));
   EXPECT_TRUE(FPDFPath_Close(path));
-  EXPECT_TRUE(FPDFPath_SetFillColor(path, 200, 128, 128, 100));
-  EXPECT_TRUE(FPDFPath_SetStrokeColor(path, 128, 200, 128, 150));
-  EXPECT_TRUE(FPDFPath_SetStrokeWidth(path, 10.5f));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(path, 200, 128, 128, 100));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeColor(path, 128, 200, 128, 150));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeWidth(path, 10.5f));
   EXPECT_TRUE(FPDFPath_SetDrawMode(path, FPDF_FILLMODE_ALTERNATE, 1));
   FPDFPage_InsertObject(page, path);
   {
@@ -2075,7 +2075,7 @@
   FPDF_PAGEOBJECT text1 = FPDFPageObj_NewTextObj(document(), "Arial", 12.0f);
   // Only alpha, the last component, matters for the graphics dictionary. And
   // the default value is 255.
-  EXPECT_TRUE(FPDFText_SetFillColor(text1, 100, 100, 100, 255));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(text1, 100, 100, 100, 255));
   FPDFPage_InsertObject(page.get(), text1);
   EXPECT_TRUE(FPDFPage_GenerateContent(page.get()));
   EXPECT_EQ(2u, graphics_dict->size());
@@ -2085,14 +2085,14 @@
       FPDFPageObj_NewTextObj(document(), "Times-Roman", 12.0f);
   FPDFPage_InsertObject(page.get(), text2);
   FPDFPageObj_SetBlendMode(text2, "Darken");
-  EXPECT_TRUE(FPDFText_SetFillColor(text2, 0, 0, 255, 150));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(text2, 0, 0, 255, 150));
   EXPECT_TRUE(FPDFPage_GenerateContent(page.get()));
   EXPECT_EQ(3u, graphics_dict->size());
 
   // Add a path that should reuse graphics
   FPDF_PAGEOBJECT path = FPDFPageObj_CreateNewPath(400, 100);
   FPDFPageObj_SetBlendMode(path, "Darken");
-  EXPECT_TRUE(FPDFPath_SetFillColor(path, 200, 200, 100, 150));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(path, 200, 200, 100, 150));
   FPDFPage_InsertObject(page.get(), path);
   EXPECT_TRUE(FPDFPage_GenerateContent(page.get()));
   EXPECT_EQ(3u, graphics_dict->size());
@@ -2100,8 +2100,8 @@
   // Add a rect increasing the size of the graphics dictionary
   FPDF_PAGEOBJECT rect2 = FPDFPageObj_CreateNewRect(10, 10, 100, 100);
   FPDFPageObj_SetBlendMode(rect2, "Darken");
-  EXPECT_TRUE(FPDFPath_SetFillColor(rect2, 0, 0, 255, 150));
-  EXPECT_TRUE(FPDFPath_SetStrokeColor(rect2, 0, 0, 0, 200));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(rect2, 0, 0, 255, 150));
+  EXPECT_TRUE(FPDFPageObj_SetStrokeColor(rect2, 0, 0, 0, 200));
   FPDFPage_InsertObject(page.get(), rect2);
   EXPECT_TRUE(FPDFPage_GenerateContent(page.get()));
   EXPECT_EQ(4u, graphics_dict->size());
@@ -2113,7 +2113,7 @@
 
   // Add a red rectangle with some non-default alpha
   FPDF_PAGEOBJECT rect = FPDFPageObj_CreateNewRect(10, 10, 100, 100);
-  EXPECT_TRUE(FPDFPath_SetFillColor(rect, 255, 0, 0, 128));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(rect, 255, 0, 0, 128));
   EXPECT_TRUE(FPDFPath_SetDrawMode(rect, FPDF_FILLMODE_WINDING, 0));
   FPDFPage_InsertObject(page, rect);
   EXPECT_TRUE(FPDFPage_GenerateContent(page));
@@ -2132,7 +2132,7 @@
   }
 
   // Never mind, my new favorite color is blue, increase alpha
-  EXPECT_TRUE(FPDFPath_SetFillColor(rect, 0, 0, 255, 180));
+  EXPECT_TRUE(FPDFPageObj_SetFillColor(rect, 0, 0, 255, 180));
   EXPECT_TRUE(FPDFPage_GenerateContent(page));
   EXPECT_EQ(3u, graphics_dict->size());
 
@@ -2468,7 +2468,7 @@
 
     // Now add a more complex blue path.
     FPDF_PAGEOBJECT green_path = FPDFPageObj_CreateNewPath(20, 20);
-    EXPECT_TRUE(FPDFPath_SetFillColor(green_path, 0, 255, 0, 200));
+    EXPECT_TRUE(FPDFPageObj_SetFillColor(green_path, 0, 255, 0, 200));
     // TODO(npm): stroking will cause the MD5s to differ.
     EXPECT_TRUE(FPDFPath_SetDrawMode(green_path, FPDF_FILLMODE_WINDING, 0));
     EXPECT_TRUE(FPDFPath_LineTo(green_path, 20, 63));
diff --git a/fpdfsdk/fpdf_editpath.cpp b/fpdfsdk/fpdf_editpath.cpp
index d9213c8..cef4867 100644
--- a/fpdfsdk/fpdf_editpath.cpp
+++ b/fpdfsdk/fpdf_editpath.cpp
@@ -69,19 +69,6 @@
 }
 
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
-                        unsigned int R,
-                        unsigned int G,
-                        unsigned int B,
-                        unsigned int A) {
-  auto* pPathObj = CPDFPathObjectFromFPDFPageObject(path);
-  if (!pPathObj)
-    return false;
-
-  return FPDFPageObj_SetStrokeColor(path, R, G, B, A);
-}
-
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
                         unsigned int* R,
                         unsigned int* G,
@@ -94,39 +81,6 @@
   return FPDFPageObj_GetStrokeColor(path, R, G, B, A);
 }
 
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width) {
-  auto* pPathObj = CPDFPathObjectFromFPDFPageObject(path);
-  if (!pPathObj)
-    return false;
-
-  return FPDFPageObj_SetStrokeWidth(path, width);
-}
-
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
-                                                          unsigned int R,
-                                                          unsigned int G,
-                                                          unsigned int B,
-                                                          unsigned int A) {
-  auto* pPathObj = CPDFPathObjectFromFPDFPageObject(path);
-  if (!pPathObj)
-    return false;
-
-  return FPDFPageObj_SetFillColor(path, R, G, B, A);
-}
-
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
-                                                          unsigned int* R,
-                                                          unsigned int* G,
-                                                          unsigned int* B,
-                                                          unsigned int* A) {
-  auto* pPathObj = CPDFPathObjectFromFPDFPageObject(path);
-  if (!pPathObj)
-    return false;
-
-  return FPDFPageObj_GetFillColor(path, R, G, B, A);
-}
-
 FPDF_EXPORT int FPDF_CALLCONV FPDFPath_CountSegments(FPDF_PAGEOBJECT path) {
   auto* pPathObj = CPDFPathObjectFromFPDFPageObject(path);
   if (!pPathObj)
diff --git a/fpdfsdk/fpdf_editpath_embeddertest.cpp b/fpdfsdk/fpdf_editpath_embeddertest.cpp
index 023a165..7bd5ae2 100644
--- a/fpdfsdk/fpdf_editpath_embeddertest.cpp
+++ b/fpdfsdk/fpdf_editpath_embeddertest.cpp
@@ -15,8 +15,8 @@
 
   for (size_t i = 0; i < 256; ++i) {
     FPDF_PAGEOBJECT path = FPDFPageObj_CreateNewPath(400, 100);
-    EXPECT_TRUE(FPDFPath_SetFillColor(path, i, i, i, i));
-    EXPECT_TRUE(FPDFPath_SetStrokeColor(path, i, i, i, i));
+    EXPECT_TRUE(FPDFPageObj_SetFillColor(path, i, i, i, i));
+    EXPECT_TRUE(FPDFPageObj_SetStrokeColor(path, i, i, i, i));
     EXPECT_TRUE(FPDFPath_SetDrawMode(path, FPDF_FILLMODE_ALTERNATE, 0));
     EXPECT_TRUE(FPDFPath_LineTo(path, 400, 200));
     EXPECT_TRUE(FPDFPath_LineTo(path, 300, 100));
@@ -44,13 +44,13 @@
     unsigned int g;
     unsigned int b;
     unsigned int a;
-    FPDFPath_GetFillColor(path, &r, &g, &b, &a);
+    FPDFPageObj_GetFillColor(path, &r, &g, &b, &a);
     EXPECT_EQ(i, r);
     EXPECT_EQ(i, g);
     EXPECT_EQ(i, b);
     EXPECT_EQ(i, a);
 
-    FPDFPath_GetStrokeColor(path, &r, &g, &b, &a);
+    FPDFPageObj_GetStrokeColor(path, &r, &g, &b, &a);
     EXPECT_EQ(i, r);
     EXPECT_EQ(i, g);
     EXPECT_EQ(i, b);
diff --git a/fpdfsdk/fpdf_edittext.cpp b/fpdfsdk/fpdf_edittext.cpp
index ddb0ee7..f152b5e 100644
--- a/fpdfsdk/fpdf_edittext.cpp
+++ b/fpdfsdk/fpdf_edittext.cpp
@@ -506,15 +506,6 @@
       CPDF_Font::GetStockFont(pDoc, ByteStringView(font)));
 }
 
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
-                      unsigned int R,
-                      unsigned int G,
-                      unsigned int B,
-                      unsigned int A) {
-  return FPDFPageObj_SetFillColor(text_object, R, G, B, A);
-}
-
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFText_GetMatrix(FPDF_PAGEOBJECT text,
                                                        double* a,
                                                        double* b,
diff --git a/fpdfsdk/fpdf_view_c_api_test.c b/fpdfsdk/fpdf_view_c_api_test.c
index 0af6df7..b776c10 100644
--- a/fpdfsdk/fpdf_view_c_api_test.c
+++ b/fpdfsdk/fpdf_view_c_api_test.c
@@ -197,19 +197,12 @@
     CHK(FPDFPath_Close);
     CHK(FPDFPath_CountSegments);
     CHK(FPDFPath_GetDrawMode);
-    CHK(FPDFPath_GetFillColor);
     CHK(FPDFPath_GetMatrix);
     CHK(FPDFPath_GetPathSegment);
-    CHK(FPDFPath_GetStrokeColor);
     CHK(FPDFPath_LineTo);
     CHK(FPDFPath_MoveTo);
     CHK(FPDFPath_SetDrawMode);
-    CHK(FPDFPath_SetFillColor);
-    CHK(FPDFPath_SetLineCap);
-    CHK(FPDFPath_SetLineJoin);
     CHK(FPDFPath_SetMatrix);
-    CHK(FPDFPath_SetStrokeColor);
-    CHK(FPDFPath_SetStrokeWidth);
     CHK(FPDFTextObj_GetFontName);
     CHK(FPDFTextObj_GetFontSize);
     CHK(FPDFTextObj_GetText);
@@ -217,7 +210,6 @@
     CHK(FPDFText_GetTextRenderMode);
     CHK(FPDFText_LoadFont);
     CHK(FPDFText_LoadStandardFont);
-    CHK(FPDFText_SetFillColor);
     CHK(FPDFText_SetText);
     CHK(FPDF_CreateNewDocument);
 
diff --git a/public/fpdf_edit.h b/public/fpdf_edit.h
index 4f38432..92e8964 100644
--- a/public/fpdf_edit.h
+++ b/public/fpdf_edit.h
@@ -759,25 +759,6 @@
 FPDFPageObj_SetBlendMode(FPDF_PAGEOBJECT page_object,
                          FPDF_BYTESTRING blend_mode);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetStrokeColor instead.
-//
-// Set the stroke RGBA of a path. Range of values: 0 - 255.
-//
-// path   - the handle to the path object.
-// R      - the red component for the path stroke color.
-// G      - the green component for the path stroke color.
-// B      - the blue component for the path stroke color.
-// A      - the stroke alpha for the path.
-//
-// Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeColor(FPDF_PAGEOBJECT path,
-                        unsigned int R,
-                        unsigned int G,
-                        unsigned int B,
-                        unsigned int A);
-
 // Set the stroke RGBA of a page object. Range of values: 0 - 255.
 //
 // page_object  - the handle to the page object.
@@ -794,25 +775,6 @@
                            unsigned int B,
                            unsigned int A);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_GetStrokeColor instead. Get the stroke RGBA of a path.
-//
-// Get the stroke RGBA of a path. Range of values: 0 - 255.
-//
-// path   - the handle to the path object.
-// R      - the red component of the path stroke color.
-// G      - the green component of the path stroke color.
-// B      - the blue component of the path stroke color.
-// A      - the stroke alpha of the path.
-//
-// Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_GetStrokeColor(FPDF_PAGEOBJECT path,
-                        unsigned int* R,
-                        unsigned int* G,
-                        unsigned int* B,
-                        unsigned int* A);
-
 // Get the stroke RGBA of a page object. Range of values: 0 - 255.
 //
 // page_object  - the handle to the page object.
@@ -829,18 +791,6 @@
                            unsigned int* B,
                            unsigned int* A);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetStrokeWidth instead.
-//
-// Set the stroke width of a path.
-//
-// path   - the handle to the path object.
-// width  - the width of the stroke.
-//
-// Returns TRUE on success
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFPath_SetStrokeWidth(FPDF_PAGEOBJECT path, float width);
-
 // Set the stroke width of a page object.
 //
 // path   - the handle to the page object.
@@ -870,19 +820,6 @@
 FPDF_EXPORT int FPDF_CALLCONV
 FPDFPageObj_GetLineJoin(FPDF_PAGEOBJECT page_object);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetLineJoin instead.
-//
-// Set the line join of |page_object|.
-//
-// page_object  - handle to a page object.
-// line_join    - line join
-//
-// Line join can be one of following: FPDF_LINEJOIN_MITER, FPDF_LINEJOIN_ROUND,
-// FPDF_LINEJOIN_BEVEL
-FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineJoin(FPDF_PAGEOBJECT page_object,
-                                                    int line_join);
-
 // Set the line join of |page_object|.
 //
 // page_object  - handle to a page object.
@@ -903,19 +840,6 @@
 FPDF_EXPORT int FPDF_CALLCONV
 FPDFPageObj_GetLineCap(FPDF_PAGEOBJECT page_object);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetLineCap instead.
-//
-// Set the line cap of |page_object|.
-//
-// page_object - handle to a page object.
-// line_cap    - line cap
-//
-// Line cap can be one of following: FPDF_LINECAP_BUTT, FPDF_LINECAP_ROUND,
-// FPDF_LINECAP_PROJECTING_SQUARE
-FPDF_EXPORT void FPDF_CALLCONV FPDFPath_SetLineCap(FPDF_PAGEOBJECT page_object,
-                                                   int line_cap);
-
 // Set the line cap of |page_object|.
 //
 // page_object - handle to a page object.
@@ -926,24 +850,6 @@
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
 FPDFPageObj_SetLineCap(FPDF_PAGEOBJECT page_object, int line_cap);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetFillColor instead.
-//
-// Set the fill RGBA of a path. Range of values: 0 - 255.
-//
-// path   - the handle to the path object.
-// R      - the red component for the path fill color.
-// G      - the green component for the path fill color.
-// B      - the blue component for the path fill color.
-// A      - the fill alpha for the path.
-//
-// Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_SetFillColor(FPDF_PAGEOBJECT path,
-                                                          unsigned int R,
-                                                          unsigned int G,
-                                                          unsigned int B,
-                                                          unsigned int A);
-
 // Set the fill RGBA of a page object. Range of values: 0 - 255.
 //
 // page_object  - the handle to the page object.
@@ -960,24 +866,6 @@
                          unsigned int B,
                          unsigned int A);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_GetFillColor instead.
-//
-// Get the fill RGBA of a path. Range of values: 0 - 255.
-//
-// path   - the handle to the path object.
-// R      - the red component of the path fill color.
-// G      - the green component of the path fill color.
-// B      - the blue component of the path fill color.
-// A      - the fill alpha of the path.
-//
-// Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDFPath_GetFillColor(FPDF_PAGEOBJECT path,
-                                                          unsigned int* R,
-                                                          unsigned int* G,
-                                                          unsigned int* B,
-                                                          unsigned int* A);
-
 // Get the fill RGBA of a page object. Range of values: 0 - 255.
 //
 // page_object  - the handle to the page object.
@@ -1228,25 +1116,6 @@
 FPDF_EXPORT FPDF_FONT FPDF_CALLCONV
 FPDFText_LoadStandardFont(FPDF_DOCUMENT document, FPDF_BYTESTRING font);
 
-// DEPRECATED as of May 2018. This API will be removed in the future. Please
-// use FPDFPageObj_SetFillColor instead.
-//
-// Set the fill RGBA of a text object. Range of values: 0 - 255.
-//
-// text_object  - handle to the text object.
-// R            - the red component for the path fill color.
-// G            - the green component for the path fill color.
-// B            - the blue component for the path fill color.
-// A            - the fill alpha for the path.
-//
-// Returns TRUE on success.
-FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV
-FPDFText_SetFillColor(FPDF_PAGEOBJECT text_object,
-                      unsigned int R,
-                      unsigned int G,
-                      unsigned int B,
-                      unsigned int A);
-
 // Experimental API.
 // Get the transform matrix of a text object.
 //