示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }