private Rectangle RenderDynamicImage(RPLItemMeasurement measurement, RPLDynamicImageProps dynamicImageProps)
        {
            if (html5Renderer.m_createSecondaryStreams != 0)
            {
                return(dynamicImageProps.ImageConsolidationOffsets);
            }
            Stream stream = null;

            stream = html5Renderer.CreateStream(dynamicImageProps.StreamName, "png", null, "image/png", willSeek: false, StreamOper.CreateAndRegister);
            if (dynamicImageProps.DynamicImageContentOffset >= 0)
            {
                html5Renderer.m_rplReport.GetImage(dynamicImageProps.DynamicImageContentOffset, stream);
            }
            else if (dynamicImageProps.DynamicImageContent != null)
            {
                byte[] array = new byte[4096];
                dynamicImageProps.DynamicImageContent.Position = 0L;
                int num = (int)dynamicImageProps.DynamicImageContent.Length;
                while (num > 0)
                {
                    int num2 = dynamicImageProps.DynamicImageContent.Read(array, 0, Math.Min(array.Length, num));
                    stream.Write(array, 0, num2);
                    num -= num2;
                }
            }
            return(Rectangle.Empty);
        }
示例#2
0
        private void CreateGrowRectIdsStream()
        {
            string streamName = HTML5Renderer.GetStreamName(html5Renderer.m_rplReport.ReportName, html5Renderer.m_pageNum, "_gr");
            Stream stream     = html5Renderer.CreateStream(streamName, "txt", Encoding.UTF8, "text/plain", willSeek: true, StreamOper.CreateOnly);

            html5Renderer.m_growRectangleIdsStream   = new BufferedStream(stream);
            html5Renderer.m_needsGrowRectangleScript = true;
        }