Questions tagged [doublebuffered]

A computer-graphics technique for updating a dynamic image that greatly reduces the visual artifacts, especially flicker, caused by the screen pixels being changed. The new image is drawn in a "hidden" buffer while the user still sees the old image, stored in a "visible" buffer (hence "double-buffering"). When the new image is fully drawn, the visible and the hidden buffers are switched very quickly and the hidden buffer content becomes visible.

181 questions
3
votes
1 answer

NullPointerException when using Double Buffer in swing

In the following code i'm using a doubleBuffer to avoid flickering of the image as was suggested in this question of mine import java.awt.Graphics; import java.awt.Image; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import…
md1hunox
  • 3,815
  • 10
  • 45
  • 67
2
votes
2 answers

Flickering child windows with alpha channels

When drawing child controls containing bitmaps with per-pixel alpha channels, we are getting quite a lot of flickering whenever they need to be redrawn. The actual blending is working correctly. I've found a lot of info about reducing flicker…
Doug Kavendek
  • 3,624
  • 4
  • 31
  • 43
2
votes
1 answer

c# double buffering buttons

I've been working on one project last few months, and have one problem that I can't solve. I have a Windows form with controls on it. When user changes the controls size, app then fires sizechanged event and I move the controls on it accordingly.…
n1tr0
  • 269
  • 4
  • 15
2
votes
1 answer

Am I not doing correctly or understanding double buffering on Android?

I have a function @Override public void run() { while(running && (!eof)){ if(surfaceHolder.getSurface().isValid()){ Canvas canvas = surfaceHolder.lockCanvas(); paint(canvas); …
Kalina
  • 5,504
  • 16
  • 64
  • 101
2
votes
1 answer

Need help working with self.MemoryDC in wxPython

I'm trying to make a custom text widget that is double buffered (In order to avoid flicker). However, I'd like to be able to do a few things. Yet, I'm unsure of the exact methods I should use. The first two are easy I simply want to change the…
rectangletangle
  • 50,393
  • 94
  • 205
  • 275
2
votes
1 answer

Redraw issue on Windows10 with DoubleBuffering and FormBorderStyle.None

I have an issue with a Windows Forms project, which I can reproduce only on Windows 10 machine (on Windows 7 it does work). I think that I could isolate the source of issue, namely, if I switch double buffering on and set FormBorderStyle to None,…
Rekshino
  • 6,954
  • 2
  • 19
  • 44
2
votes
1 answer

scrollable picturebox c# .net stop flickering using doublebufferring

I create a scrollable picturebox referring this link. It works fine. But image is flickering when I scrolling. Windows forms has DoubleBuffered property. But picturebox haven't. I think if I can use DoubleBuffered on picturebox then might my…
yohan.jayarathna
  • 3,423
  • 13
  • 56
  • 74
2
votes
3 answers

C#, double buffer in WinForms?

private void button3_Click(object sender, EventArgs e) { this.DoubleBuffered = true; for (int i = 0; i < 350; i++) { using (Graphics g = this.CreateGraphics() ) { …
Rob
  • 643
  • 3
  • 8
  • 13
2
votes
2 answers

Java AWT drawImage race condition - how to use synchronized to avoid it

After many hours of debugging and analysis, I have finally managed to isolate the cause of a race condition. Solving it is another matter! To see the race condition in action, I recorded a video some way in to the debugging process. I have since…
Charles Goodwin
  • 6,402
  • 3
  • 34
  • 63
2
votes
4 answers

Do we need to clear the buffer if we use double buffering?

Let say, we use double buffering. We first write the frame into the back buffer, then it will be swap into the front buffer to be displayed. There are 2 scenario here, which I assume have the same outcome. Assume we clear the back buffer, we then…
Yeo
  • 11,416
  • 6
  • 63
  • 90
2
votes
1 answer

Help with double-buffering

I have created an animation which works fine, but it flicks. I need help with double-buffering since I don't know anything about it. This is the code in my onPaint(): VOID onPaint(HDC hdc) { Graphics graphics(hdc); Pen pen(Color(255,…
Ramilol
  • 3,394
  • 11
  • 52
  • 84
2
votes
0 answers

Repaint() and double-buffering in java8, bug?

I've been playing with animation in Swing on Java 8 and have encountered some strange behaviour: sometimes content of a component suddenly becomes stale after calling repaint() on some other unrelated component. Below is the code, which reproduces…
avakhrenev
  • 83
  • 4
2
votes
1 answer

How to use qwidget double buffer

I have a QWidget that has a very cpu intensive paint event handler. But it hardly needs updating, although it is moved on screen. I know how to implement a double buffer paint mechanism, but as all QWidgets already have a double buffering system, I…
arashka
  • 1,226
  • 3
  • 17
  • 30
2
votes
3 answers

Flickering while using surface view

I am using surface view to show some graphics, the problem is that there is a flickering effect when I am moving the figure in the screen, I understand that this is due to double buffering problem, even though I went through many posts, I am unable…
2
votes
0 answers

Drawing image on very large Panel C#

I have a panel resizes with the content and sometimes that content requires the panel to be 18660 px by 118320 px. Now on a small panel I can draw a set of images with no problem and flickering but when the panel becomes that large it starts to…