示例#1
0
 public virtual void PrintTitle(Value val)
 {
     if (!Report.NoTitlesHandler.Handled)
     {
         PostChain.Title(val.Print());
     }
 }
示例#2
0
        public void SwapChain()
        {
            if (Initialized == true ||
                Size.Width == 0 ||
                Size.Height == 0)
            {
                return;
            }

            SKImageInfo info;

            try
            {
                info = new SKImageInfo(
                    Size.Width,
                    Size.Height,
                    SKColorType.Bgra8888,
                    SKAlphaType.Premul);
            }
            catch
            {
                return;
            }

            Skia_Bitmap = new SKBitmap();
            CreateNativeContext();

            var result = this.Skia_Bitmap.InstallPixels(
                info, scan0,
                info.RowBytes,
                null, null,
                "RELEASING");

            Skia_Canvas = new SKCanvas(Skia_Bitmap);
            int stride = Size.Width * 4;

            CSharp_Bitmap = new Bitmap(Size.Width, Size.Height, stride, PixelFormat.Format32bppPArgb, scan0);
            BitmapSize    = Size;

            PostChain?.Invoke(Skia_Canvas);

            // 메모리 회수
            SetProcessWorkingSetSize(System.Diagnostics.Process.GetCurrentProcess().Handle, -1, -1);
            Initialized = true;
        }
示例#3
0
        /// <summary>
        /// Ported from void post_splitter::flush()
        /// </summary>
        public override void Flush()
        {
            foreach (KeyValuePair <Value, IList <Post> > pair in PostsMap)
            {
                PreFlushFunc(pair.Key);

                foreach (Post post in pair.Value)
                {
                    PostChain.Handle(post);
                }

                PostChain.Flush();
                PostChain.Clear();

                if (PostFlushFunc != null)
                {
                    PostFlushFunc(pair.Key);
                }
            }
        }
示例#4
0
 public override void Clear()
 {
     PostsMap.Clear();
     PostChain.Clear();
     base.Clear();
 }