Test for radial shading when start is a point on border of end circle.

Bug: pdfium:1140
Change-Id: I306b7be5ea2732742e90e416f58c11bcaf8cbaf6
Reviewed-on: https://pdfium-review.googlesource.com/41770
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/testing/resources/pixel/radial_shading_point_at_border.in b/testing/resources/pixel/radial_shading_point_at_border.in
new file mode 100644
index 0000000..ccb4cce
--- /dev/null
+++ b/testing/resources/pixel/radial_shading_point_at_border.in
@@ -0,0 +1,52 @@
+{{header}}
+
+{{object 1 0}}
+<< /Pages 2 0 R >>
+endobj
+
+{{object 2 0}}
+<< /Type /Pages /Count 1 /Kids [ 3 0 R ] >>
+endobj
+
+{{object 3 0}}
+<<
+  /Type /Page
+  /Parent 2 0 R
+  /MediaBox [0 0 300 400]
+  /Contents 4 0 R
+  /Resources << /Shading << /R9 5 0 R >> >>>>
+endobj
+
+{{object 4 0}}
+<< /Length 5 0 R >>
+stream
+50 0 0 50 150 100 cm
+10 10 280 380 re f
+/R9 sh
+endstream
+endobj
+
+{{object 5 0}}
+<<
+  /ShadingType 3
+  /ColorSpace /DeviceRGB
+  /Coords [-.223151 -.974784 0.0 0.0 0.0 1.0] % Start is a point on the border of end
+  /Function 6 0 R
+  /Extend [true true]
+ >>
+endobj
+
+{{object 6 0}}
+<<
+  /FunctionType 2
+  /Domain [0.0 1.0]
+  /C0 [0.1 0.2 0.8]
+  /C1 [0.05 0.01 0.4]
+  /N 1
+>>
+endobj
+
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/radial_shading_point_at_border_expected.pdf.0.png b/testing/resources/pixel/radial_shading_point_at_border_expected.pdf.0.png
new file mode 100644
index 0000000..1640803
--- /dev/null
+++ b/testing/resources/pixel/radial_shading_point_at_border_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/radial_shading_point_at_border_no_extend.in b/testing/resources/pixel/radial_shading_point_at_border_no_extend.in
new file mode 100644
index 0000000..ce98dd8
--- /dev/null
+++ b/testing/resources/pixel/radial_shading_point_at_border_no_extend.in
@@ -0,0 +1,52 @@
+{{header}}
+
+{{object 1 0}}
+<< /Pages 2 0 R >>
+endobj
+
+{{object 2 0}}
+<< /Type /Pages /Count 1 /Kids [ 3 0 R ] >>
+endobj
+
+{{object 3 0}}
+<<
+  /Type /Page
+  /Parent 2 0 R
+  /MediaBox [0 0 300 400]
+  /Contents 4 0 R
+  /Resources << /Shading << /R9 5 0 R >> >>>>
+endobj
+
+{{object 4 0}}
+<< /Length 5 0 R >>
+stream
+50 0 0 50 150 100 cm
+10 10 280 380 re f
+/R9 sh
+endstream
+endobj
+
+{{object 5 0}}
+<<
+  /ShadingType 3
+  /ColorSpace /DeviceRGB
+  /Coords [-.223151 -.974784 0.0 0.0 0.0 1.0] % Start is a point on the border of end
+  /Function 6 0 R
+  /Extend [false false]
+ >>
+endobj
+
+{{object 6 0}}
+<<
+  /FunctionType 2
+  /Domain [0.0 1.0]
+  /C0 [0.1 0.2 0.8]
+  /C1 [0.05 0.01 0.4]
+  /N 1
+>>
+endobj
+
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/radial_shading_point_at_border_no_extend_expected.pdf.0.png b/testing/resources/pixel/radial_shading_point_at_border_no_extend_expected.pdf.0.png
new file mode 100644
index 0000000..dfceaf3
--- /dev/null
+++ b/testing/resources/pixel/radial_shading_point_at_border_no_extend_expected.pdf.0.png
Binary files differ