add support for alternative colorspace in separation colorspaces #89

This commit is contained in:
Eliot Jones
2019-12-06 17:23:15 +00:00
parent c57d8446e4
commit e38da0a403
13 changed files with 162 additions and 51 deletions

View File

@@ -1,11 +1,14 @@
namespace UglyToad.PdfPig.Tests.Graphics
{
using System.Collections.Generic;
using Content;
using PdfPig.Geometry;
using PdfPig.Graphics;
using PdfPig.IO;
using PdfPig.Tokens;
using PdfPig.Core;
using PdfPig.Fonts;
using Tokens;
internal class TestOperationContext : IOperationContext
{
@@ -29,7 +32,7 @@
{
StateStack.Push(new CurrentGraphicsState());
CurrentPath = new PdfPath();
ColorSpaceContext = new ColorSpaceContext(GetCurrentState);
ColorSpaceContext = new ColorSpaceContext(GetCurrentState, new ResourceStore(new TestPdfTokenScanner(), new TestFontFactory()));
}
public CurrentGraphicsState GetCurrentState()
@@ -89,5 +92,13 @@
public void EndInlineImage(IReadOnlyList<byte> bytes)
{
}
private class TestFontFactory : IFontFactory
{
public IFont Get(DictionaryToken dictionary, bool isLenientParsing)
{
return null;
}
}
}
}