Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- double buffered in c# [closed]
- Graphics g = Graphics.FromHwnd(panel.Handle);
- if (newImage == true)
- {
- g.Clear(SystemColors.Control);
- newImage = false;
- }
- g.DrawImage(bmp, hOffset, vOffset);
- g.Dispose();
- this.SetStyle(ControlStyles.AllPaintingInWmPaint |ControlStyles.UserPaint |ControlStyles.DoubleBuffer, true);
- System.Drawing.BufferedGraphics
- System.Drawing.BufferedGraphics
- System.Drawing.Graphics
- System.Drawing.Graphics g = this.CreateGraphics();
- System.Drawing.BufferedGraphicsContext dc = new BufferedGraphicsContext();
- BufferedGraphics backbuffer = dc.Allocate(g, new Rectangle(new Point(0, 0), g.VisibleClipBounds.Size.ToSize()));
- backbuffer.Graphics.DrawImage(Image.FromFile(@"c:test.jpg"), new Point(10, 10));
- backbuffer.Render(g);
Advertisement
Add Comment
Please, Sign In to add comment