internal override void WriteColorSpaceForNotStroking(MemoryStream stream, Resources resources) { _name = resources.AddResources(ResourceType.Pattern, _streamDict); IPDFPageOperation operation = new ColorSpaceForNonStroking(Name); operation.WriteBytes(stream); operation = new ColorForNonStrokingEx(new float[0], _name); operation.WriteBytes(stream); }
internal override void WriteColorSpaceForNotStroking(MemoryStream stream, Resources resources) { _name = resources.AddResources(ResourceType.Pattern, _streamDict); PDFArray colorspace = new PDFArray(); colorspace.AddItem(new PDFName(Name)); colorspace.AddItem(new PDFName(_color.Colorspace.Name)); string name = resources.AddResources(ResourceType.ColorSpace, colorspace); IPDFPageOperation operation = new ColorSpaceForNonStroking(name); operation.WriteBytes(stream); operation = new ColorForNonStrokingEx(_color.ToArray(), _name); operation.WriteBytes(stream); }
internal override bool WriteChangesForNotStroking(Colorspace newCS, MemoryStream stream, Resources resources) { _name = resources.AddResources(ResourceType.Pattern, _streamDict); if (newCS is UncoloredTilingPatternColorspace) { if (!_name.Equals((newCS as UncoloredTilingPatternColorspace)._name)) { newCS.WriteColorSpaceForNotStroking(stream, resources); } else if (!_color.Equals((newCS as UncoloredTilingPatternColorspace)._color)) { IPDFPageOperation operation = new ColorForNonStrokingEx((newCS as UncoloredTilingPatternColorspace)._color.ToArray(), (newCS as UncoloredTilingPatternColorspace)._name); operation.WriteBytes(stream); return(true); } } else { newCS.WriteColorSpaceForNotStroking(stream, resources); return(true); } return(false); }