mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-10-07 16:14:03 +08:00
Correctly parse FunctionBasedShading matrix and fix #702
This commit is contained in:
Binary file not shown.
@@ -4,6 +4,16 @@
|
||||
|
||||
public class ShadingTests
|
||||
{
|
||||
[Fact]
|
||||
public void Issue702()
|
||||
{
|
||||
// Placeholder test for issue 702, the document contains a FunctionBasedShading
|
||||
using (var document = PdfDocument.Open(IntegrationHelpers.GetDocumentPath("PDFBOX-1869-4-1.pdf")))
|
||||
{
|
||||
var page1 = document.GetPage(1);
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AxialRadial1()
|
||||
{
|
||||
|
@@ -144,7 +144,7 @@
|
||||
}
|
||||
|
||||
TransformationMatrix matrix;
|
||||
if (shadingDictionary.TryGet<ArrayToken>(NameToken.Coords, scanner, out var matrixToken))
|
||||
if (shadingDictionary.TryGet<ArrayToken>(NameToken.Matrix, scanner, out var matrixToken))
|
||||
{
|
||||
matrix = TransformationMatrix.FromArray(matrixToken.Data.OfType<NumericToken>().Select(n => n.Data).ToArray());
|
||||
}
|
||||
|
Reference in New Issue
Block a user