iTextSharp.text.pdf.parser.PdfContentStreamProcessor.Gs C# (CSharp) Метод

Gs() приватный Метод

private Gs ( ) : GraphicsState
Результат GraphicsState
        private GraphicsState Gs()
        {
            return gsStack.Peek();
        }

Usage Example

            public void HandleXObject(PdfContentStreamProcessor processor, PdfStream stream, PdfIndirectReference refi)
            {
                PdfDictionary resources = stream.GetAsDict(PdfName.RESOURCES);

                // we read the content bytes up here so if it fails we don't leave the graphics state stack corrupted
                // this is probably not necessary (if we fail on this, probably the entire content stream processing
                // operation should be rejected
                byte[] contentBytes;
                contentBytes = ContentByteUtils.GetContentBytesFromContentObject(stream);
                PdfArray matrix = stream.GetAsArray(PdfName.MATRIX);

                new PushGraphicsState().Invoke(processor, null, null);

                if (matrix != null)
                {
                    float  a          = matrix.GetAsNumber(0).FloatValue;
                    float  b          = matrix.GetAsNumber(1).FloatValue;
                    float  c          = matrix.GetAsNumber(2).FloatValue;
                    float  d          = matrix.GetAsNumber(3).FloatValue;
                    float  e          = matrix.GetAsNumber(4).FloatValue;
                    float  f          = matrix.GetAsNumber(5).FloatValue;
                    Matrix formMatrix = new Matrix(a, b, c, d, e, f);

                    processor.Gs().ctm = formMatrix.Multiply(processor.Gs().ctm);
                }

                processor.ProcessContent(contentBytes, resources);

                new PopGraphicsState().Invoke(processor, null, null);
            }
All Usage Examples Of iTextSharp.text.pdf.parser.PdfContentStreamProcessor::Gs