flicker

Flickering images in java, BufferStrategy?

余生长醉 提交于 2019-12-05 19:11:23
I'm making a game in java and need to paint units on a gameboard. I put all units in a list and paints every unit in that list. The paint method looks like this: public void paint(Graphics g) { super.paint(g); if (unitList != null) { Collections.sort(unitList); for (Unit unit : unitList) { Image image = unit.getImage(); g.drawImage( image, (int) (playPosition.x + unit.getPosition().getX() - image .getWidth(null) / 2), (int) (playPosition.y + unit.getPosition().getY() - image .getHeight(null) / 2), null); } } } I have tried to make a BufferStrategy but it only makes the problem worse, guess I

iphone jquery mobile flickering issue

此生再无相见时 提交于 2019-12-05 18:45:34
I am facing flickering issue on iPhone with an app developed using jQuery mobile. I have tried several solutions available on the internet including CSS changes, setting transitions to "none" and even commenting code in jquerymobile.js. But no luck... JS and CSS files I am using are below: <script src="jquery-1.7.1.min.js"></script> <script src="jquery.mobile-1.1.0.js"></script> <script type="text/javascript" charset="utf-8" src="cordova-2.3.0.js"></script> <link rel="stylesheet" href="jquery.mobile.structure-1.1.0.min.css" /> Any help on this will be greatly appreciated. Thanks. While I was

Static controls slightly flicker when main window is resized

痴心易碎 提交于 2019-12-05 10:57:34
INTRODUCTION AND RELEVANT INFORMATION: I have a complex painting to implement in my main window’s WM_PAINT handler. I have submitted a picture bellow to illustrate it: Main window has static controls, instead of buttons, which have style SS_NOTIFY . When user clicks on them, certain actions occur in program. The following picture shows where static controls in the main window are: Map on the orange panel is an EMF file ,top left and right logos are PNG files, and other pictures are bitmaps. In order to implement this task, I have decided to draw the entire picture in WM_PAINT , and to put

How to eliminate the flicker on the right edge of TPaintBox (for example when resizing)

亡梦爱人 提交于 2019-12-05 05:29:41
Summarization: Say that I have a TForm and two panels. The panels are aligned alTop and alClient. The alClient panel contains a TPaintBox, whose OnPaint involve drawing codes. The default value of DoubleBuffered on the components are false. During the drawing process, flicker is obvious because the form, the panels all paint their background. Because the form is covered by the panels, it is probably fine to intercept its WM_ERASEBKGND message. If not, one could see flickering on the panels, and flickering on the right edge of the panels when the form is resized, because form paints its

Multithreaded video rendering in OpenGL on Mac shows severe flickering issues

蓝咒 提交于 2019-12-05 04:28:18
问题 I have a video player application, and use multiple threads in order to keep the user interaction still smooth. The thread that decodes the video originally just wrote the resulting frames as BGRA into a RAM buffer, which got uploaded to VRAM by glTexSubImage2D which worked fine enough for normal videos, but -as expected- got slow for HD (esp 1920x1080). In order to improve that I implemented a different kind of pool class which has its own GL context (NSOpenGLContext as I am on Mac), which

Update image without flickering ASP.NET C#

孤者浪人 提交于 2019-12-05 04:10:23
Im writing a web site which has a page that must show an image. This image is created by an HttpHandler using querystring commands, how can I make this works without any kind of flickering? Thanks in advance, if you need some code Im happy to share it! I used the following code for a project, where I had a similar problem. Maybe this can help solve your issue. (function($) { var cache = []; // Arguments are image paths relative to the current page. $.preLoadImages = function() { var args_len = arguments.length; for (var i = args_len; i--;) { var cacheImage = document.createElement('img');

Android scale animation flickering

时光毁灭记忆、已成空白 提交于 2019-12-04 14:57:43
I have frame layout in my app. In frame I have ImageView and TextView. I need to frame layout bounce all the time. I've made this animation in xml: <scale android:duration="100" android:fromXScale="0.1" android:fromYScale="0.1" android:pivotX="50%" android:pivotY="50%" android:toXScale="1.0" android:toYScale="1.0" /> <scale xmlns:android="http://schemas.android.com/apk/res/android" android:duration="1200" android:fillAfter="false" android:fromXScale="1.0" android:fromYScale="1.0" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:pivotX="50%" android:pivotY="50%"

jQuery flicker on slideUp() in all browsers … sample page attached

一世执手 提交于 2019-12-04 13:12:50
I know this has been discussed several times, but I have an issue that is a little different. when .slideUp() is called and the browser wind has been scrolled down to see all the bottom content, it flashes many times as the div is sliding closed. Example page is below, just click where it says to, then slide to the bottom and close one of the upper divs. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>This is the title</title> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text

iOS CAKeyFrameAnimation Scaling Flickers at animation end

≯℡__Kan透↙ 提交于 2019-12-04 09:38:15
问题 In another test of Key Frame animation I am combining moving a UIImageView (called theImage ) along a bezier path and scaling larger it as it moves, resulting in a 2x larger image at the end of the path. My initial code to do this has these elements in it to kick off the animation: UIImageView* theImage = .... float scaleFactor = 2.0; .... theImage.center = destination; theImage.transform = CGAffineTransformMakeScale(1.0,1.0); CABasicAnimation *resizeAnimation = [CABasicAnimation

Despite double buffering, the ticker still flickers

丶灬走出姿态 提交于 2019-12-04 08:44:16
Does anyone have an idea about how to get rid of flickering? I researched on SO, the web, and tried out many different things like putting TickerControl into a double buffered Panel a la Double Buffering when not drawing in OnPaint(): why doesn't it work? etc. besides many other things. It still flickers, not on every repaint, but a couple times per second. Also, even after removing the "g.Clear(BackColor)" in OnPaint, something must still be clearing the background, as the text continues to scroll readably. Here the relevant parts of my TickerControl class: class TickerControl : Control {